diff --git a/src/neon/HISTORY.rst b/src/neon/HISTORY.rst index 882c4f823f9..602c88d2974 100644 --- a/src/neon/HISTORY.rst +++ b/src/neon/HISTORY.rst @@ -13,4 +13,8 @@ Release History 1.0.0b3 ++++++ -* GA release of Neon CLI. Supports Change Plan, Project, Branches and Database Connection commands. \ No newline at end of file +* GA release of Neon CLI. Supports Change Plan, Project, Branches and Database Connection commands. + +1.0.0b4 +++++++ +* Update the CLI command description to support AI related queries. \ No newline at end of file diff --git a/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py index b089bb1faea..cb8b7c550f1 100644 --- a/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py @@ -15,7 +15,7 @@ "neon", ) class __CMDGroup(AAZCommandGroup): - """Manage Neon Postgres + """Manage Neon Postgres databases and related resources within Azure. """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py index e9ac3488749..745e1d2f204 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py @@ -15,7 +15,7 @@ "neon postgres", ) class __CMDGroup(AAZCommandGroup): - """Manage Neon Postgres + """Manage Neon Serverless Postgres resources including organizations, projects, and branches. """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py index f43547df9ef..d4e61b202b3 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py @@ -15,7 +15,7 @@ "neon postgres branch", ) class __CMDGroup(AAZCommandGroup): - """Manage Branch + """Manage branches within a Neon Postgres database. """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py index 1a8ef13ad15..8722eb70574 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py @@ -15,7 +15,7 @@ "neon postgres branch create", ) class Create(AAZCommand): - """Create a Branch + """Create a new branch within a Neon Postgres database. :example: Create a Branch az neon postgres branch create --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --branch-name test-branch --entity-name test-branch --role-name test_role --database-name testneondb @@ -47,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.branch_name = AAZStrArg( options=["-n", "--name", "--branch-name"], - help="The name of the Branch", + help="Name of the Neon branch.", required=True, fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", @@ -55,24 +55,27 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, fmt=AAZStrArgFormat( pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_name = AAZStrArg( options=["--project-name"], - help="The Id of the Neon Project.", + help="Name of the Neon project.", required=True, fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) @@ -107,31 +110,31 @@ def _build_arguments_schema(cls, *args, **kwargs): ) return cls._args_schema - _args_models_attributes_create = None + _args_attributes_create = None @classmethod - def _build_args_models_attributes_create(cls, _schema): - if cls._args_models_attributes_create is not None: - _schema.name = cls._args_models_attributes_create.name - _schema.value = cls._args_models_attributes_create.value + def _build_args_attributes_create(cls, _schema): + if cls._args_attributes_create is not None: + _schema.name = cls._args_attributes_create.name + _schema.value = cls._args_attributes_create.value return - cls._args_models_attributes_create = AAZObjectArg() + cls._args_attributes_create = AAZObjectArg() - models_attributes_create = cls._args_models_attributes_create - models_attributes_create.name = AAZStrArg( + attributes_create = cls._args_attributes_create + attributes_create.name = AAZStrArg( options=["name"], help="Name of the attribute", required=True, ) - models_attributes_create.value = AAZStrArg( + attributes_create.value = AAZStrArg( options=["value"], help="Value of the attribute", required=True, ) - _schema.name = cls._args_models_attributes_create.name - _schema.value = cls._args_models_attributes_create.value + _schema.name = cls._args_attributes_create.name + _schema.value = cls._args_attributes_create.value def _execute_operations(self): self.pre_operations() @@ -326,7 +329,7 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200_201.properties.databases databases.Element = AAZObjectType() @@ -357,7 +360,7 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.databases.Element.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) endpoints = cls._schema_on_200_201.properties.endpoints endpoints.Element = AAZObjectType() @@ -391,7 +394,7 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.endpoints.Element.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) roles = cls._schema_on_200_201.properties.roles roles.Element = AAZObjectType() @@ -423,7 +426,7 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.roles.Element.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) permissions = cls._schema_on_200_201.properties.roles.Element.permissions permissions.Element = AAZStrType() @@ -455,33 +458,33 @@ class _CreateHelper: """Helper class for Create""" @classmethod - def _build_schema_models_attributes_create(cls, _builder): + def _build_schema_attributes_create(cls, _builder): if _builder is None: return _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value __all__ = ["Create"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py index e4309be2b20..a4a66aeb76f 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py @@ -16,7 +16,7 @@ confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): - """Delete a Branch + """Delete an existing branch within a Neon Postgres database. :example: Delete Branch az neon postgres branch delete --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr @@ -47,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.branch_id = AAZStrArg( options=["--branch-id"], - help="The id of the Neon Branch resource", + help="Id of the Neon branch", required=True, id_part="child_name_2", fmt=AAZStrArgFormat( @@ -56,7 +56,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -64,10 +64,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -75,7 +78,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py index a506cb3bbf6..acc13d89b51 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py @@ -15,7 +15,7 @@ "neon postgres branch list", ) class List(AAZCommand): - """List Branch resources by Project + """List all branch resources within a specific project in Neon Postgres. :example: List Branches under a Project az neon postgres branch list --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 @@ -47,24 +47,27 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, fmt=AAZStrArgFormat( pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -233,7 +236,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.value.Element.properties.databases databases.Element = AAZObjectType() @@ -264,7 +267,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.databases.Element.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) endpoints = cls._schema_on_200.value.Element.properties.endpoints endpoints.Element = AAZObjectType() @@ -298,7 +301,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.endpoints.Element.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) roles = cls._schema_on_200.value.Element.properties.roles roles.Element = AAZObjectType() @@ -330,7 +333,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.roles.Element.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) permissions = cls._schema_on_200.value.Element.properties.roles.Element.permissions permissions.Element = AAZStrType() @@ -361,27 +364,27 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value __all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py index 8c889b671d3..0ae9a1d8283 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py @@ -15,7 +15,7 @@ "neon postgres branch show", ) class Show(AAZCommand): - """Get a Branch + """Retrieve details of a specific branch within a Neon Postgres database. :example: Show Branch Details az neon postgres branch show --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr @@ -46,7 +46,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.branch_id = AAZStrArg( options=["--branch-id"], - help="The id of the Neon Branch resource", + help="Id of the Neon branch", required=True, id_part="child_name_2", fmt=AAZStrArgFormat( @@ -55,7 +55,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -63,10 +63,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -74,7 +77,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -235,7 +238,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.properties.databases databases.Element = AAZObjectType() @@ -266,7 +269,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.databases.Element.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) endpoints = cls._schema_on_200.properties.endpoints endpoints.Element = AAZObjectType() @@ -300,7 +303,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.endpoints.Element.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) roles = cls._schema_on_200.properties.roles roles.Element = AAZObjectType() @@ -332,7 +335,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.roles.Element.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) permissions = cls._schema_on_200.properties.roles.Element.permissions permissions.Element = AAZStrType() @@ -363,27 +366,27 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value __all__ = ["Show"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py index 32955eeb5ce..cf2b397f71f 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py @@ -15,7 +15,7 @@ "neon postgres branch update", ) class Update(AAZCommand): - """Update a Branch + """Update the properties of an existing branch within a Neon Postgres database. :example: Update a Branch az neon postgres branch update --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --project-id old-frost-16758796 --branch-name test-branch --entity-name test-branch2 --role-name test_role --database-name testneondb @@ -49,7 +49,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.branch_name = AAZStrArg( options=["-n", "--name", "--branch-name"], - help="The name of the Branch", + help="Name of the Neon branch.", required=True, id_part="child_name_2", fmt=AAZStrArgFormat( @@ -58,7 +58,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -66,10 +66,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_name = AAZStrArg( options=["--project-name"], - help="The Id of the Neon Project.", + help="Name of the Neon project.", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -77,7 +80,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) @@ -116,31 +119,31 @@ def _build_arguments_schema(cls, *args, **kwargs): ) return cls._args_schema - _args_models_attributes_update = None + _args_attributes_update = None @classmethod - def _build_args_models_attributes_update(cls, _schema): - if cls._args_models_attributes_update is not None: - _schema.name = cls._args_models_attributes_update.name - _schema.value = cls._args_models_attributes_update.value + def _build_args_attributes_update(cls, _schema): + if cls._args_attributes_update is not None: + _schema.name = cls._args_attributes_update.name + _schema.value = cls._args_attributes_update.value return - cls._args_models_attributes_update = AAZObjectArg( + cls._args_attributes_update = AAZObjectArg( nullable=True, ) - models_attributes_update = cls._args_models_attributes_update - models_attributes_update.name = AAZStrArg( + attributes_update = cls._args_attributes_update + attributes_update.name = AAZStrArg( options=["name"], help="Name of the attribute", ) - models_attributes_update.value = AAZStrArg( + attributes_update.value = AAZStrArg( options=["value"], help="Value of the attribute", ) - _schema.name = cls._args_models_attributes_update.name - _schema.value = cls._args_models_attributes_update.value + _schema.name = cls._args_attributes_update.name + _schema.value = cls._args_attributes_update.value def _execute_operations(self): self.pre_operations() @@ -259,7 +262,7 @@ def _build_schema_on_200(cls): return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_models_branch_read(cls._schema_on_200) + _UpdateHelper._build_schema_branch_read(cls._schema_on_200) return cls._schema_on_200 @@ -378,7 +381,7 @@ def _build_schema_on_200_201(cls): return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_models_branch_read(cls._schema_on_200_201) + _UpdateHelper._build_schema_branch_read(cls._schema_on_200_201) return cls._schema_on_200_201 @@ -417,65 +420,65 @@ class _UpdateHelper: """Helper class for Update""" @classmethod - def _build_schema_models_attributes_update(cls, _builder): + def _build_schema_attributes_update(cls, _builder): if _builder is None: return _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_branch_read = None + _schema_branch_read = None @classmethod - def _build_schema_models_branch_read(cls, _schema): - if cls._schema_models_branch_read is not None: - _schema.id = cls._schema_models_branch_read.id - _schema.name = cls._schema_models_branch_read.name - _schema.properties = cls._schema_models_branch_read.properties - _schema.system_data = cls._schema_models_branch_read.system_data - _schema.type = cls._schema_models_branch_read.type + def _build_schema_branch_read(cls, _schema): + if cls._schema_branch_read is not None: + _schema.id = cls._schema_branch_read.id + _schema.name = cls._schema_branch_read.name + _schema.properties = cls._schema_branch_read.properties + _schema.system_data = cls._schema_branch_read.system_data + _schema.type = cls._schema_branch_read.type return - cls._schema_models_branch_read = _schema_models_branch_read = AAZObjectType() + cls._schema_branch_read = _schema_branch_read = AAZObjectType() - models_branch_read = _schema_models_branch_read - models_branch_read.id = AAZStrType( + branch_read = _schema_branch_read + branch_read.id = AAZStrType( flags={"read_only": True}, ) - models_branch_read.name = AAZStrType( + branch_read.name = AAZStrType( flags={"read_only": True}, ) - models_branch_read.properties = AAZObjectType() - models_branch_read.system_data = AAZObjectType( + branch_read.properties = AAZObjectType() + branch_read.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) - models_branch_read.type = AAZStrType( + branch_read.type = AAZStrType( flags={"read_only": True}, ) - properties = _schema_models_branch_read.properties + properties = _schema_branch_read.properties properties.attributes = AAZListType() properties.created_at = AAZStrType( serialized_name="createdAt", @@ -508,14 +511,14 @@ def _build_schema_models_branch_read(cls, _schema): ) properties.roles = AAZListType() - attributes = _schema_models_branch_read.properties.attributes + attributes = _schema_branch_read.properties.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - databases = _schema_models_branch_read.properties.databases + databases = _schema_branch_read.properties.databases databases.Element = AAZObjectType() - _element = _schema_models_branch_read.properties.databases.Element + _element = _schema_branch_read.properties.databases.Element _element.attributes = AAZListType() _element.branch_id = AAZStrType( serialized_name="branchId", @@ -539,14 +542,14 @@ def _build_schema_models_branch_read(cls, _schema): flags={"read_only": True}, ) - attributes = _schema_models_branch_read.properties.databases.Element.attributes + attributes = _schema_branch_read.properties.databases.Element.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - endpoints = _schema_models_branch_read.properties.endpoints + endpoints = _schema_branch_read.properties.endpoints endpoints.Element = AAZObjectType() - _element = _schema_models_branch_read.properties.endpoints.Element + _element = _schema_branch_read.properties.endpoints.Element _element.attributes = AAZListType() _element.branch_id = AAZStrType( serialized_name="branchId", @@ -573,14 +576,14 @@ def _build_schema_models_branch_read(cls, _schema): flags={"read_only": True}, ) - attributes = _schema_models_branch_read.properties.endpoints.Element.attributes + attributes = _schema_branch_read.properties.endpoints.Element.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - roles = _schema_models_branch_read.properties.roles + roles = _schema_branch_read.properties.roles roles.Element = AAZObjectType() - _element = _schema_models_branch_read.properties.roles.Element + _element = _schema_branch_read.properties.roles.Element _element.attributes = AAZListType() _element.branch_id = AAZStrType( serialized_name="branchId", @@ -605,14 +608,14 @@ def _build_schema_models_branch_read(cls, _schema): flags={"read_only": True}, ) - attributes = _schema_models_branch_read.properties.roles.Element.attributes + attributes = _schema_branch_read.properties.roles.Element.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_branch_read.properties.roles.Element.permissions + permissions = _schema_branch_read.properties.roles.Element.permissions permissions.Element = AAZStrType() - system_data = _schema_models_branch_read.system_data + system_data = _schema_branch_read.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) @@ -632,11 +635,11 @@ def _build_schema_models_branch_read(cls, _schema): serialized_name="lastModifiedByType", ) - _schema.id = cls._schema_models_branch_read.id - _schema.name = cls._schema_models_branch_read.name - _schema.properties = cls._schema_models_branch_read.properties - _schema.system_data = cls._schema_models_branch_read.system_data - _schema.type = cls._schema_models_branch_read.type + _schema.id = cls._schema_branch_read.id + _schema.name = cls._schema_branch_read.name + _schema.properties = cls._schema_branch_read.properties + _schema.system_data = cls._schema_branch_read.system_data + _schema.type = cls._schema_branch_read.type __all__ = ["Update"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py index a156072267e..4289a454238 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.branch_id = AAZStrArg( options=["--branch-id"], - help="The id of the Neon Branch resource", + help="Id of the Neon branch", required=True, id_part="child_name_2", fmt=AAZStrArgFormat( @@ -51,7 +51,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -59,10 +59,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -70,7 +73,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -231,7 +234,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.properties.databases databases.Element = AAZObjectType() @@ -262,7 +265,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.databases.Element.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) endpoints = cls._schema_on_200.properties.endpoints endpoints.Element = AAZObjectType() @@ -296,7 +299,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.endpoints.Element.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) roles = cls._schema_on_200.properties.roles roles.Element = AAZObjectType() @@ -328,7 +331,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.roles.Element.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) permissions = cls._schema_on_200.properties.roles.Element.permissions permissions.Element = AAZStrType() @@ -359,27 +362,27 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value __all__ = ["Wait"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__cmd_group.py similarity index 91% rename from src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py rename to src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__cmd_group.py index 7bd7ec94991..582362e6762 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__cmd_group.py @@ -12,10 +12,10 @@ @register_command_group( - "neon postgres compute", + "neon postgres endpoint", ) class __CMDGroup(AAZCommandGroup): - """Manage Compute + """Manage Endpoint """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__init__.py similarity index 100% rename from src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py rename to src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__init__.py diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/_list.py similarity index 86% rename from src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py rename to src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/_list.py index 87084268809..e4bb4d22bf2 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/_list.py @@ -12,16 +12,16 @@ @register_command( - "neon postgres compute list", + "neon postgres endpoint list", ) class List(AAZCommand): - """List Compute resources by Branch + """List all endpoints in a Neon branch. """ _aaz_info = { "version": "2025-03-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}/computes", "2025-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}/endpoints", "2025-03-01"], ] } @@ -42,41 +42,44 @@ def _build_arguments_schema(cls, *args, **kwargs): # define Arg Group "" _args_schema = cls._args_schema - _args_schema.branch_name = AAZStrArg( - options=["--branch-name"], - help="The name of the Branch", + _args_schema.branch_id = AAZStrArg( + options=["--branch-id"], + help="Id of the Neon branch", required=True, fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", + pattern="^\\S.{0,62}\\S$|^\\S$", ), ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, fmt=AAZStrArgFormat( pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) - _args_schema.project_id = AAZStrArg( - options=["--project-id"], - help="The name of the Neon Project resource.", + _args_schema.project_name = AAZStrArg( + options=["--project-name"], + help="Name of the Neon project.", required=True, fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", + pattern="^\\S.{0,62}\\S$|^\\S$", ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the Resource Group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema def _execute_operations(self): self.pre_operations() - self.ComputesList(ctx=self.ctx)() + self.EndpointsList(ctx=self.ctx)() self.post_operations() @register_callback @@ -92,7 +95,7 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class ComputesList(AAZHttpOperation): + class EndpointsList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -106,7 +109,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints", **self.url_parameters ) @@ -122,7 +125,7 @@ def error_format(self): def url_parameters(self): parameters = { **self.serialize_url_param( - "branchName", self.ctx.args.branch_name, + "branchName", self.ctx.args.branch_id, required=True, ), **self.serialize_url_param( @@ -130,7 +133,7 @@ def url_parameters(self): required=True, ), **self.serialize_url_param( - "projectName", self.ctx.args.project_id, + "projectName", self.ctx.args.project_name, required=True, ), **self.serialize_url_param( @@ -209,13 +212,16 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.value.Element.properties properties.attributes = AAZListType() - properties.cpu_cores = AAZIntType( - serialized_name="cpuCores", + properties.branch_id = AAZStrType( + serialized_name="branchId", ) properties.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) + properties.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) properties.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, @@ -223,13 +229,13 @@ def _build_schema_on_200(cls): properties.entity_name = AAZStrType( serialized_name="entityName", ) - properties.memory = AAZIntType() + properties.project_id = AAZStrType( + serialized_name="projectId", + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - properties.region = AAZStrType() - properties.status = AAZStrType() attributes = cls._schema_on_200.value.Element.properties.attributes attributes.Element = AAZObjectType() diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py index 757f47ca04d..fffb1adae53 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py @@ -15,7 +15,7 @@ "neon postgres neon-database", ) class __CMDGroup(AAZCommandGroup): - """Manage Neon Database + """Manage Neon Postgres databases within Azure. """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py index 1d679942e31..6a384b17e4c 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py @@ -15,7 +15,7 @@ "neon postgres neon-database list", ) class List(AAZCommand): - """List NeonDatabase resources by Branch + """List all Neon Postgres databases associated with a specific branch. :example: List Neon Databases under a Branch az neon postgres neon-database list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr @@ -47,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.branch_id = AAZStrArg( options=["--branch-id"], - help="The id of the Neon Branch resource", + help="Id of the Neon branch", required=True, fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", @@ -55,24 +55,27 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, fmt=AAZStrArgFormat( pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -109,7 +112,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neondatabases", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases", **self.url_parameters ) diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py index fe9c5337ca0..5d6869fff25 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py @@ -15,7 +15,7 @@ "neon postgres neon-role", ) class __CMDGroup(AAZCommandGroup): - """Manage Neon Role + """Manage roles and permissions within Neon Postgres databases. """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py index 8ca4d6f5cc3..4e7884bbdcc 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py @@ -15,7 +15,7 @@ "neon postgres neon-role list", ) class List(AAZCommand): - """List NeonRole resources by Branch + """List all roles and permissions associated with a specific branch in Neon Postgres. :example: List Neon Roles under a Branch az neon postgres neon-role list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr @@ -47,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.branch_id = AAZStrArg( options=["--branch-id"], - help="The id of the Neon Branch resource", + help="Id of the Neon branch", required=True, fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", @@ -55,24 +55,27 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, fmt=AAZStrArgFormat( pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -109,7 +112,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonroles", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles", **self.url_parameters ) diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py index b1043f81419..83f6e7e7ef9 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py @@ -15,7 +15,7 @@ "neon postgres organization", ) class __CMDGroup(AAZCommandGroup): - """Manage a Neon organization + """Manage Neon organizations, which are entities created on the Neon side. """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py index dff71f94fff..b542548bd6d 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py @@ -15,7 +15,7 @@ "neon postgres organization create", ) class Create(AAZCommand): - """Create a Neon Postgres organization + """Create a new Neon organization within a specified Azure resource group in Azure. This is typically the first step in provisioning Neon Serverless Postgres. :example: Create Neon Postgres Organization az az neon postgres organization create --resource-group sralluri_rg --name Org-cli-test --location "Central US EUAP" --subscription 68a546de-5736-48e8-a69a-5cc636794112 --marketplace-details "{subscription-id:329b25d9-168d-48d5-de4b-28b2324db159,subscription-status:Pending-fullfilment,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_free,plan-name:'Free Plan',term-unit:P1M,term-id:gmz7xq9ge3py}}" --user-details "{first-name:User,last-name:Conotoso,email-address:contoso@outlook.com,upn:contoso@outlook.com,phone-number:''}" --company-details "{company-name:'',country:'',business-phone:''}" --partner-organization-properties "{organization-name:Org-cli-test}" --project-properties "{region:'Central US EUAP',pgVersion:17,branch:{branch-name:main,database-name:neondb,role-name:owner_role},project-name:Org-cli-test-project}" @@ -57,7 +57,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) @@ -297,176 +297,176 @@ def _build_arguments_schema(cls, *args, **kwargs): tags.Element = AAZStrArg() return cls._args_schema - _args_models_attributes_create = None + _args_attributes_create = None @classmethod - def _build_args_models_attributes_create(cls, _schema): - if cls._args_models_attributes_create is not None: - _schema.name = cls._args_models_attributes_create.name - _schema.value = cls._args_models_attributes_create.value + def _build_args_attributes_create(cls, _schema): + if cls._args_attributes_create is not None: + _schema.name = cls._args_attributes_create.name + _schema.value = cls._args_attributes_create.value return - cls._args_models_attributes_create = AAZObjectArg() + cls._args_attributes_create = AAZObjectArg() - models_attributes_create = cls._args_models_attributes_create - models_attributes_create.name = AAZStrArg( + attributes_create = cls._args_attributes_create + attributes_create.name = AAZStrArg( options=["name"], help="Name of the attribute", required=True, ) - models_attributes_create.value = AAZStrArg( + attributes_create.value = AAZStrArg( options=["value"], help="Value of the attribute", required=True, ) - _schema.name = cls._args_models_attributes_create.name - _schema.value = cls._args_models_attributes_create.value + _schema.name = cls._args_attributes_create.name + _schema.value = cls._args_attributes_create.value - _args_models_endpoint_properties_create = None + _args_endpoint_properties_create = None @classmethod - def _build_args_models_endpoint_properties_create(cls, _schema): - if cls._args_models_endpoint_properties_create is not None: - _schema.attributes = cls._args_models_endpoint_properties_create.attributes - _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name - _schema.project_id = cls._args_models_endpoint_properties_create.project_id + def _build_args_endpoint_properties_create(cls, _schema): + if cls._args_endpoint_properties_create is not None: + _schema.attributes = cls._args_endpoint_properties_create.attributes + _schema.branch_id = cls._args_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_create.entity_name + _schema.project_id = cls._args_endpoint_properties_create.project_id return - cls._args_models_endpoint_properties_create = AAZObjectArg() + cls._args_endpoint_properties_create = AAZObjectArg() - models_endpoint_properties_create = cls._args_models_endpoint_properties_create - models_endpoint_properties_create.attributes = AAZListArg( + endpoint_properties_create = cls._args_endpoint_properties_create + endpoint_properties_create.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", ) - models_endpoint_properties_create.branch_id = AAZStrArg( + endpoint_properties_create.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this endpoint belongs to", ) - models_endpoint_properties_create.endpoint_type = AAZStrArg( + endpoint_properties_create.endpoint_type = AAZStrArg( options=["endpoint-type"], help="The type of the endpoint", enum={"read_only": "read_only", "read_write": "read_write"}, ) - models_endpoint_properties_create.entity_name = AAZStrArg( + endpoint_properties_create.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_endpoint_properties_create.project_id = AAZStrArg( + endpoint_properties_create.project_id = AAZStrArg( options=["project-id"], help="The ID of the project this endpoint belongs to", ) - attributes = cls._args_models_endpoint_properties_create.attributes + attributes = cls._args_endpoint_properties_create.attributes attributes.Element = AAZObjectArg() - cls._build_args_models_attributes_create(attributes.Element) + cls._build_args_attributes_create(attributes.Element) - _schema.attributes = cls._args_models_endpoint_properties_create.attributes - _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name - _schema.project_id = cls._args_models_endpoint_properties_create.project_id + _schema.attributes = cls._args_endpoint_properties_create.attributes + _schema.branch_id = cls._args_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_create.entity_name + _schema.project_id = cls._args_endpoint_properties_create.project_id - _args_models_neon_database_properties_create = None + _args_neon_database_properties_create = None @classmethod - def _build_args_models_neon_database_properties_create(cls, _schema): - if cls._args_models_neon_database_properties_create is not None: - _schema.attributes = cls._args_models_neon_database_properties_create.attributes - _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + def _build_args_neon_database_properties_create(cls, _schema): + if cls._args_neon_database_properties_create is not None: + _schema.attributes = cls._args_neon_database_properties_create.attributes + _schema.branch_id = cls._args_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_neon_database_properties_create.owner_name return - cls._args_models_neon_database_properties_create = AAZObjectArg() + cls._args_neon_database_properties_create = AAZObjectArg() - models_neon_database_properties_create = cls._args_models_neon_database_properties_create - models_neon_database_properties_create.attributes = AAZListArg( + neon_database_properties_create = cls._args_neon_database_properties_create + neon_database_properties_create.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", ) - models_neon_database_properties_create.branch_id = AAZStrArg( + neon_database_properties_create.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this database belongs to", ) - models_neon_database_properties_create.entity_name = AAZStrArg( + neon_database_properties_create.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_database_properties_create.owner_name = AAZStrArg( + neon_database_properties_create.owner_name = AAZStrArg( options=["owner-name"], help="The name of the role that owns the database", ) - attributes = cls._args_models_neon_database_properties_create.attributes + attributes = cls._args_neon_database_properties_create.attributes attributes.Element = AAZObjectArg() - cls._build_args_models_attributes_create(attributes.Element) + cls._build_args_attributes_create(attributes.Element) - _schema.attributes = cls._args_models_neon_database_properties_create.attributes - _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + _schema.attributes = cls._args_neon_database_properties_create.attributes + _schema.branch_id = cls._args_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_neon_database_properties_create.owner_name - _args_models_neon_role_properties_create = None + _args_neon_role_properties_create = None @classmethod - def _build_args_models_neon_role_properties_create(cls, _schema): - if cls._args_models_neon_role_properties_create is not None: - _schema.attributes = cls._args_models_neon_role_properties_create.attributes - _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_create.permissions + def _build_args_neon_role_properties_create(cls, _schema): + if cls._args_neon_role_properties_create is not None: + _schema.attributes = cls._args_neon_role_properties_create.attributes + _schema.branch_id = cls._args_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_neon_role_properties_create.permissions return - cls._args_models_neon_role_properties_create = AAZObjectArg() + cls._args_neon_role_properties_create = AAZObjectArg() - models_neon_role_properties_create = cls._args_models_neon_role_properties_create - models_neon_role_properties_create.attributes = AAZListArg( + neon_role_properties_create = cls._args_neon_role_properties_create + neon_role_properties_create.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", ) - models_neon_role_properties_create.branch_id = AAZStrArg( + neon_role_properties_create.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this role belongs to", ) - models_neon_role_properties_create.entity_name = AAZStrArg( + neon_role_properties_create.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_role_properties_create.is_super_user = AAZBoolArg( + neon_role_properties_create.is_super_user = AAZBoolArg( options=["is-super-user"], help="Indicates whether the role has superuser privileges", ) - models_neon_role_properties_create.permissions = AAZListArg( + neon_role_properties_create.permissions = AAZListArg( options=["permissions"], help="Permissions assigned to the role", ) - attributes = cls._args_models_neon_role_properties_create.attributes + attributes = cls._args_neon_role_properties_create.attributes attributes.Element = AAZObjectArg() - cls._build_args_models_attributes_create(attributes.Element) + cls._build_args_attributes_create(attributes.Element) - permissions = cls._args_models_neon_role_properties_create.permissions + permissions = cls._args_neon_role_properties_create.permissions permissions.Element = AAZStrArg() - _schema.attributes = cls._args_models_neon_role_properties_create.attributes - _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_create.permissions + _schema.attributes = cls._args_neon_role_properties_create.attributes + _schema.branch_id = cls._args_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_neon_role_properties_create.permissions def _execute_operations(self): self.pre_operations() @@ -832,7 +832,7 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.project_properties.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200_201.properties.project_properties.branch branch.attributes = AAZListType() @@ -869,23 +869,23 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.project_properties.branch.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200_201.properties.project_properties.branch.databases databases.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + _CreateHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200_201.properties.project_properties.branch.endpoints endpoints.Element = AAZObjectType() - _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _CreateHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200_201.properties.project_properties.branch.roles roles.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + _CreateHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200_201.properties.project_properties.databases databases.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + _CreateHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200_201.properties.project_properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -899,11 +899,11 @@ def _build_schema_on_200_201(cls): endpoints = cls._schema_on_200_201.properties.project_properties.endpoints endpoints.Element = AAZObjectType() - _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _CreateHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200_201.properties.project_properties.roles roles.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + _CreateHelper._build_schema_neon_role_properties_read(roles.Element) user_details = cls._schema_on_200_201.properties.user_details user_details.email_address = AAZStrType( @@ -950,14 +950,14 @@ class _CreateHelper: """Helper class for Create""" @classmethod - def _build_schema_models_attributes_create(cls, _builder): + def _build_schema_attributes_create(cls, _builder): if _builder is None: return _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) @classmethod - def _build_schema_models_endpoint_properties_create(cls, _builder): + def _build_schema_endpoint_properties_create(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -968,10 +968,10 @@ def _build_schema_models_endpoint_properties_create(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_create(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_database_properties_create(cls, _builder): + def _build_schema_neon_database_properties_create(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -981,10 +981,10 @@ def _build_schema_models_neon_database_properties_create(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_create(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_role_properties_create(cls, _builder): + def _build_schema_neon_role_properties_create(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -995,200 +995,200 @@ def _build_schema_models_neon_role_properties_create(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_create(attributes.set_elements(AAZObjectType, ".")) permissions = _builder.get(".permissions") if permissions is not None: permissions.set_elements(AAZStrType, ".") - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["Create"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py index 805cd2682eb..79c797af4df 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py @@ -13,11 +13,10 @@ @register_command( "neon postgres organization delete", - is_preview=True, confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): - """Delete a Neon Postgres Organization + """Delete an existing Neon organization within Azure. :example: Delete Neon Postgres Organization az neon postgres organization delete --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup --name demoNeonResource @@ -59,7 +58,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py index 4b5c81e0b6f..8060be9a5e8 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py @@ -13,10 +13,9 @@ @register_command( "neon postgres organization list", - is_preview=True, ) class List(AAZCommand): - """List Neon organizations by subscription ID + """List all Neon organizations associated with a specific subscription ID. :example: List Neon Postgres Organization az neon postgres organization list --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup @@ -48,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", ) return cls._args_schema @@ -319,7 +318,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.project_properties.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200.value.Element.properties.project_properties.branch branch.attributes = AAZListType() @@ -356,23 +355,23 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.project_properties.branch.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.value.Element.properties.project_properties.branch.databases databases.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ListHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200.value.Element.properties.project_properties.branch.endpoints endpoints.Element = AAZObjectType() - _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ListHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.value.Element.properties.project_properties.branch.roles roles.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ListHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200.value.Element.properties.project_properties.databases databases.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ListHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200.value.Element.properties.project_properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -386,11 +385,11 @@ def _build_schema_on_200(cls): endpoints = cls._schema_on_200.value.Element.properties.project_properties.endpoints endpoints.Element = AAZObjectType() - _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ListHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.value.Element.properties.project_properties.roles roles.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ListHelper._build_schema_neon_role_properties_read(roles.Element) user_details = cls._schema_on_200.value.Element.properties.user_details user_details.email_address = AAZStrType( @@ -680,7 +679,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.project_properties.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200.value.Element.properties.project_properties.branch branch.attributes = AAZListType() @@ -717,23 +716,23 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.project_properties.branch.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.value.Element.properties.project_properties.branch.databases databases.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ListHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200.value.Element.properties.project_properties.branch.endpoints endpoints.Element = AAZObjectType() - _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ListHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.value.Element.properties.project_properties.branch.roles roles.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ListHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200.value.Element.properties.project_properties.databases databases.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ListHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200.value.Element.properties.project_properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -747,11 +746,11 @@ def _build_schema_on_200(cls): endpoints = cls._schema_on_200.value.Element.properties.project_properties.endpoints endpoints.Element = AAZObjectType() - _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ListHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.value.Element.properties.project_properties.roles roles.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ListHelper._build_schema_neon_role_properties_read(roles.Element) user_details = cls._schema_on_200.value.Element.properties.user_details user_details.email_address = AAZStrType( @@ -797,194 +796,194 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py index 917f3debd52..11a5fb9fdda 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py @@ -13,10 +13,9 @@ @register_command( "neon postgres organization show", - is_preview=True, ) class Show(AAZCommand): - """Get a Neon organization + """Retrieve details of a specific Neon organization. :example: Show Neon Postgres Organization az neon postgres organization show --resource-group demoResourceGroup --name demoNeonResource @@ -57,7 +56,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -320,7 +319,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.project_properties.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200.properties.project_properties.branch branch.attributes = AAZListType() @@ -357,23 +356,23 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.project_properties.branch.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.properties.project_properties.branch.databases databases.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ShowHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200.properties.project_properties.branch.endpoints endpoints.Element = AAZObjectType() - _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ShowHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.project_properties.branch.roles roles.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ShowHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200.properties.project_properties.databases databases.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ShowHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200.properties.project_properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -387,11 +386,11 @@ def _build_schema_on_200(cls): endpoints = cls._schema_on_200.properties.project_properties.endpoints endpoints.Element = AAZObjectType() - _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ShowHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.project_properties.roles roles.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ShowHelper._build_schema_neon_role_properties_read(roles.Element) user_details = cls._schema_on_200.properties.user_details user_details.email_address = AAZStrType( @@ -437,194 +436,194 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["Show"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py index f7c8346a3a1..01e344d584c 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py @@ -15,7 +15,7 @@ "neon postgres organization update", ) class Update(AAZCommand): - """Updates a Neon Postgres organization + """Update the properties of an existing Neon organization within Azure. :example: Update Neon Postgres Organization az neon postgres create --resource-group demoResourceGroup --name demoNeonResource --location eastus2 --subscription 12345678-1234-1234-1234-123456789abc --marketplace-details "{subscription-id:abcd1234-5678-90ab-cdef-12345678abcd,subscription-status:Subscribed,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_scale,plan-name:Scale Plan,term-unit:P1M,term-id:gmz7xq9ge3py}}" --company-details "{}" --partner-organization-properties "{}" @@ -59,7 +59,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) @@ -171,66 +171,66 @@ def _build_arguments_schema(cls, *args, **kwargs): ) return cls._args_schema - _args_models_attributes_update = None + _args_attributes_update = None @classmethod - def _build_args_models_attributes_update(cls, _schema): - if cls._args_models_attributes_update is not None: - _schema.name = cls._args_models_attributes_update.name - _schema.value = cls._args_models_attributes_update.value + def _build_args_attributes_update(cls, _schema): + if cls._args_attributes_update is not None: + _schema.name = cls._args_attributes_update.name + _schema.value = cls._args_attributes_update.value return - cls._args_models_attributes_update = AAZObjectArg( + cls._args_attributes_update = AAZObjectArg( nullable=True, ) - models_attributes_update = cls._args_models_attributes_update - models_attributes_update.name = AAZStrArg( + attributes_update = cls._args_attributes_update + attributes_update.name = AAZStrArg( options=["name"], help="Name of the attribute", ) - models_attributes_update.value = AAZStrArg( + attributes_update.value = AAZStrArg( options=["value"], help="Value of the attribute", ) - _schema.name = cls._args_models_attributes_update.name - _schema.value = cls._args_models_attributes_update.value + _schema.name = cls._args_attributes_update.name + _schema.value = cls._args_attributes_update.value - _args_models_endpoint_properties_update = None + _args_endpoint_properties_update = None @classmethod - def _build_args_models_endpoint_properties_update(cls, _schema): - if cls._args_models_endpoint_properties_update is not None: - _schema.attributes = cls._args_models_endpoint_properties_update.attributes - _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name - _schema.project_id = cls._args_models_endpoint_properties_update.project_id + def _build_args_endpoint_properties_update(cls, _schema): + if cls._args_endpoint_properties_update is not None: + _schema.attributes = cls._args_endpoint_properties_update.attributes + _schema.branch_id = cls._args_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_update.entity_name + _schema.project_id = cls._args_endpoint_properties_update.project_id return - cls._args_models_endpoint_properties_update = AAZObjectArg( + cls._args_endpoint_properties_update = AAZObjectArg( nullable=True, ) - models_endpoint_properties_update = cls._args_models_endpoint_properties_update - models_endpoint_properties_update.attributes = AAZListArg( + endpoint_properties_update = cls._args_endpoint_properties_update + endpoint_properties_update.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", nullable=True, ) - models_endpoint_properties_update.branch_id = AAZStrArg( + endpoint_properties_update.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this endpoint belongs to", nullable=True, ) - models_endpoint_properties_update.endpoint_type = AAZStrArg( + endpoint_properties_update.endpoint_type = AAZStrArg( options=["endpoint-type"], help="The type of the endpoint", nullable=True, enum={"read_only": "read_only", "read_write": "read_write"}, ) - models_endpoint_properties_update.entity_name = AAZStrArg( + endpoint_properties_update.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", nullable=True, @@ -238,51 +238,51 @@ def _build_args_models_endpoint_properties_update(cls, _schema): pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_endpoint_properties_update.project_id = AAZStrArg( + endpoint_properties_update.project_id = AAZStrArg( options=["project-id"], help="The ID of the project this endpoint belongs to", nullable=True, ) - attributes = cls._args_models_endpoint_properties_update.attributes + attributes = cls._args_endpoint_properties_update.attributes attributes.Element = AAZObjectArg( nullable=True, ) - cls._build_args_models_attributes_update(attributes.Element) + cls._build_args_attributes_update(attributes.Element) - _schema.attributes = cls._args_models_endpoint_properties_update.attributes - _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name - _schema.project_id = cls._args_models_endpoint_properties_update.project_id + _schema.attributes = cls._args_endpoint_properties_update.attributes + _schema.branch_id = cls._args_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_update.entity_name + _schema.project_id = cls._args_endpoint_properties_update.project_id - _args_models_neon_database_properties_update = None + _args_neon_database_properties_update = None @classmethod - def _build_args_models_neon_database_properties_update(cls, _schema): - if cls._args_models_neon_database_properties_update is not None: - _schema.attributes = cls._args_models_neon_database_properties_update.attributes - _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + def _build_args_neon_database_properties_update(cls, _schema): + if cls._args_neon_database_properties_update is not None: + _schema.attributes = cls._args_neon_database_properties_update.attributes + _schema.branch_id = cls._args_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_neon_database_properties_update.owner_name return - cls._args_models_neon_database_properties_update = AAZObjectArg( + cls._args_neon_database_properties_update = AAZObjectArg( nullable=True, ) - models_neon_database_properties_update = cls._args_models_neon_database_properties_update - models_neon_database_properties_update.attributes = AAZListArg( + neon_database_properties_update = cls._args_neon_database_properties_update + neon_database_properties_update.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", nullable=True, ) - models_neon_database_properties_update.branch_id = AAZStrArg( + neon_database_properties_update.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this database belongs to", nullable=True, ) - models_neon_database_properties_update.entity_name = AAZStrArg( + neon_database_properties_update.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", nullable=True, @@ -290,51 +290,51 @@ def _build_args_models_neon_database_properties_update(cls, _schema): pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_database_properties_update.owner_name = AAZStrArg( + neon_database_properties_update.owner_name = AAZStrArg( options=["owner-name"], help="The name of the role that owns the database", nullable=True, ) - attributes = cls._args_models_neon_database_properties_update.attributes + attributes = cls._args_neon_database_properties_update.attributes attributes.Element = AAZObjectArg( nullable=True, ) - cls._build_args_models_attributes_update(attributes.Element) + cls._build_args_attributes_update(attributes.Element) - _schema.attributes = cls._args_models_neon_database_properties_update.attributes - _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + _schema.attributes = cls._args_neon_database_properties_update.attributes + _schema.branch_id = cls._args_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_neon_database_properties_update.owner_name - _args_models_neon_role_properties_update = None + _args_neon_role_properties_update = None @classmethod - def _build_args_models_neon_role_properties_update(cls, _schema): - if cls._args_models_neon_role_properties_update is not None: - _schema.attributes = cls._args_models_neon_role_properties_update.attributes - _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_update.permissions + def _build_args_neon_role_properties_update(cls, _schema): + if cls._args_neon_role_properties_update is not None: + _schema.attributes = cls._args_neon_role_properties_update.attributes + _schema.branch_id = cls._args_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_neon_role_properties_update.permissions return - cls._args_models_neon_role_properties_update = AAZObjectArg( + cls._args_neon_role_properties_update = AAZObjectArg( nullable=True, ) - models_neon_role_properties_update = cls._args_models_neon_role_properties_update - models_neon_role_properties_update.attributes = AAZListArg( + neon_role_properties_update = cls._args_neon_role_properties_update + neon_role_properties_update.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", nullable=True, ) - models_neon_role_properties_update.branch_id = AAZStrArg( + neon_role_properties_update.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this role belongs to", nullable=True, ) - models_neon_role_properties_update.entity_name = AAZStrArg( + neon_role_properties_update.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", nullable=True, @@ -342,33 +342,33 @@ def _build_args_models_neon_role_properties_update(cls, _schema): pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_role_properties_update.is_super_user = AAZBoolArg( + neon_role_properties_update.is_super_user = AAZBoolArg( options=["is-super-user"], help="Indicates whether the role has superuser privileges", nullable=True, ) - models_neon_role_properties_update.permissions = AAZListArg( + neon_role_properties_update.permissions = AAZListArg( options=["permissions"], help="Permissions assigned to the role", nullable=True, ) - attributes = cls._args_models_neon_role_properties_update.attributes + attributes = cls._args_neon_role_properties_update.attributes attributes.Element = AAZObjectArg( nullable=True, ) - cls._build_args_models_attributes_update(attributes.Element) + cls._build_args_attributes_update(attributes.Element) - permissions = cls._args_models_neon_role_properties_update.permissions + permissions = cls._args_neon_role_properties_update.permissions permissions.Element = AAZStrArg( nullable=True, ) - _schema.attributes = cls._args_models_neon_role_properties_update.attributes - _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_update.permissions + _schema.attributes = cls._args_neon_role_properties_update.attributes + _schema.branch_id = cls._args_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_neon_role_properties_update.permissions def _execute_operations(self): self.pre_operations() @@ -656,14 +656,14 @@ class _UpdateHelper: """Helper class for Update""" @classmethod - def _build_schema_models_attributes_update(cls, _builder): + def _build_schema_attributes_update(cls, _builder): if _builder is None: return _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) @classmethod - def _build_schema_models_endpoint_properties_update(cls, _builder): + def _build_schema_endpoint_properties_update(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -674,10 +674,10 @@ def _build_schema_models_endpoint_properties_update(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_update(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_database_properties_update(cls, _builder): + def _build_schema_neon_database_properties_update(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -687,10 +687,10 @@ def _build_schema_models_neon_database_properties_update(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_update(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_role_properties_update(cls, _builder): + def _build_schema_neon_role_properties_update(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -701,200 +701,200 @@ def _build_schema_models_neon_role_properties_update(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_update(attributes.set_elements(AAZObjectType, ".")) permissions = _builder.get(".permissions") if permissions is not None: permissions.set_elements(AAZStrType, ".") - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state _schema_organization_resource_read = None @@ -1073,7 +1073,7 @@ def _build_schema_organization_resource_read(cls, _schema): attributes = _schema_organization_resource_read.properties.project_properties.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) branch = _schema_organization_resource_read.properties.project_properties.branch branch.attributes = AAZListType() @@ -1110,23 +1110,23 @@ def _build_schema_organization_resource_read(cls, _schema): attributes = _schema_organization_resource_read.properties.project_properties.branch.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) databases = _schema_organization_resource_read.properties.project_properties.branch.databases databases.Element = AAZObjectType() - cls._build_schema_models_neon_database_properties_read(databases.Element) + cls._build_schema_neon_database_properties_read(databases.Element) endpoints = _schema_organization_resource_read.properties.project_properties.branch.endpoints endpoints.Element = AAZObjectType() - cls._build_schema_models_endpoint_properties_read(endpoints.Element) + cls._build_schema_endpoint_properties_read(endpoints.Element) roles = _schema_organization_resource_read.properties.project_properties.branch.roles roles.Element = AAZObjectType() - cls._build_schema_models_neon_role_properties_read(roles.Element) + cls._build_schema_neon_role_properties_read(roles.Element) databases = _schema_organization_resource_read.properties.project_properties.databases databases.Element = AAZObjectType() - cls._build_schema_models_neon_database_properties_read(databases.Element) + cls._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = _schema_organization_resource_read.properties.project_properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -1140,11 +1140,11 @@ def _build_schema_organization_resource_read(cls, _schema): endpoints = _schema_organization_resource_read.properties.project_properties.endpoints endpoints.Element = AAZObjectType() - cls._build_schema_models_endpoint_properties_read(endpoints.Element) + cls._build_schema_endpoint_properties_read(endpoints.Element) roles = _schema_organization_resource_read.properties.project_properties.roles roles.Element = AAZObjectType() - cls._build_schema_models_neon_role_properties_read(roles.Element) + cls._build_schema_neon_role_properties_read(roles.Element) user_details = _schema_organization_resource_read.properties.user_details user_details.email_address = AAZStrType( diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py index f1393c94ec9..5c599700c06 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py @@ -52,7 +52,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -315,7 +315,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.project_properties.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200.properties.project_properties.branch branch.attributes = AAZListType() @@ -352,23 +352,23 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.project_properties.branch.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.properties.project_properties.branch.databases databases.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + _WaitHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200.properties.project_properties.branch.endpoints endpoints.Element = AAZObjectType() - _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _WaitHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.project_properties.branch.roles roles.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + _WaitHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200.properties.project_properties.databases databases.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + _WaitHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200.properties.project_properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -382,11 +382,11 @@ def _build_schema_on_200(cls): endpoints = cls._schema_on_200.properties.project_properties.endpoints endpoints.Element = AAZObjectType() - _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _WaitHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.project_properties.roles roles.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + _WaitHelper._build_schema_neon_role_properties_read(roles.Element) user_details = cls._schema_on_200.properties.user_details user_details.email_address = AAZStrType( @@ -432,194 +432,194 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["Wait"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py index 554a9159b33..776ee9ef91f 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py @@ -15,7 +15,7 @@ "neon postgres project", ) class __CMDGroup(AAZCommandGroup): - """The projects command allows you to list, create, update, delete, and retrieve information about Neon projects. + """Manage Neon projects, including listing, creating, updating, deleting, and retrieving project information. """ pass diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py index 0e9cfd4d883..6df49b6bc76 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py @@ -13,10 +13,9 @@ @register_command( "neon postgres project create", - is_preview=True, ) class Create(AAZCommand): - """Creates a Neon Project resource + """Create a new Neon project resource within Azure. :example: Create Neon Project az neon postgres project create --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 17 --branch "{branch-name:main, role-name:owner_role,database-name:neondb}" @@ -48,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="The name of the Neon Organization resource.", + help="Name of the Neon organization.", required=True, fmt=AAZStrArgFormat( pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", @@ -61,7 +60,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.project_name = AAZStrArg( options=["-n", "--name", "--project-name"], - help="The name of the Neon Project resource.", + help="Name of the Neon project.", required=True, default="Default-Project", fmt=AAZStrArgFormat( @@ -69,7 +68,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) @@ -125,176 +124,176 @@ def _build_arguments_schema(cls, *args, **kwargs): ) return cls._args_schema - _args_models_attributes_create = None + _args_attributes_create = None @classmethod - def _build_args_models_attributes_create(cls, _schema): - if cls._args_models_attributes_create is not None: - _schema.name = cls._args_models_attributes_create.name - _schema.value = cls._args_models_attributes_create.value + def _build_args_attributes_create(cls, _schema): + if cls._args_attributes_create is not None: + _schema.name = cls._args_attributes_create.name + _schema.value = cls._args_attributes_create.value return - cls._args_models_attributes_create = AAZObjectArg() + cls._args_attributes_create = AAZObjectArg() - models_attributes_create = cls._args_models_attributes_create - models_attributes_create.name = AAZStrArg( + attributes_create = cls._args_attributes_create + attributes_create.name = AAZStrArg( options=["name"], help="Name of the attribute", required=True, ) - models_attributes_create.value = AAZStrArg( + attributes_create.value = AAZStrArg( options=["value"], help="Value of the attribute", required=True, ) - _schema.name = cls._args_models_attributes_create.name - _schema.value = cls._args_models_attributes_create.value + _schema.name = cls._args_attributes_create.name + _schema.value = cls._args_attributes_create.value - _args_models_endpoint_properties_create = None + _args_endpoint_properties_create = None @classmethod - def _build_args_models_endpoint_properties_create(cls, _schema): - if cls._args_models_endpoint_properties_create is not None: - _schema.attributes = cls._args_models_endpoint_properties_create.attributes - _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name - _schema.project_id = cls._args_models_endpoint_properties_create.project_id + def _build_args_endpoint_properties_create(cls, _schema): + if cls._args_endpoint_properties_create is not None: + _schema.attributes = cls._args_endpoint_properties_create.attributes + _schema.branch_id = cls._args_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_create.entity_name + _schema.project_id = cls._args_endpoint_properties_create.project_id return - cls._args_models_endpoint_properties_create = AAZObjectArg() + cls._args_endpoint_properties_create = AAZObjectArg() - models_endpoint_properties_create = cls._args_models_endpoint_properties_create - models_endpoint_properties_create.attributes = AAZListArg( + endpoint_properties_create = cls._args_endpoint_properties_create + endpoint_properties_create.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", ) - models_endpoint_properties_create.branch_id = AAZStrArg( + endpoint_properties_create.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this endpoint belongs to", ) - models_endpoint_properties_create.endpoint_type = AAZStrArg( + endpoint_properties_create.endpoint_type = AAZStrArg( options=["endpoint-type"], help="The type of the endpoint", enum={"read_only": "read_only", "read_write": "read_write"}, ) - models_endpoint_properties_create.entity_name = AAZStrArg( + endpoint_properties_create.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_endpoint_properties_create.project_id = AAZStrArg( + endpoint_properties_create.project_id = AAZStrArg( options=["project-id"], help="The ID of the project this endpoint belongs to", ) - attributes = cls._args_models_endpoint_properties_create.attributes + attributes = cls._args_endpoint_properties_create.attributes attributes.Element = AAZObjectArg() - cls._build_args_models_attributes_create(attributes.Element) + cls._build_args_attributes_create(attributes.Element) - _schema.attributes = cls._args_models_endpoint_properties_create.attributes - _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name - _schema.project_id = cls._args_models_endpoint_properties_create.project_id + _schema.attributes = cls._args_endpoint_properties_create.attributes + _schema.branch_id = cls._args_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_create.entity_name + _schema.project_id = cls._args_endpoint_properties_create.project_id - _args_models_neon_database_properties_create = None + _args_neon_database_properties_create = None @classmethod - def _build_args_models_neon_database_properties_create(cls, _schema): - if cls._args_models_neon_database_properties_create is not None: - _schema.attributes = cls._args_models_neon_database_properties_create.attributes - _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + def _build_args_neon_database_properties_create(cls, _schema): + if cls._args_neon_database_properties_create is not None: + _schema.attributes = cls._args_neon_database_properties_create.attributes + _schema.branch_id = cls._args_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_neon_database_properties_create.owner_name return - cls._args_models_neon_database_properties_create = AAZObjectArg() + cls._args_neon_database_properties_create = AAZObjectArg() - models_neon_database_properties_create = cls._args_models_neon_database_properties_create - models_neon_database_properties_create.attributes = AAZListArg( + neon_database_properties_create = cls._args_neon_database_properties_create + neon_database_properties_create.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", ) - models_neon_database_properties_create.branch_id = AAZStrArg( + neon_database_properties_create.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this database belongs to", ) - models_neon_database_properties_create.entity_name = AAZStrArg( + neon_database_properties_create.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_database_properties_create.owner_name = AAZStrArg( + neon_database_properties_create.owner_name = AAZStrArg( options=["owner-name"], help="The name of the role that owns the database", ) - attributes = cls._args_models_neon_database_properties_create.attributes + attributes = cls._args_neon_database_properties_create.attributes attributes.Element = AAZObjectArg() - cls._build_args_models_attributes_create(attributes.Element) + cls._build_args_attributes_create(attributes.Element) - _schema.attributes = cls._args_models_neon_database_properties_create.attributes - _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + _schema.attributes = cls._args_neon_database_properties_create.attributes + _schema.branch_id = cls._args_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_neon_database_properties_create.owner_name - _args_models_neon_role_properties_create = None + _args_neon_role_properties_create = None @classmethod - def _build_args_models_neon_role_properties_create(cls, _schema): - if cls._args_models_neon_role_properties_create is not None: - _schema.attributes = cls._args_models_neon_role_properties_create.attributes - _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_create.permissions + def _build_args_neon_role_properties_create(cls, _schema): + if cls._args_neon_role_properties_create is not None: + _schema.attributes = cls._args_neon_role_properties_create.attributes + _schema.branch_id = cls._args_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_neon_role_properties_create.permissions return - cls._args_models_neon_role_properties_create = AAZObjectArg() + cls._args_neon_role_properties_create = AAZObjectArg() - models_neon_role_properties_create = cls._args_models_neon_role_properties_create - models_neon_role_properties_create.attributes = AAZListArg( + neon_role_properties_create = cls._args_neon_role_properties_create + neon_role_properties_create.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", ) - models_neon_role_properties_create.branch_id = AAZStrArg( + neon_role_properties_create.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this role belongs to", ) - models_neon_role_properties_create.entity_name = AAZStrArg( + neon_role_properties_create.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", fmt=AAZStrArgFormat( pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_role_properties_create.is_super_user = AAZBoolArg( + neon_role_properties_create.is_super_user = AAZBoolArg( options=["is-super-user"], help="Indicates whether the role has superuser privileges", ) - models_neon_role_properties_create.permissions = AAZListArg( + neon_role_properties_create.permissions = AAZListArg( options=["permissions"], help="Permissions assigned to the role", ) - attributes = cls._args_models_neon_role_properties_create.attributes + attributes = cls._args_neon_role_properties_create.attributes attributes.Element = AAZObjectArg() - cls._build_args_models_attributes_create(attributes.Element) + cls._build_args_attributes_create(attributes.Element) - permissions = cls._args_models_neon_role_properties_create.permissions + permissions = cls._args_neon_role_properties_create.permissions permissions.Element = AAZStrArg() - _schema.attributes = cls._args_models_neon_role_properties_create.attributes - _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_create.permissions + _schema.attributes = cls._args_neon_role_properties_create.attributes + _schema.branch_id = cls._args_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_neon_role_properties_create.permissions def _execute_operations(self): self.pre_operations() @@ -494,7 +493,7 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200_201.properties.branch branch.attributes = AAZListType() @@ -531,23 +530,23 @@ def _build_schema_on_200_201(cls): attributes = cls._schema_on_200_201.properties.branch.attributes attributes.Element = AAZObjectType() - _CreateHelper._build_schema_models_attributes_read(attributes.Element) + _CreateHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200_201.properties.branch.databases databases.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + _CreateHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200_201.properties.branch.endpoints endpoints.Element = AAZObjectType() - _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _CreateHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200_201.properties.branch.roles roles.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + _CreateHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200_201.properties.databases databases.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + _CreateHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200_201.properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -561,11 +560,11 @@ def _build_schema_on_200_201(cls): endpoints = cls._schema_on_200_201.properties.endpoints endpoints.Element = AAZObjectType() - _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _CreateHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200_201.properties.roles roles.Element = AAZObjectType() - _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + _CreateHelper._build_schema_neon_role_properties_read(roles.Element) system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( @@ -594,14 +593,14 @@ class _CreateHelper: """Helper class for Create""" @classmethod - def _build_schema_models_attributes_create(cls, _builder): + def _build_schema_attributes_create(cls, _builder): if _builder is None: return _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) @classmethod - def _build_schema_models_endpoint_properties_create(cls, _builder): + def _build_schema_endpoint_properties_create(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -612,10 +611,10 @@ def _build_schema_models_endpoint_properties_create(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_create(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_database_properties_create(cls, _builder): + def _build_schema_neon_database_properties_create(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -625,10 +624,10 @@ def _build_schema_models_neon_database_properties_create(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_create(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_role_properties_create(cls, _builder): + def _build_schema_neon_role_properties_create(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -639,200 +638,200 @@ def _build_schema_models_neon_role_properties_create(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_create(attributes.set_elements(AAZObjectType, ".")) permissions = _builder.get(".permissions") if permissions is not None: permissions.set_elements(AAZStrType, ".") - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["Create"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py index 8911800f921..cb15eb2506b 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py @@ -13,11 +13,10 @@ @register_command( "neon postgres project delete", - is_experimental=True, confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): - """Deletes a Neon Project resource + """Delete an existing Neon project resource within Azure. :example: Delete Neon Project az neon postgres project delete --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 @@ -48,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="The Name of Neon Organization resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -56,10 +55,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -67,7 +69,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py index fb1f4be3c44..fe4cabb4fa8 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py @@ -15,7 +15,7 @@ "neon postgres project get-connection-uri", ) class GetConnectionUri(AAZCommand): - """Action to retrieve the connection URI for the Neon Database. + """Retrieve the connection URI for a specific Neon Postgres database. :example: Get Database Connection URI az neon postgres project get-connection-uri --resource-group rgneon --organization-name test-org --project-name entity-name --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr --database-name neondb --role-name owner_role --endpoint-id ep-purple-voice-a84wphbw --is-pooled false @@ -46,7 +46,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -54,10 +54,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_name = AAZStrArg( options=["--project-name"], - help="The name of the Project", + help="Name of the Neon project.", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -65,7 +68,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py index ec7294516fc..c24ea073d07 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py @@ -13,12 +13,9 @@ @register_command( "neon postgres project list", - is_preview=True, ) class List(AAZCommand): - """List Neon Projects associated with Neon Organization resource - - List Neon Project associated with your Neon Organization resource, including those shared with you. + """List all Neon projects associated with a specific Neon organization. :example: List Neon Projects within an Organization az neon postgres project list --resource-group rgneon --organization-name org-cli-test @@ -50,16 +47,19 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="The name of the Neon Organization resource", + help="Name of the Neon organization.", required=True, fmt=AAZStrArgFormat( pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -226,7 +226,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200.value.Element.properties.branch branch.attributes = AAZListType() @@ -263,23 +263,23 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.value.Element.properties.branch.attributes attributes.Element = AAZObjectType() - _ListHelper._build_schema_models_attributes_read(attributes.Element) + _ListHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.value.Element.properties.branch.databases databases.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ListHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200.value.Element.properties.branch.endpoints endpoints.Element = AAZObjectType() - _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ListHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.value.Element.properties.branch.roles roles.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ListHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200.value.Element.properties.databases databases.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ListHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200.value.Element.properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -293,11 +293,11 @@ def _build_schema_on_200(cls): endpoints = cls._schema_on_200.value.Element.properties.endpoints endpoints.Element = AAZObjectType() - _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ListHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.value.Element.properties.roles roles.Element = AAZObjectType() - _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ListHelper._build_schema_neon_role_properties_read(roles.Element) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( @@ -325,194 +325,194 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py index aca3f41b647..7380f40e6a2 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py @@ -13,10 +13,9 @@ @register_command( "neon postgres project show", - is_preview=True, ) class Show(AAZCommand): - """Get details of a Neon Project resource + """Retrieve details of a specific Neon project resource. :example: Show Neon Project Deatils az neon postgres project show --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 @@ -47,7 +46,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="The name of the Neon Organization resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -55,10 +54,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -66,7 +68,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -225,7 +227,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200.properties.branch branch.attributes = AAZListType() @@ -262,23 +264,23 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.branch.attributes attributes.Element = AAZObjectType() - _ShowHelper._build_schema_models_attributes_read(attributes.Element) + _ShowHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.properties.branch.databases databases.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ShowHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200.properties.branch.endpoints endpoints.Element = AAZObjectType() - _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ShowHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.branch.roles roles.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ShowHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200.properties.databases databases.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + _ShowHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200.properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -292,11 +294,11 @@ def _build_schema_on_200(cls): endpoints = cls._schema_on_200.properties.endpoints endpoints.Element = AAZObjectType() - _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _ShowHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.roles roles.Element = AAZObjectType() - _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + _ShowHelper._build_schema_neon_role_properties_read(roles.Element) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( @@ -324,194 +326,194 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["Show"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py index 24ffe0a26eb..589d28635e6 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py @@ -13,10 +13,9 @@ @register_command( "neon postgres project update", - is_preview=True, ) class Update(AAZCommand): - """Updates a Neon Project resource + """Update the properties of an existing Neon project resource within Azure. :example: Neon Project Update az neon postgres project update --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 18 @@ -50,7 +49,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="Name of the Neon Organizations resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -58,10 +57,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_name = AAZStrArg( options=["-n", "--name", "--project-name"], - help="The name of the Project", + help="Name of the Neon project.", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -69,7 +71,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) @@ -137,69 +139,69 @@ def _build_arguments_schema(cls, *args, **kwargs): attributes.Element = AAZObjectArg( nullable=True, ) - cls._build_args_models_attributes_update(attributes.Element) + cls._build_args_attributes_update(attributes.Element) return cls._args_schema - _args_models_attributes_update = None + _args_attributes_update = None @classmethod - def _build_args_models_attributes_update(cls, _schema): - if cls._args_models_attributes_update is not None: - _schema.name = cls._args_models_attributes_update.name - _schema.value = cls._args_models_attributes_update.value + def _build_args_attributes_update(cls, _schema): + if cls._args_attributes_update is not None: + _schema.name = cls._args_attributes_update.name + _schema.value = cls._args_attributes_update.value return - cls._args_models_attributes_update = AAZObjectArg( + cls._args_attributes_update = AAZObjectArg( nullable=True, ) - models_attributes_update = cls._args_models_attributes_update - models_attributes_update.name = AAZStrArg( + attributes_update = cls._args_attributes_update + attributes_update.name = AAZStrArg( options=["name"], help="Name of the attribute", ) - models_attributes_update.value = AAZStrArg( + attributes_update.value = AAZStrArg( options=["value"], help="Value of the attribute", ) - _schema.name = cls._args_models_attributes_update.name - _schema.value = cls._args_models_attributes_update.value + _schema.name = cls._args_attributes_update.name + _schema.value = cls._args_attributes_update.value - _args_models_endpoint_properties_update = None + _args_endpoint_properties_update = None @classmethod - def _build_args_models_endpoint_properties_update(cls, _schema): - if cls._args_models_endpoint_properties_update is not None: - _schema.attributes = cls._args_models_endpoint_properties_update.attributes - _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name - _schema.project_id = cls._args_models_endpoint_properties_update.project_id + def _build_args_endpoint_properties_update(cls, _schema): + if cls._args_endpoint_properties_update is not None: + _schema.attributes = cls._args_endpoint_properties_update.attributes + _schema.branch_id = cls._args_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_update.entity_name + _schema.project_id = cls._args_endpoint_properties_update.project_id return - cls._args_models_endpoint_properties_update = AAZObjectArg( + cls._args_endpoint_properties_update = AAZObjectArg( nullable=True, ) - models_endpoint_properties_update = cls._args_models_endpoint_properties_update - models_endpoint_properties_update.attributes = AAZListArg( + endpoint_properties_update = cls._args_endpoint_properties_update + endpoint_properties_update.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", nullable=True, ) - models_endpoint_properties_update.branch_id = AAZStrArg( + endpoint_properties_update.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this endpoint belongs to", nullable=True, ) - models_endpoint_properties_update.endpoint_type = AAZStrArg( + endpoint_properties_update.endpoint_type = AAZStrArg( options=["endpoint-type"], help="The type of the endpoint", nullable=True, enum={"read_only": "read_only", "read_write": "read_write"}, ) - models_endpoint_properties_update.entity_name = AAZStrArg( + endpoint_properties_update.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", nullable=True, @@ -207,51 +209,51 @@ def _build_args_models_endpoint_properties_update(cls, _schema): pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_endpoint_properties_update.project_id = AAZStrArg( + endpoint_properties_update.project_id = AAZStrArg( options=["project-id"], help="The ID of the project this endpoint belongs to", nullable=True, ) - attributes = cls._args_models_endpoint_properties_update.attributes + attributes = cls._args_endpoint_properties_update.attributes attributes.Element = AAZObjectArg( nullable=True, ) - cls._build_args_models_attributes_update(attributes.Element) + cls._build_args_attributes_update(attributes.Element) - _schema.attributes = cls._args_models_endpoint_properties_update.attributes - _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id - _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type - _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name - _schema.project_id = cls._args_models_endpoint_properties_update.project_id + _schema.attributes = cls._args_endpoint_properties_update.attributes + _schema.branch_id = cls._args_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_endpoint_properties_update.entity_name + _schema.project_id = cls._args_endpoint_properties_update.project_id - _args_models_neon_database_properties_update = None + _args_neon_database_properties_update = None @classmethod - def _build_args_models_neon_database_properties_update(cls, _schema): - if cls._args_models_neon_database_properties_update is not None: - _schema.attributes = cls._args_models_neon_database_properties_update.attributes - _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + def _build_args_neon_database_properties_update(cls, _schema): + if cls._args_neon_database_properties_update is not None: + _schema.attributes = cls._args_neon_database_properties_update.attributes + _schema.branch_id = cls._args_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_neon_database_properties_update.owner_name return - cls._args_models_neon_database_properties_update = AAZObjectArg( + cls._args_neon_database_properties_update = AAZObjectArg( nullable=True, ) - models_neon_database_properties_update = cls._args_models_neon_database_properties_update - models_neon_database_properties_update.attributes = AAZListArg( + neon_database_properties_update = cls._args_neon_database_properties_update + neon_database_properties_update.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", nullable=True, ) - models_neon_database_properties_update.branch_id = AAZStrArg( + neon_database_properties_update.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this database belongs to", nullable=True, ) - models_neon_database_properties_update.entity_name = AAZStrArg( + neon_database_properties_update.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", nullable=True, @@ -259,51 +261,51 @@ def _build_args_models_neon_database_properties_update(cls, _schema): pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_database_properties_update.owner_name = AAZStrArg( + neon_database_properties_update.owner_name = AAZStrArg( options=["owner-name"], help="The name of the role that owns the database", nullable=True, ) - attributes = cls._args_models_neon_database_properties_update.attributes + attributes = cls._args_neon_database_properties_update.attributes attributes.Element = AAZObjectArg( nullable=True, ) - cls._build_args_models_attributes_update(attributes.Element) + cls._build_args_attributes_update(attributes.Element) - _schema.attributes = cls._args_models_neon_database_properties_update.attributes - _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name - _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + _schema.attributes = cls._args_neon_database_properties_update.attributes + _schema.branch_id = cls._args_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_neon_database_properties_update.owner_name - _args_models_neon_role_properties_update = None + _args_neon_role_properties_update = None @classmethod - def _build_args_models_neon_role_properties_update(cls, _schema): - if cls._args_models_neon_role_properties_update is not None: - _schema.attributes = cls._args_models_neon_role_properties_update.attributes - _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_update.permissions + def _build_args_neon_role_properties_update(cls, _schema): + if cls._args_neon_role_properties_update is not None: + _schema.attributes = cls._args_neon_role_properties_update.attributes + _schema.branch_id = cls._args_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_neon_role_properties_update.permissions return - cls._args_models_neon_role_properties_update = AAZObjectArg( + cls._args_neon_role_properties_update = AAZObjectArg( nullable=True, ) - models_neon_role_properties_update = cls._args_models_neon_role_properties_update - models_neon_role_properties_update.attributes = AAZListArg( + neon_role_properties_update = cls._args_neon_role_properties_update + neon_role_properties_update.attributes = AAZListArg( options=["attributes"], help="Additional attributes for the entity", nullable=True, ) - models_neon_role_properties_update.branch_id = AAZStrArg( + neon_role_properties_update.branch_id = AAZStrArg( options=["branch-id"], help="The ID of the branch this role belongs to", nullable=True, ) - models_neon_role_properties_update.entity_name = AAZStrArg( + neon_role_properties_update.entity_name = AAZStrArg( options=["entity-name"], help="Name of the resource", nullable=True, @@ -311,33 +313,33 @@ def _build_args_models_neon_role_properties_update(cls, _schema): pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - models_neon_role_properties_update.is_super_user = AAZBoolArg( + neon_role_properties_update.is_super_user = AAZBoolArg( options=["is-super-user"], help="Indicates whether the role has superuser privileges", nullable=True, ) - models_neon_role_properties_update.permissions = AAZListArg( + neon_role_properties_update.permissions = AAZListArg( options=["permissions"], help="Permissions assigned to the role", nullable=True, ) - attributes = cls._args_models_neon_role_properties_update.attributes + attributes = cls._args_neon_role_properties_update.attributes attributes.Element = AAZObjectArg( nullable=True, ) - cls._build_args_models_attributes_update(attributes.Element) + cls._build_args_attributes_update(attributes.Element) - permissions = cls._args_models_neon_role_properties_update.permissions + permissions = cls._args_neon_role_properties_update.permissions permissions.Element = AAZStrArg( nullable=True, ) - _schema.attributes = cls._args_models_neon_role_properties_update.attributes - _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id - _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name - _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user - _schema.permissions = cls._args_models_neon_role_properties_update.permissions + _schema.attributes = cls._args_neon_role_properties_update.attributes + _schema.branch_id = cls._args_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_neon_role_properties_update.permissions def _execute_operations(self): self.pre_operations() @@ -452,7 +454,7 @@ def _build_schema_on_200(cls): return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_models_project_read(cls._schema_on_200) + _UpdateHelper._build_schema_project_read(cls._schema_on_200) return cls._schema_on_200 @@ -567,7 +569,7 @@ def _build_schema_on_200_201(cls): return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_models_project_read(cls._schema_on_200_201) + _UpdateHelper._build_schema_project_read(cls._schema_on_200_201) return cls._schema_on_200_201 @@ -601,7 +603,7 @@ def _update_instance(self, instance): attributes = _builder.get(".properties.branch.attributes") if attributes is not None: - _UpdateHelper._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + _UpdateHelper._build_schema_attributes_update(attributes.set_elements(AAZObjectType, ".")) return _instance_value @@ -618,14 +620,14 @@ class _UpdateHelper: """Helper class for Update""" @classmethod - def _build_schema_models_attributes_update(cls, _builder): + def _build_schema_attributes_update(cls, _builder): if _builder is None: return _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) @classmethod - def _build_schema_models_endpoint_properties_update(cls, _builder): + def _build_schema_endpoint_properties_update(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -636,10 +638,10 @@ def _build_schema_models_endpoint_properties_update(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_update(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_database_properties_update(cls, _builder): + def _build_schema_neon_database_properties_update(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -649,10 +651,10 @@ def _build_schema_models_neon_database_properties_update(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_update(attributes.set_elements(AAZObjectType, ".")) @classmethod - def _build_schema_models_neon_role_properties_update(cls, _builder): + def _build_schema_neon_role_properties_update(cls, _builder): if _builder is None: return _builder.set_prop("attributes", AAZListType, ".attributes") @@ -663,232 +665,232 @@ def _build_schema_models_neon_role_properties_update(cls, _builder): attributes = _builder.get(".attributes") if attributes is not None: - cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + cls._build_schema_attributes_update(attributes.set_elements(AAZObjectType, ".")) permissions = _builder.get(".permissions") if permissions is not None: permissions.set_elements(AAZStrType, ".") - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state - _schema_models_project_read = None + _schema_project_read = None @classmethod - def _build_schema_models_project_read(cls, _schema): - if cls._schema_models_project_read is not None: - _schema.id = cls._schema_models_project_read.id - _schema.name = cls._schema_models_project_read.name - _schema.properties = cls._schema_models_project_read.properties - _schema.system_data = cls._schema_models_project_read.system_data - _schema.type = cls._schema_models_project_read.type + def _build_schema_project_read(cls, _schema): + if cls._schema_project_read is not None: + _schema.id = cls._schema_project_read.id + _schema.name = cls._schema_project_read.name + _schema.properties = cls._schema_project_read.properties + _schema.system_data = cls._schema_project_read.system_data + _schema.type = cls._schema_project_read.type return - cls._schema_models_project_read = _schema_models_project_read = AAZObjectType() + cls._schema_project_read = _schema_project_read = AAZObjectType() - models_project_read = _schema_models_project_read - models_project_read.id = AAZStrType( + project_read = _schema_project_read + project_read.id = AAZStrType( flags={"read_only": True}, ) - models_project_read.name = AAZStrType( + project_read.name = AAZStrType( flags={"read_only": True}, ) - models_project_read.properties = AAZObjectType() - models_project_read.system_data = AAZObjectType( + project_read.properties = AAZObjectType() + project_read.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) - models_project_read.type = AAZStrType( + project_read.type = AAZStrType( flags={"read_only": True}, ) - properties = _schema_models_project_read.properties + properties = _schema_project_read.properties properties.attributes = AAZListType() properties.branch = AAZObjectType() properties.created_at = AAZStrType( @@ -923,11 +925,11 @@ def _build_schema_models_project_read(cls, _schema): properties.roles = AAZListType() properties.storage = AAZIntType() - attributes = _schema_models_project_read.properties.attributes + attributes = _schema_project_read.properties.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - branch = _schema_models_project_read.properties.branch + branch = _schema_project_read.properties.branch branch.attributes = AAZListType() branch.created_at = AAZStrType( serialized_name="createdAt", @@ -960,27 +962,27 @@ def _build_schema_models_project_read(cls, _schema): ) branch.roles = AAZListType() - attributes = _schema_models_project_read.properties.branch.attributes + attributes = _schema_project_read.properties.branch.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - databases = _schema_models_project_read.properties.branch.databases + databases = _schema_project_read.properties.branch.databases databases.Element = AAZObjectType() - cls._build_schema_models_neon_database_properties_read(databases.Element) + cls._build_schema_neon_database_properties_read(databases.Element) - endpoints = _schema_models_project_read.properties.branch.endpoints + endpoints = _schema_project_read.properties.branch.endpoints endpoints.Element = AAZObjectType() - cls._build_schema_models_endpoint_properties_read(endpoints.Element) + cls._build_schema_endpoint_properties_read(endpoints.Element) - roles = _schema_models_project_read.properties.branch.roles + roles = _schema_project_read.properties.branch.roles roles.Element = AAZObjectType() - cls._build_schema_models_neon_role_properties_read(roles.Element) + cls._build_schema_neon_role_properties_read(roles.Element) - databases = _schema_models_project_read.properties.databases + databases = _schema_project_read.properties.databases databases.Element = AAZObjectType() - cls._build_schema_models_neon_database_properties_read(databases.Element) + cls._build_schema_neon_database_properties_read(databases.Element) - default_endpoint_settings = _schema_models_project_read.properties.default_endpoint_settings + default_endpoint_settings = _schema_project_read.properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( serialized_name="autoscalingLimitMaxCu", flags={"required": True}, @@ -990,15 +992,15 @@ def _build_schema_models_project_read(cls, _schema): flags={"required": True}, ) - endpoints = _schema_models_project_read.properties.endpoints + endpoints = _schema_project_read.properties.endpoints endpoints.Element = AAZObjectType() - cls._build_schema_models_endpoint_properties_read(endpoints.Element) + cls._build_schema_endpoint_properties_read(endpoints.Element) - roles = _schema_models_project_read.properties.roles + roles = _schema_project_read.properties.roles roles.Element = AAZObjectType() - cls._build_schema_models_neon_role_properties_read(roles.Element) + cls._build_schema_neon_role_properties_read(roles.Element) - system_data = _schema_models_project_read.system_data + system_data = _schema_project_read.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) @@ -1018,11 +1020,11 @@ def _build_schema_models_project_read(cls, _schema): serialized_name="lastModifiedByType", ) - _schema.id = cls._schema_models_project_read.id - _schema.name = cls._schema_models_project_read.name - _schema.properties = cls._schema_models_project_read.properties - _schema.system_data = cls._schema_models_project_read.system_data - _schema.type = cls._schema_models_project_read.type + _schema.id = cls._schema_project_read.id + _schema.name = cls._schema_project_read.name + _schema.properties = cls._schema_project_read.properties + _schema.system_data = cls._schema_project_read.system_data + _schema.type = cls._schema_project_read.type __all__ = ["Update"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py index 3df35f666b5..2de532b0136 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.organization_name = AAZStrArg( options=["--organization-name"], - help="The name of the Neon Organization resource", + help="Name of the Neon organization.", required=True, id_part="name", fmt=AAZStrArgFormat( @@ -50,10 +50,13 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=50, min_length=1, ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), ) _args_schema.project_id = AAZStrArg( options=["--project-id"], - help="The id of the Neon Project resource.", + help="Id of the Neon project", required=True, id_part="child_name_1", fmt=AAZStrArgFormat( @@ -61,7 +64,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="The name of the Azure resource group", + help="Name of the Azure resource group.", required=True, ) return cls._args_schema @@ -220,7 +223,7 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) branch = cls._schema_on_200.properties.branch branch.attributes = AAZListType() @@ -257,23 +260,23 @@ def _build_schema_on_200(cls): attributes = cls._schema_on_200.properties.branch.attributes attributes.Element = AAZObjectType() - _WaitHelper._build_schema_models_attributes_read(attributes.Element) + _WaitHelper._build_schema_attributes_read(attributes.Element) databases = cls._schema_on_200.properties.branch.databases databases.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + _WaitHelper._build_schema_neon_database_properties_read(databases.Element) endpoints = cls._schema_on_200.properties.branch.endpoints endpoints.Element = AAZObjectType() - _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _WaitHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.branch.roles roles.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + _WaitHelper._build_schema_neon_role_properties_read(roles.Element) databases = cls._schema_on_200.properties.databases databases.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + _WaitHelper._build_schema_neon_database_properties_read(databases.Element) default_endpoint_settings = cls._schema_on_200.properties.default_endpoint_settings default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( @@ -287,11 +290,11 @@ def _build_schema_on_200(cls): endpoints = cls._schema_on_200.properties.endpoints endpoints.Element = AAZObjectType() - _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + _WaitHelper._build_schema_endpoint_properties_read(endpoints.Element) roles = cls._schema_on_200.properties.roles roles.Element = AAZObjectType() - _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + _WaitHelper._build_schema_neon_role_properties_read(roles.Element) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( @@ -319,194 +322,194 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" - _schema_models_attributes_read = None + _schema_attributes_read = None @classmethod - def _build_schema_models_attributes_read(cls, _schema): - if cls._schema_models_attributes_read is not None: - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + def _build_schema_attributes_read(cls, _schema): + if cls._schema_attributes_read is not None: + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value return - cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + cls._schema_attributes_read = _schema_attributes_read = AAZObjectType() - models_attributes_read = _schema_models_attributes_read - models_attributes_read.name = AAZStrType( + attributes_read = _schema_attributes_read + attributes_read.name = AAZStrType( flags={"required": True}, ) - models_attributes_read.value = AAZStrType( + attributes_read.value = AAZStrType( flags={"required": True}, ) - _schema.name = cls._schema_models_attributes_read.name - _schema.value = cls._schema_models_attributes_read.value + _schema.name = cls._schema_attributes_read.name + _schema.value = cls._schema_attributes_read.value - _schema_models_endpoint_properties_read = None + _schema_endpoint_properties_read = None @classmethod - def _build_schema_models_endpoint_properties_read(cls, _schema): - if cls._schema_models_endpoint_properties_read is not None: - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + def _build_schema_endpoint_properties_read(cls, _schema): + if cls._schema_endpoint_properties_read is not None: + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state return - cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + cls._schema_endpoint_properties_read = _schema_endpoint_properties_read = AAZObjectType() - models_endpoint_properties_read = _schema_models_endpoint_properties_read - models_endpoint_properties_read.attributes = AAZListType() - models_endpoint_properties_read.branch_id = AAZStrType( + endpoint_properties_read = _schema_endpoint_properties_read + endpoint_properties_read.attributes = AAZListType() + endpoint_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_endpoint_properties_read.created_at = AAZStrType( + endpoint_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_endpoint_properties_read.endpoint_type = AAZStrType( + endpoint_properties_read.endpoint_type = AAZStrType( serialized_name="endpointType", ) - models_endpoint_properties_read.entity_id = AAZStrType( + endpoint_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_endpoint_properties_read.entity_name = AAZStrType( + endpoint_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_endpoint_properties_read.project_id = AAZStrType( + endpoint_properties_read.project_id = AAZStrType( serialized_name="projectId", ) - models_endpoint_properties_read.provisioning_state = AAZStrType( + endpoint_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_endpoint_properties_read.attributes + attributes = _schema_endpoint_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_endpoint_properties_read.attributes - _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id - _schema.created_at = cls._schema_models_endpoint_properties_read.created_at - _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type - _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id - _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name - _schema.project_id = cls._schema_models_endpoint_properties_read.project_id - _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + _schema.attributes = cls._schema_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_endpoint_properties_read.provisioning_state - _schema_models_neon_database_properties_read = None + _schema_neon_database_properties_read = None @classmethod - def _build_schema_models_neon_database_properties_read(cls, _schema): - if cls._schema_models_neon_database_properties_read is not None: - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + def _build_schema_neon_database_properties_read(cls, _schema): + if cls._schema_neon_database_properties_read is not None: + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state return - cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + cls._schema_neon_database_properties_read = _schema_neon_database_properties_read = AAZObjectType() - models_neon_database_properties_read = _schema_models_neon_database_properties_read - models_neon_database_properties_read.attributes = AAZListType() - models_neon_database_properties_read.branch_id = AAZStrType( + neon_database_properties_read = _schema_neon_database_properties_read + neon_database_properties_read.attributes = AAZListType() + neon_database_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_database_properties_read.created_at = AAZStrType( + neon_database_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_id = AAZStrType( + neon_database_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_database_properties_read.entity_name = AAZStrType( + neon_database_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_database_properties_read.owner_name = AAZStrType( + neon_database_properties_read.owner_name = AAZStrType( serialized_name="ownerName", ) - models_neon_database_properties_read.provisioning_state = AAZStrType( + neon_database_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_database_properties_read.attributes + attributes = _schema_neon_database_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - _schema.attributes = cls._schema_models_neon_database_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_database_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name - _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name - _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_neon_database_properties_read.provisioning_state - _schema_models_neon_role_properties_read = None + _schema_neon_role_properties_read = None @classmethod - def _build_schema_models_neon_role_properties_read(cls, _schema): - if cls._schema_models_neon_role_properties_read is not None: - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + def _build_schema_neon_role_properties_read(cls, _schema): + if cls._schema_neon_role_properties_read is not None: + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state return - cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + cls._schema_neon_role_properties_read = _schema_neon_role_properties_read = AAZObjectType() - models_neon_role_properties_read = _schema_models_neon_role_properties_read - models_neon_role_properties_read.attributes = AAZListType() - models_neon_role_properties_read.branch_id = AAZStrType( + neon_role_properties_read = _schema_neon_role_properties_read + neon_role_properties_read.attributes = AAZListType() + neon_role_properties_read.branch_id = AAZStrType( serialized_name="branchId", ) - models_neon_role_properties_read.created_at = AAZStrType( + neon_role_properties_read.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_id = AAZStrType( + neon_role_properties_read.entity_id = AAZStrType( serialized_name="entityId", flags={"read_only": True}, ) - models_neon_role_properties_read.entity_name = AAZStrType( + neon_role_properties_read.entity_name = AAZStrType( serialized_name="entityName", ) - models_neon_role_properties_read.is_super_user = AAZBoolType( + neon_role_properties_read.is_super_user = AAZBoolType( serialized_name="isSuperUser", ) - models_neon_role_properties_read.permissions = AAZListType() - models_neon_role_properties_read.provisioning_state = AAZStrType( + neon_role_properties_read.permissions = AAZListType() + neon_role_properties_read.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) - attributes = _schema_models_neon_role_properties_read.attributes + attributes = _schema_neon_role_properties_read.attributes attributes.Element = AAZObjectType() - cls._build_schema_models_attributes_read(attributes.Element) + cls._build_schema_attributes_read(attributes.Element) - permissions = _schema_models_neon_role_properties_read.permissions + permissions = _schema_neon_role_properties_read.permissions permissions.Element = AAZStrType() - _schema.attributes = cls._schema_models_neon_role_properties_read.attributes - _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id - _schema.created_at = cls._schema_models_neon_role_properties_read.created_at - _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id - _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name - _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user - _schema.permissions = cls._schema_models_neon_role_properties_read.permissions - _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema.attributes = cls._schema_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_neon_role_properties_read.provisioning_state __all__ = ["Wait"] diff --git a/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml b/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml index 5cc44dee7b6..77219defb8b 100644 --- a/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml +++ b/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml @@ -852,7 +852,7 @@ interactions: User-Agent: - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/br-frosty-bird-a85qx3j8/neondatabases?api-version=2025-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/br-frosty-bird-a85qx3j8/neonDatabases?api-version=2025-03-01 response: body: string: '{"value":[{"properties":{"branchId":"br-frosty-bird-a85qx3j8","ownerName":"neondb_owner","entityId":"1643012","entityName":"neondb","createdAt":"Apr @@ -905,7 +905,7 @@ interactions: User-Agent: - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/br-frosty-bird-a85qx3j8/neonroles?api-version=2025-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/br-frosty-bird-a85qx3j8/neonRoles?api-version=2025-03-01 response: body: string: '{"value":[{"properties":{"branchId":"br-frosty-bird-a85qx3j8","isSuperUser":false,"entityName":"neondb_owner","createdAt":"Apr diff --git a/src/neon/setup.py b/src/neon/setup.py index a85c340dd7a..38502780d31 100644 --- a/src/neon/setup.py +++ b/src/neon/setup.py @@ -10,7 +10,7 @@ # HISTORY.rst entry. -VERSION = '1.0.0b3' +VERSION = '1.0.0b4' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers