From 8d0af9e6ba73a870538aa4c44545d13b80087302 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Mon, 6 Mar 2023 20:34:54 +0800 Subject: [PATCH 1/7] add network aaz cmd needed --- .../azext_spring_cloud/__init__.py | 73 +- .../azext_spring_cloud/_validators.py | 28 +- .../azext_spring_cloud/aaz/__init__.py | 6 + .../azext_spring_cloud/aaz/latest/__init__.py | 6 + .../aaz/latest/network/__cmd_group.py | 20 + .../aaz/latest/network/__init__.py | 11 + .../aaz/latest/network/vnet/__cmd_group.py | 22 + .../aaz/latest/network/vnet/__init__.py | 12 + .../aaz/latest/network/vnet/_show.py | 2450 ++++++++++++++ .../azext_spring_cloud/azext_metadata.json | 6 +- src/spring/azext_spring/__init__.py | 11 + src/spring/azext_spring/_validators.py | 28 +- src/spring/azext_spring/aaz/__init__.py | 6 + .../azext_spring/aaz/latest/__init__.py | 6 + .../aaz/latest/network/__cmd_group.py | 20 + .../aaz/latest/network/__init__.py | 11 + .../aaz/latest/network/vnet/__cmd_group.py | 22 + .../aaz/latest/network/vnet/__init__.py | 12 + .../aaz/latest/network/vnet/_show.py | 2450 ++++++++++++++ src/spring/azext_spring/azext_metadata.json | 2 +- src/ssh/azext_ssh/__init__.py | 11 + src/ssh/azext_ssh/aaz/__init__.py | 6 + src/ssh/azext_ssh/aaz/latest/__init__.py | 6 + .../aaz/latest/network/__cmd_group.py | 20 + .../azext_ssh/aaz/latest/network/__init__.py | 11 + .../aaz/latest/network/nic/__cmd_group.py | 22 + .../aaz/latest/network/nic/__init__.py | 12 + .../azext_ssh/aaz/latest/network/nic/_show.py | 2253 +++++++++++++ .../latest/network/public_ip/__cmd_group.py | 22 + .../aaz/latest/network/public_ip/__init__.py | 12 + .../aaz/latest/network/public_ip/_show.py | 2816 +++++++++++++++++ src/ssh/azext_ssh/azext_metadata.json | 2 +- src/ssh/azext_ssh/ip_utils.py | 22 +- 33 files changed, 10354 insertions(+), 63 deletions(-) create mode 100644 src/spring-cloud/azext_spring_cloud/aaz/__init__.py create mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py create mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py create mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py create mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py create mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py create mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py create mode 100644 src/spring/azext_spring/aaz/__init__.py create mode 100644 src/spring/azext_spring/aaz/latest/__init__.py create mode 100644 src/spring/azext_spring/aaz/latest/network/__cmd_group.py create mode 100644 src/spring/azext_spring/aaz/latest/network/__init__.py create mode 100644 src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py create mode 100644 src/spring/azext_spring/aaz/latest/network/vnet/__init__.py create mode 100644 src/spring/azext_spring/aaz/latest/network/vnet/_show.py create mode 100644 src/ssh/azext_ssh/aaz/__init__.py create mode 100644 src/ssh/azext_ssh/aaz/latest/__init__.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/__cmd_group.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/__init__.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/nic/__cmd_group.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/nic/__init__.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/nic/_show.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/public_ip/__cmd_group.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/public_ip/__init__.py create mode 100644 src/ssh/azext_ssh/aaz/latest/network/public_ip/_show.py diff --git a/src/spring-cloud/azext_spring_cloud/__init__.py b/src/spring-cloud/azext_spring_cloud/__init__.py index e12ffb04db9..f1f6829e24f 100644 --- a/src/spring-cloud/azext_spring_cloud/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/__init__.py @@ -1,31 +1,42 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from azure.cli.core import AzCommandsLoader - -from azure.cli.core.commands import CliCommandType -from azext_spring_cloud._help import helps # pylint: disable=unused-import -from azext_spring_cloud._client_factory import cf_spring_cloud -from azext_spring_cloud.commands import load_command_table -from azext_spring_cloud._params import load_arguments - - -class spring_cloudCommandsLoader(AzCommandsLoader): - - def __init__(self, cli_ctx=None): - spring_cloud_custom = CliCommandType( - operations_tmpl='azext_spring_cloud.custom#{}', - client_factory=cf_spring_cloud) - super(spring_cloudCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=spring_cloud_custom) - - def load_command_table(self, args): - load_command_table(self, args) - return self.command_table - - def load_arguments(self, command): - load_arguments(self, command) - - -COMMAND_LOADER_CLS = spring_cloudCommandsLoader +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +from azure.cli.core.commands import CliCommandType +from azext_spring_cloud._help import helps # pylint: disable=unused-import +from azext_spring_cloud._client_factory import cf_spring_cloud +from azext_spring_cloud.commands import load_command_table +from azext_spring_cloud._params import load_arguments + + +class spring_cloudCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + spring_cloud_custom = CliCommandType( + operations_tmpl='azext_spring_cloud.custom#{}', + client_factory=cf_spring_cloud) + super(spring_cloudCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=spring_cloud_custom) + + def load_command_table(self, args): + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + load_arguments(self, command) + + +COMMAND_LOADER_CLS = spring_cloudCommandsLoader diff --git a/src/spring-cloud/azext_spring_cloud/_validators.py b/src/spring-cloud/azext_spring_cloud/_validators.py index 3bdc2161c2d..ecda64b019b 100644 --- a/src/spring-cloud/azext_spring_cloud/_validators.py +++ b/src/spring-cloud/azext_spring_cloud/_validators.py @@ -333,17 +333,23 @@ def _validate_subnet(namespace, subnet): def _get_vnet(cmd, vnet_id): vnet = parse_resource_id(vnet_id) - network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) - return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) - - -def _get_network_client(cli_ctx, subscription_id=None): - from azure.cli.core.profiles import ResourceType, get_api_version - from azure.cli.core.commands.client_factory import get_mgmt_service_client - return get_mgmt_service_client(cli_ctx, - ResourceType.MGMT_NETWORK, - subscription_id=subscription_id, - api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) + # network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) + # return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) + get_args = { + 'name': vnet['resource_name'], + 'resource_group': vnet['resource_group'] + } + from .aaz.latest.network.vnet import Show as VirtualNetworkShow + return VirtualNetworkShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) + + +# def _get_network_client(cli_ctx, subscription_id=None): +# from azure.cli.core.profiles import ResourceType, get_api_version +# from azure.cli.core.commands.client_factory import get_mgmt_service_client +# return get_mgmt_service_client(cli_ctx, +# ResourceType.MGMT_NETWORK, +# subscription_id=subscription_id, +# api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) def _get_authorization_client(cli_ctx, subscription_id=None): diff --git a/src/spring-cloud/azext_spring_cloud/aaz/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py new file mode 100644 index 00000000000..7582bb60b24 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Network resources. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py new file mode 100644 index 00000000000..4099513f8aa --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py @@ -0,0 +1,22 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class __CMDGroup(AAZCommandGroup): + """Check if a private IP address is available for use within a virtual network. + + To learn more about Virtual Networks visit https://docs.microsoft.com/azure/virtual-network/virtual-network-manage-network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py new file mode 100644 index 00000000000..cb097da9151 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py @@ -0,0 +1,2450 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Show(AAZCommand): + """Get the details of a virtual network. + + :example: Get details for MyVNet. + az network vnet show -g MyResourceGroup -n MyVNet + """ + + _aaz_info = { + "version": "2022-01-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}", "2022-01-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The virtual network (VNet) name.", + required=True, + id_part="name", + ) + _args_schema.expand = AAZStrArg( + options=["--expand"], + help="Expands referenced resources. Default value is None.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworksGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VirtualNetworksGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "virtualNetworkName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$expand", self.ctx.args.expand, + ), + **self.serialize_query_param( + "api-version", "2022-01-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.etag = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + _ShowHelper._build_schema_extended_location_read(_schema_on_200.extended_location) + _schema_on_200.id = AAZStrType() + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.address_space = AAZObjectType( + serialized_name="addressSpace", + ) + _ShowHelper._build_schema_address_space_read(properties.address_space) + properties.bgp_communities = AAZObjectType( + serialized_name="bgpCommunities", + ) + properties.ddos_protection_plan = AAZObjectType( + serialized_name="ddosProtectionPlan", + ) + properties.dhcp_options = AAZObjectType( + serialized_name="dhcpOptions", + ) + properties.enable_ddos_protection = AAZBoolType( + serialized_name="enableDdosProtection", + ) + properties.enable_vm_protection = AAZBoolType( + serialized_name="enableVmProtection", + ) + properties.encryption = AAZObjectType() + properties.flow_timeout_in_minutes = AAZIntType( + serialized_name="flowTimeoutInMinutes", + ) + properties.ip_allocations = AAZListType( + serialized_name="ipAllocations", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.subnets = AAZListType() + properties.virtual_network_peerings = AAZListType( + serialized_name="virtualNetworkPeerings", + ) + + bgp_communities = cls._schema_on_200.properties.bgp_communities + bgp_communities.regional_community = AAZStrType( + serialized_name="regionalCommunity", + flags={"read_only": True}, + ) + bgp_communities.virtual_network_community = AAZStrType( + serialized_name="virtualNetworkCommunity", + flags={"required": True}, + ) + + ddos_protection_plan = cls._schema_on_200.properties.ddos_protection_plan + ddos_protection_plan.id = AAZStrType() + + dhcp_options = cls._schema_on_200.properties.dhcp_options + dhcp_options.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + + dns_servers = cls._schema_on_200.properties.dhcp_options.dns_servers + dns_servers.Element = AAZStrType() + + encryption = cls._schema_on_200.properties.encryption + encryption.enabled = AAZBoolType( + flags={"required": True}, + ) + encryption.enforcement = AAZStrType() + + ip_allocations = cls._schema_on_200.properties.ip_allocations + ip_allocations.Element = AAZObjectType() + _ShowHelper._build_schema_sub_resource_read(ip_allocations.Element) + + subnets = cls._schema_on_200.properties.subnets + subnets.Element = AAZObjectType() + _ShowHelper._build_schema_subnet_read(subnets.Element) + + virtual_network_peerings = cls._schema_on_200.properties.virtual_network_peerings + virtual_network_peerings.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.virtual_network_peerings.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = cls._schema_on_200.properties.virtual_network_peerings.Element.properties + properties.allow_forwarded_traffic = AAZBoolType( + serialized_name="allowForwardedTraffic", + ) + properties.allow_gateway_transit = AAZBoolType( + serialized_name="allowGatewayTransit", + ) + properties.allow_virtual_network_access = AAZBoolType( + serialized_name="allowVirtualNetworkAccess", + ) + properties.do_not_verify_remote_gateways = AAZBoolType( + serialized_name="doNotVerifyRemoteGateways", + ) + properties.peering_state = AAZStrType( + serialized_name="peeringState", + ) + properties.peering_sync_level = AAZStrType( + serialized_name="peeringSyncLevel", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_address_space = AAZObjectType( + serialized_name="remoteAddressSpace", + ) + _ShowHelper._build_schema_address_space_read(properties.remote_address_space) + properties.remote_bgp_communities = AAZObjectType( + serialized_name="remoteBgpCommunities", + ) + properties.remote_virtual_network = AAZObjectType( + serialized_name="remoteVirtualNetwork", + ) + _ShowHelper._build_schema_sub_resource_read(properties.remote_virtual_network) + properties.remote_virtual_network_address_space = AAZObjectType( + serialized_name="remoteVirtualNetworkAddressSpace", + ) + _ShowHelper._build_schema_address_space_read(properties.remote_virtual_network_address_space) + properties.remote_virtual_network_encryption = AAZObjectType( + serialized_name="remoteVirtualNetworkEncryption", + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.use_remote_gateways = AAZBoolType( + serialized_name="useRemoteGateways", + ) + + remote_bgp_communities = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_bgp_communities + remote_bgp_communities.regional_community = AAZStrType( + serialized_name="regionalCommunity", + flags={"read_only": True}, + ) + remote_bgp_communities.virtual_network_community = AAZStrType( + serialized_name="virtualNetworkCommunity", + flags={"required": True}, + ) + + remote_virtual_network_encryption = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_virtual_network_encryption + remote_virtual_network_encryption.enabled = AAZBoolType( + flags={"required": True}, + ) + remote_virtual_network_encryption.enforcement = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_address_space_read = None + + @classmethod + def _build_schema_address_space_read(cls, _schema): + if cls._schema_address_space_read is not None: + _schema.address_prefixes = cls._schema_address_space_read.address_prefixes + return + + cls._schema_address_space_read = _schema_address_space_read = AAZObjectType() + + address_space_read = _schema_address_space_read + address_space_read.address_prefixes = AAZListType( + serialized_name="addressPrefixes", + ) + + address_prefixes = _schema_address_space_read.address_prefixes + address_prefixes.Element = AAZStrType() + + _schema.address_prefixes = cls._schema_address_space_read.address_prefixes + + _schema_application_security_group_read = None + + @classmethod + def _build_schema_application_security_group_read(cls, _schema): + if cls._schema_application_security_group_read is not None: + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + return + + cls._schema_application_security_group_read = _schema_application_security_group_read = AAZObjectType() + + application_security_group_read = _schema_application_security_group_read + application_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.id = AAZStrType() + application_security_group_read.location = AAZStrType() + application_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + application_security_group_read.tags = AAZDictType() + application_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_application_security_group_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + tags = _schema_application_security_group_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + + _schema_extended_location_read = None + + @classmethod + def _build_schema_extended_location_read(cls, _schema): + if cls._schema_extended_location_read is not None: + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + return + + cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType() + + extended_location_read = _schema_extended_location_read + extended_location_read.name = AAZStrType() + extended_location_read.type = AAZStrType() + + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + + _schema_frontend_ip_configuration_read = None + + @classmethod + def _build_schema_frontend_ip_configuration_read(cls, _schema): + if cls._schema_frontend_ip_configuration_read is not None: + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + return + + cls._schema_frontend_ip_configuration_read = _schema_frontend_ip_configuration_read = AAZObjectType() + + frontend_ip_configuration_read = _schema_frontend_ip_configuration_read + frontend_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.id = AAZStrType() + frontend_ip_configuration_read.name = AAZStrType() + frontend_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + frontend_ip_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.zones = AAZListType() + + properties = _schema_frontend_ip_configuration_read.properties + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.inbound_nat_pools = AAZListType( + serialized_name="inboundNatPools", + flags={"read_only": True}, + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + ) + cls._build_schema_sub_resource_read(properties.public_ip_prefix) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + inbound_nat_pools = _schema_frontend_ip_configuration_read.properties.inbound_nat_pools + inbound_nat_pools.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_pools.Element) + + inbound_nat_rules = _schema_frontend_ip_configuration_read.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancing_rules = _schema_frontend_ip_configuration_read.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_frontend_ip_configuration_read.properties.outbound_rules + outbound_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(outbound_rules.Element) + + zones = _schema_frontend_ip_configuration_read.zones + zones.Element = AAZStrType() + + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + + _schema_ip_configuration_read = None + + @classmethod + def _build_schema_ip_configuration_read(cls, _schema): + if cls._schema_ip_configuration_read is not None: + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + return + + cls._schema_ip_configuration_read = _schema_ip_configuration_read = AAZObjectType() + + ip_configuration_read = _schema_ip_configuration_read + ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + ip_configuration_read.id = AAZStrType() + ip_configuration_read.name = AAZStrType() + ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_ip_configuration_read.properties + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + + _schema_network_interface_ip_configuration_read = None + + @classmethod + def _build_schema_network_interface_ip_configuration_read(cls, _schema): + if cls._schema_network_interface_ip_configuration_read is not None: + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + return + + cls._schema_network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read = AAZObjectType() + + network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read + network_interface_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_ip_configuration_read.id = AAZStrType() + network_interface_ip_configuration_read.name = AAZStrType() + network_interface_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_ip_configuration_read.type = AAZStrType() + + properties = _schema_network_interface_ip_configuration_read.properties + properties.application_gateway_backend_address_pools = AAZListType( + serialized_name="applicationGatewayBackendAddressPools", + ) + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + ) + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.load_balancer_backend_address_pools = AAZListType( + serialized_name="loadBalancerBackendAddressPools", + ) + properties.load_balancer_inbound_nat_rules = AAZListType( + serialized_name="loadBalancerInboundNatRules", + ) + properties.primary = AAZBoolType() + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.private_link_connection_properties = AAZObjectType( + serialized_name="privateLinkConnectionProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + properties.virtual_network_taps = AAZListType( + serialized_name="virtualNetworkTaps", + ) + + application_gateway_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools + application_gateway_backend_address_pools.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties + properties.backend_addresses = AAZListType( + serialized_name="backendAddresses", + ) + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + backend_addresses = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses + backend_addresses.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses.Element + _element.fqdn = AAZStrType() + _element.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + application_security_groups = _schema_network_interface_ip_configuration_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(application_security_groups.Element) + + load_balancer_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools + load_balancer_backend_address_pools.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.drain_period_in_seconds = AAZIntType( + serialized_name="drainPeriodInSeconds", + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancer_backend_addresses = AAZListType( + serialized_name="loadBalancerBackendAddresses", + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.location = AAZStrType() + properties.outbound_rule = AAZObjectType( + serialized_name="outboundRule", + ) + cls._build_schema_sub_resource_read(properties.outbound_rule) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.tunnel_interfaces = AAZListType( + serialized_name="tunnelInterfaces", + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancer_backend_addresses = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses + load_balancer_backend_addresses.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties + properties.admin_state = AAZStrType( + serialized_name="adminState", + ) + properties.inbound_nat_rules_port_mapping = AAZListType( + serialized_name="inboundNatRulesPortMapping", + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.load_balancer_frontend_ip_configuration = AAZObjectType( + serialized_name="loadBalancerFrontendIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration) + properties.network_interface_ip_configuration = AAZObjectType( + serialized_name="networkInterfaceIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration) + properties.subnet = AAZObjectType() + cls._build_schema_sub_resource_read(properties.subnet) + properties.virtual_network = AAZObjectType( + serialized_name="virtualNetwork", + ) + cls._build_schema_sub_resource_read(properties.virtual_network) + + inbound_nat_rules_port_mapping = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping + inbound_nat_rules_port_mapping.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping.Element + _element.backend_port = AAZIntType( + serialized_name="backendPort", + ) + _element.frontend_port = AAZIntType( + serialized_name="frontendPort", + ) + _element.inbound_nat_rule_name = AAZStrType( + serialized_name="inboundNatRuleName", + ) + + load_balancing_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.outbound_rules + outbound_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(outbound_rules.Element) + + tunnel_interfaces = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces + tunnel_interfaces.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces.Element + _element.identifier = AAZIntType() + _element.port = AAZIntType() + _element.protocol = AAZStrType() + _element.type = AAZStrType() + + load_balancer_inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules + load_balancer_inbound_nat_rules.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element.properties + properties.backend_address_pool = AAZObjectType( + serialized_name="backendAddressPool", + ) + cls._build_schema_sub_resource_read(properties.backend_address_pool) + properties.backend_ip_configuration = AAZObjectType( + serialized_name="backendIPConfiguration", + ) + cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration) + properties.backend_port = AAZIntType( + serialized_name="backendPort", + ) + properties.enable_floating_ip = AAZBoolType( + serialized_name="enableFloatingIP", + ) + properties.enable_tcp_reset = AAZBoolType( + serialized_name="enableTcpReset", + ) + properties.frontend_ip_configuration = AAZObjectType( + serialized_name="frontendIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.frontend_ip_configuration) + properties.frontend_port = AAZIntType( + serialized_name="frontendPort", + ) + properties.frontend_port_range_end = AAZIntType( + serialized_name="frontendPortRangeEnd", + ) + properties.frontend_port_range_start = AAZIntType( + serialized_name="frontendPortRangeStart", + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.protocol = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_link_connection_properties = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties + private_link_connection_properties.fqdns = AAZListType( + flags={"read_only": True}, + ) + private_link_connection_properties.group_id = AAZStrType( + serialized_name="groupId", + flags={"read_only": True}, + ) + private_link_connection_properties.required_member_name = AAZStrType( + serialized_name="requiredMemberName", + flags={"read_only": True}, + ) + + fqdns = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties.fqdns + fqdns.Element = AAZStrType() + + virtual_network_taps = _schema_network_interface_ip_configuration_read.properties.virtual_network_taps + virtual_network_taps.Element = AAZObjectType() + cls._build_schema_virtual_network_tap_read(virtual_network_taps.Element) + + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + + _schema_network_interface_tap_configuration_read = None + + @classmethod + def _build_schema_network_interface_tap_configuration_read(cls, _schema): + if cls._schema_network_interface_tap_configuration_read is not None: + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + return + + cls._schema_network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read = AAZObjectType() + + network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read + network_interface_tap_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_tap_configuration_read.id = AAZStrType() + network_interface_tap_configuration_read.name = AAZStrType() + network_interface_tap_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_tap_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_tap_configuration_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.virtual_network_tap = AAZObjectType( + serialized_name="virtualNetworkTap", + ) + cls._build_schema_virtual_network_tap_read(properties.virtual_network_tap) + + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + + _schema_network_interface_read = None + + @classmethod + def _build_schema_network_interface_read(cls, _schema): + if cls._schema_network_interface_read is not None: + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + return + + cls._schema_network_interface_read = _schema_network_interface_read = AAZObjectType() + + network_interface_read = _schema_network_interface_read + network_interface_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(network_interface_read.extended_location) + network_interface_read.id = AAZStrType() + network_interface_read.location = AAZStrType() + network_interface_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_read.tags = AAZDictType() + network_interface_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties + properties.auxiliary_mode = AAZStrType( + serialized_name="auxiliaryMode", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + ) + properties.dscp_configuration = AAZObjectType( + serialized_name="dscpConfiguration", + ) + cls._build_schema_sub_resource_read(properties.dscp_configuration) + properties.enable_accelerated_networking = AAZBoolType( + serialized_name="enableAcceleratedNetworking", + ) + properties.enable_ip_forwarding = AAZBoolType( + serialized_name="enableIPForwarding", + ) + properties.hosted_workloads = AAZListType( + serialized_name="hostedWorkloads", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.mac_address = AAZStrType( + serialized_name="macAddress", + flags={"read_only": True}, + ) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + ) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.nic_type = AAZStrType( + serialized_name="nicType", + ) + properties.primary = AAZBoolType( + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service = AAZObjectType( + serialized_name="privateLinkService", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.tap_configurations = AAZListType( + serialized_name="tapConfigurations", + flags={"read_only": True}, + ) + properties.virtual_machine = AAZObjectType( + serialized_name="virtualMachine", + ) + cls._build_schema_sub_resource_read(properties.virtual_machine) + properties.vnet_encryption_supported = AAZBoolType( + serialized_name="vnetEncryptionSupported", + flags={"read_only": True}, + ) + properties.workload_type = AAZStrType( + serialized_name="workloadType", + ) + + dns_settings = _schema_network_interface_read.properties.dns_settings + dns_settings.applied_dns_servers = AAZListType( + serialized_name="appliedDnsServers", + flags={"read_only": True}, + ) + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.internal_dns_name_label = AAZStrType( + serialized_name="internalDnsNameLabel", + ) + dns_settings.internal_domain_name_suffix = AAZStrType( + serialized_name="internalDomainNameSuffix", + flags={"read_only": True}, + ) + dns_settings.internal_fqdn = AAZStrType( + serialized_name="internalFqdn", + flags={"read_only": True}, + ) + + applied_dns_servers = _schema_network_interface_read.properties.dns_settings.applied_dns_servers + applied_dns_servers.Element = AAZStrType() + + dns_servers = _schema_network_interface_read.properties.dns_settings.dns_servers + dns_servers.Element = AAZStrType() + + hosted_workloads = _schema_network_interface_read.properties.hosted_workloads + hosted_workloads.Element = AAZStrType() + + ip_configurations = _schema_network_interface_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(ip_configurations.Element) + + private_link_service = _schema_network_interface_read.properties.private_link_service + private_link_service.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_link_service.extended_location) + private_link_service.id = AAZStrType() + private_link_service.location = AAZStrType() + private_link_service.name = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_link_service.tags = AAZDictType() + private_link_service.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties + properties.alias = AAZStrType( + flags={"read_only": True}, + ) + properties.auto_approval = AAZObjectType( + serialized_name="autoApproval", + ) + properties.enable_proxy_protocol = AAZBoolType( + serialized_name="enableProxyProtocol", + ) + properties.fqdns = AAZListType() + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.load_balancer_frontend_ip_configurations = AAZListType( + serialized_name="loadBalancerFrontendIpConfigurations", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.visibility = AAZObjectType() + + auto_approval = _schema_network_interface_read.properties.private_link_service.properties.auto_approval + auto_approval.subscriptions = AAZListType() + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.auto_approval.subscriptions + subscriptions.Element = AAZStrType() + + fqdns = _schema_network_interface_read.properties.private_link_service.properties.fqdns + fqdns.Element = AAZStrType() + + ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + + _element = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element.properties + properties.primary = AAZBoolType() + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + load_balancer_frontend_ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.load_balancer_frontend_ip_configurations + load_balancer_frontend_ip_configurations.Element = AAZObjectType() + cls._build_schema_frontend_ip_configuration_read(load_balancer_frontend_ip_configurations.Element) + + network_interfaces = _schema_network_interface_read.properties.private_link_service.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_endpoint_connections = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element.properties + properties.link_identifier = AAZStrType( + serialized_name="linkIdentifier", + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + visibility = _schema_network_interface_read.properties.private_link_service.properties.visibility + visibility.subscriptions = AAZListType() + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.visibility.subscriptions + subscriptions.Element = AAZStrType() + + tags = _schema_network_interface_read.properties.private_link_service.tags + tags.Element = AAZStrType() + + tap_configurations = _schema_network_interface_read.properties.tap_configurations + tap_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_tap_configuration_read(tap_configurations.Element) + + tags = _schema_network_interface_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + + _schema_network_security_group_read = None + + @classmethod + def _build_schema_network_security_group_read(cls, _schema): + if cls._schema_network_security_group_read is not None: + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + return + + cls._schema_network_security_group_read = _schema_network_security_group_read = AAZObjectType() + + network_security_group_read = _schema_network_security_group_read + network_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.id = AAZStrType() + network_security_group_read.location = AAZStrType() + network_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_security_group_read.tags = AAZDictType() + network_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties + properties.default_security_rules = AAZListType( + serialized_name="defaultSecurityRules", + flags={"read_only": True}, + ) + properties.flow_logs = AAZListType( + serialized_name="flowLogs", + flags={"read_only": True}, + ) + properties.flush_connection = AAZBoolType( + serialized_name="flushConnection", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.security_rules = AAZListType( + serialized_name="securityRules", + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + default_security_rules = _schema_network_security_group_read.properties.default_security_rules + default_security_rules.Element = AAZObjectType() + cls._build_schema_security_rule_read(default_security_rules.Element) + + flow_logs = _schema_network_security_group_read.properties.flow_logs + flow_logs.Element = AAZObjectType() + + _element = _schema_network_security_group_read.properties.flow_logs.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties.flow_logs.Element.properties + properties.enabled = AAZBoolType() + properties.flow_analytics_configuration = AAZObjectType( + serialized_name="flowAnalyticsConfiguration", + ) + properties.format = AAZObjectType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention_policy = AAZObjectType( + serialized_name="retentionPolicy", + ) + properties.storage_id = AAZStrType( + serialized_name="storageId", + flags={"required": True}, + ) + properties.target_resource_guid = AAZStrType( + serialized_name="targetResourceGuid", + flags={"read_only": True}, + ) + properties.target_resource_id = AAZStrType( + serialized_name="targetResourceId", + flags={"required": True}, + ) + + flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration + flow_analytics_configuration.network_watcher_flow_analytics_configuration = AAZObjectType( + serialized_name="networkWatcherFlowAnalyticsConfiguration", + ) + + network_watcher_flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration.network_watcher_flow_analytics_configuration + network_watcher_flow_analytics_configuration.enabled = AAZBoolType() + network_watcher_flow_analytics_configuration.traffic_analytics_interval = AAZIntType( + serialized_name="trafficAnalyticsInterval", + ) + network_watcher_flow_analytics_configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + ) + network_watcher_flow_analytics_configuration.workspace_region = AAZStrType( + serialized_name="workspaceRegion", + ) + network_watcher_flow_analytics_configuration.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + ) + + format = _schema_network_security_group_read.properties.flow_logs.Element.properties.format + format.type = AAZStrType() + format.version = AAZIntType() + + retention_policy = _schema_network_security_group_read.properties.flow_logs.Element.properties.retention_policy + retention_policy.days = AAZIntType() + retention_policy.enabled = AAZBoolType() + + tags = _schema_network_security_group_read.properties.flow_logs.Element.tags + tags.Element = AAZStrType() + + network_interfaces = _schema_network_security_group_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + security_rules = _schema_network_security_group_read.properties.security_rules + security_rules.Element = AAZObjectType() + cls._build_schema_security_rule_read(security_rules.Element) + + subnets = _schema_network_security_group_read.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_network_security_group_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + + _schema_private_endpoint_read = None + + @classmethod + def _build_schema_private_endpoint_read(cls, _schema): + if cls._schema_private_endpoint_read is not None: + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + return + + cls._schema_private_endpoint_read = _schema_private_endpoint_read = AAZObjectType() + + private_endpoint_read = _schema_private_endpoint_read + private_endpoint_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_endpoint_read.extended_location) + private_endpoint_read.id = AAZStrType() + private_endpoint_read.location = AAZStrType() + private_endpoint_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_endpoint_read.tags = AAZDictType() + private_endpoint_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + ) + properties.custom_dns_configs = AAZListType( + serialized_name="customDnsConfigs", + ) + properties.custom_network_interface_name = AAZStrType( + serialized_name="customNetworkInterfaceName", + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.manual_private_link_service_connections = AAZListType( + serialized_name="manualPrivateLinkServiceConnections", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_link_service_connections = AAZListType( + serialized_name="privateLinkServiceConnections", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + application_security_groups = _schema_private_endpoint_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(application_security_groups.Element) + + custom_dns_configs = _schema_private_endpoint_read.properties.custom_dns_configs + custom_dns_configs.Element = AAZObjectType() + + _element = _schema_private_endpoint_read.properties.custom_dns_configs.Element + _element.fqdn = AAZStrType() + _element.ip_addresses = AAZListType( + serialized_name="ipAddresses", + ) + + ip_addresses = _schema_private_endpoint_read.properties.custom_dns_configs.Element.ip_addresses + ip_addresses.Element = AAZStrType() + + ip_configurations = _schema_private_endpoint_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + + _element = _schema_private_endpoint_read.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties.ip_configurations.Element.properties + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.member_name = AAZStrType( + serialized_name="memberName", + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + + manual_private_link_service_connections = _schema_private_endpoint_read.properties.manual_private_link_service_connections + manual_private_link_service_connections.Element = AAZObjectType() + cls._build_schema_private_link_service_connection_read(manual_private_link_service_connections.Element) + + network_interfaces = _schema_private_endpoint_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_link_service_connections = _schema_private_endpoint_read.properties.private_link_service_connections + private_link_service_connections.Element = AAZObjectType() + cls._build_schema_private_link_service_connection_read(private_link_service_connections.Element) + + tags = _schema_private_endpoint_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + + _schema_private_link_service_connection_state_read = None + + @classmethod + def _build_schema_private_link_service_connection_state_read(cls, _schema): + if cls._schema_private_link_service_connection_state_read is not None: + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + return + + cls._schema_private_link_service_connection_state_read = _schema_private_link_service_connection_state_read = AAZObjectType() + + private_link_service_connection_state_read = _schema_private_link_service_connection_state_read + private_link_service_connection_state_read.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state_read.description = AAZStrType() + private_link_service_connection_state_read.status = AAZStrType() + + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + + _schema_private_link_service_connection_read = None + + @classmethod + def _build_schema_private_link_service_connection_read(cls, _schema): + if cls._schema_private_link_service_connection_read is not None: + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + return + + cls._schema_private_link_service_connection_read = _schema_private_link_service_connection_read = AAZObjectType() + + private_link_service_connection_read = _schema_private_link_service_connection_read + private_link_service_connection_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service_connection_read.id = AAZStrType() + private_link_service_connection_read.name = AAZStrType() + private_link_service_connection_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_link_service_connection_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_link_service_connection_read.properties + properties.group_ids = AAZListType( + serialized_name="groupIds", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.private_link_service_id = AAZStrType( + serialized_name="privateLinkServiceId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.request_message = AAZStrType( + serialized_name="requestMessage", + ) + + group_ids = _schema_private_link_service_connection_read.properties.group_ids + group_ids.Element = AAZStrType() + + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + + _schema_public_ip_address_read = None + + @classmethod + def _build_schema_public_ip_address_read(cls, _schema): + if cls._schema_public_ip_address_read is not None: + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + return + + cls._schema_public_ip_address_read = _schema_public_ip_address_read = AAZObjectType() + + public_ip_address_read = _schema_public_ip_address_read + public_ip_address_read.etag = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(public_ip_address_read.extended_location) + public_ip_address_read.id = AAZStrType() + public_ip_address_read.location = AAZStrType() + public_ip_address_read.name = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + public_ip_address_read.sku = AAZObjectType() + public_ip_address_read.tags = AAZDictType() + public_ip_address_read.type = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties + properties.ddos_settings = AAZObjectType( + serialized_name="ddosSettings", + ) + properties.delete_option = AAZStrType( + serialized_name="deleteOption", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.ip_configuration = AAZObjectType( + serialized_name="ipConfiguration", + ) + cls._build_schema_ip_configuration_read(properties.ip_configuration) + properties.ip_tags = AAZListType( + serialized_name="ipTags", + ) + properties.linked_public_ip_address = AAZObjectType( + serialized_name="linkedPublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.linked_public_ip_address) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address_version = AAZStrType( + serialized_name="publicIPAddressVersion", + ) + properties.public_ip_allocation_method = AAZStrType( + serialized_name="publicIPAllocationMethod", + ) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + ) + cls._build_schema_sub_resource_read(properties.public_ip_prefix) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_public_ip_address = AAZObjectType( + serialized_name="servicePublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.service_public_ip_address) + + ddos_settings = _schema_public_ip_address_read.properties.ddos_settings + ddos_settings.ddos_custom_policy = AAZObjectType( + serialized_name="ddosCustomPolicy", + ) + cls._build_schema_sub_resource_read(ddos_settings.ddos_custom_policy) + ddos_settings.protected_ip = AAZBoolType( + serialized_name="protectedIP", + ) + ddos_settings.protection_coverage = AAZStrType( + serialized_name="protectionCoverage", + ) + + dns_settings = _schema_public_ip_address_read.properties.dns_settings + dns_settings.domain_name_label = AAZStrType( + serialized_name="domainNameLabel", + ) + dns_settings.fqdn = AAZStrType() + dns_settings.reverse_fqdn = AAZStrType( + serialized_name="reverseFqdn", + ) + + ip_tags = _schema_public_ip_address_read.properties.ip_tags + ip_tags.Element = AAZObjectType() + + _element = _schema_public_ip_address_read.properties.ip_tags.Element + _element.ip_tag_type = AAZStrType( + serialized_name="ipTagType", + ) + _element.tag = AAZStrType() + + nat_gateway = _schema_public_ip_address_read.properties.nat_gateway + nat_gateway.etag = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.id = AAZStrType() + nat_gateway.location = AAZStrType() + nat_gateway.name = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + nat_gateway.sku = AAZObjectType() + nat_gateway.tags = AAZDictType() + nat_gateway.type = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties.nat_gateway.properties + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_addresses = AAZListType( + serialized_name="publicIpAddresses", + ) + properties.public_ip_prefixes = AAZListType( + serialized_name="publicIpPrefixes", + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + public_ip_addresses = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + cls._build_schema_sub_resource_read(public_ip_addresses.Element) + + public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes + public_ip_prefixes.Element = AAZObjectType() + cls._build_schema_sub_resource_read(public_ip_prefixes.Element) + + subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_sub_resource_read(subnets.Element) + + sku = _schema_public_ip_address_read.properties.nat_gateway.sku + sku.name = AAZStrType() + + tags = _schema_public_ip_address_read.properties.nat_gateway.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.properties.nat_gateway.zones + zones.Element = AAZStrType() + + sku = _schema_public_ip_address_read.sku + sku.name = AAZStrType() + sku.tier = AAZStrType() + + tags = _schema_public_ip_address_read.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.zones + zones.Element = AAZStrType() + + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + + _schema_security_rule_read = None + + @classmethod + def _build_schema_security_rule_read(cls, _schema): + if cls._schema_security_rule_read is not None: + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + return + + cls._schema_security_rule_read = _schema_security_rule_read = AAZObjectType() + + security_rule_read = _schema_security_rule_read + security_rule_read.etag = AAZStrType( + flags={"read_only": True}, + ) + security_rule_read.id = AAZStrType() + security_rule_read.name = AAZStrType() + security_rule_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + security_rule_read.type = AAZStrType() + + properties = _schema_security_rule_read.properties + properties.access = AAZStrType( + flags={"required": True}, + ) + properties.description = AAZStrType() + properties.destination_address_prefix = AAZStrType( + serialized_name="destinationAddressPrefix", + ) + properties.destination_address_prefixes = AAZListType( + serialized_name="destinationAddressPrefixes", + ) + properties.destination_application_security_groups = AAZListType( + serialized_name="destinationApplicationSecurityGroups", + ) + properties.destination_port_range = AAZStrType( + serialized_name="destinationPortRange", + ) + properties.destination_port_ranges = AAZListType( + serialized_name="destinationPortRanges", + ) + properties.direction = AAZStrType( + flags={"required": True}, + ) + properties.priority = AAZIntType() + properties.protocol = AAZStrType( + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.source_address_prefix = AAZStrType( + serialized_name="sourceAddressPrefix", + ) + properties.source_address_prefixes = AAZListType( + serialized_name="sourceAddressPrefixes", + ) + properties.source_application_security_groups = AAZListType( + serialized_name="sourceApplicationSecurityGroups", + ) + properties.source_port_range = AAZStrType( + serialized_name="sourcePortRange", + ) + properties.source_port_ranges = AAZListType( + serialized_name="sourcePortRanges", + ) + + destination_address_prefixes = _schema_security_rule_read.properties.destination_address_prefixes + destination_address_prefixes.Element = AAZStrType() + + destination_application_security_groups = _schema_security_rule_read.properties.destination_application_security_groups + destination_application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(destination_application_security_groups.Element) + + destination_port_ranges = _schema_security_rule_read.properties.destination_port_ranges + destination_port_ranges.Element = AAZStrType() + + source_address_prefixes = _schema_security_rule_read.properties.source_address_prefixes + source_address_prefixes.Element = AAZStrType() + + source_application_security_groups = _schema_security_rule_read.properties.source_application_security_groups + source_application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(source_application_security_groups.Element) + + source_port_ranges = _schema_security_rule_read.properties.source_port_ranges + source_port_ranges.Element = AAZStrType() + + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + + _schema_sub_resource_read = None + + @classmethod + def _build_schema_sub_resource_read(cls, _schema): + if cls._schema_sub_resource_read is not None: + _schema.id = cls._schema_sub_resource_read.id + return + + cls._schema_sub_resource_read = _schema_sub_resource_read = AAZObjectType() + + sub_resource_read = _schema_sub_resource_read + sub_resource_read.id = AAZStrType() + + _schema.id = cls._schema_sub_resource_read.id + + _schema_subnet_read = None + + @classmethod + def _build_schema_subnet_read(cls, _schema): + if cls._schema_subnet_read is not None: + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + return + + cls._schema_subnet_read = _schema_subnet_read = AAZObjectType() + + subnet_read = _schema_subnet_read + subnet_read.etag = AAZStrType( + flags={"read_only": True}, + ) + subnet_read.id = AAZStrType() + subnet_read.name = AAZStrType() + subnet_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + subnet_read.type = AAZStrType() + + properties = _schema_subnet_read.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + ) + properties.address_prefixes = AAZListType( + serialized_name="addressPrefixes", + ) + properties.application_gateway_ip_configurations = AAZListType( + serialized_name="applicationGatewayIpConfigurations", + ) + properties.delegations = AAZListType() + properties.ip_allocations = AAZListType( + serialized_name="ipAllocations", + ) + properties.ip_configuration_profiles = AAZListType( + serialized_name="ipConfigurationProfiles", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + flags={"read_only": True}, + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + ) + cls._build_schema_sub_resource_read(properties.nat_gateway) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.private_endpoint_network_policies = AAZStrType( + serialized_name="privateEndpointNetworkPolicies", + ) + properties.private_endpoints = AAZListType( + serialized_name="privateEndpoints", + flags={"read_only": True}, + ) + properties.private_link_service_network_policies = AAZStrType( + serialized_name="privateLinkServiceNetworkPolicies", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.purpose = AAZStrType( + flags={"read_only": True}, + ) + properties.resource_navigation_links = AAZListType( + serialized_name="resourceNavigationLinks", + flags={"read_only": True}, + ) + properties.route_table = AAZObjectType( + serialized_name="routeTable", + ) + properties.service_association_links = AAZListType( + serialized_name="serviceAssociationLinks", + flags={"read_only": True}, + ) + properties.service_endpoint_policies = AAZListType( + serialized_name="serviceEndpointPolicies", + ) + properties.service_endpoints = AAZListType( + serialized_name="serviceEndpoints", + ) + + address_prefixes = _schema_subnet_read.properties.address_prefixes + address_prefixes.Element = AAZStrType() + + application_gateway_ip_configurations = _schema_subnet_read.properties.application_gateway_ip_configurations + application_gateway_ip_configurations.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.application_gateway_ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.application_gateway_ip_configurations.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_sub_resource_read(properties.subnet) + + delegations = _schema_subnet_read.properties.delegations + delegations.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.delegations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.delegations.Element.properties + properties.actions = AAZListType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_name = AAZStrType( + serialized_name="serviceName", + ) + + actions = _schema_subnet_read.properties.delegations.Element.properties.actions + actions.Element = AAZStrType() + + ip_allocations = _schema_subnet_read.properties.ip_allocations + ip_allocations.Element = AAZObjectType() + cls._build_schema_sub_resource_read(ip_allocations.Element) + + ip_configuration_profiles = _schema_subnet_read.properties.ip_configuration_profiles + ip_configuration_profiles.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.ip_configuration_profiles.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.ip_configuration_profiles.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + ip_configurations = _schema_subnet_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + cls._build_schema_ip_configuration_read(ip_configurations.Element) + + private_endpoints = _schema_subnet_read.properties.private_endpoints + private_endpoints.Element = AAZObjectType() + cls._build_schema_private_endpoint_read(private_endpoints.Element) + + resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links + resource_navigation_links.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.resource_navigation_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.resource_navigation_links.Element.properties + properties.link = AAZStrType() + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + route_table = _schema_subnet_read.properties.route_table + route_table.etag = AAZStrType( + flags={"read_only": True}, + ) + route_table.id = AAZStrType() + route_table.location = AAZStrType() + route_table.name = AAZStrType( + flags={"read_only": True}, + ) + route_table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + route_table.tags = AAZDictType() + route_table.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.route_table.properties + properties.disable_bgp_route_propagation = AAZBoolType( + serialized_name="disableBgpRoutePropagation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.routes = AAZListType() + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + routes = _schema_subnet_read.properties.route_table.properties.routes + routes.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.route_table.properties.routes.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.route_table.properties.routes.Element.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + ) + properties.has_bgp_override = AAZBoolType( + serialized_name="hasBgpOverride", + ) + properties.next_hop_ip_address = AAZStrType( + serialized_name="nextHopIpAddress", + ) + properties.next_hop_type = AAZStrType( + serialized_name="nextHopType", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + subnets = _schema_subnet_read.properties.route_table.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.route_table.tags + tags.Element = AAZStrType() + + service_association_links = _schema_subnet_read.properties.service_association_links + service_association_links.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_association_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_association_links.Element.properties + properties.allow_delete = AAZBoolType( + serialized_name="allowDelete", + ) + properties.link = AAZStrType() + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + ) + properties.locations = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + locations = _schema_subnet_read.properties.service_association_links.Element.properties.locations + locations.Element = AAZStrType() + + service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies + service_endpoint_policies.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.kind = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties + properties.contextual_service_endpoint_policies = AAZListType( + serialized_name="contextualServiceEndpointPolicies", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_alias = AAZStrType( + serialized_name="serviceAlias", + ) + properties.service_endpoint_policy_definitions = AAZListType( + serialized_name="serviceEndpointPolicyDefinitions", + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + contextual_service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.contextual_service_endpoint_policies + contextual_service_endpoint_policies.Element = AAZStrType() + + service_endpoint_policy_definitions = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions + service_endpoint_policy_definitions.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service = AAZStrType() + properties.service_resources = AAZListType( + serialized_name="serviceResources", + ) + + service_resources = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties.service_resources + service_resources.Element = AAZStrType() + + subnets = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.service_endpoint_policies.Element.tags + tags.Element = AAZStrType() + + service_endpoints = _schema_subnet_read.properties.service_endpoints + service_endpoints.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoints.Element + _element.locations = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + _element.service = AAZStrType() + + locations = _schema_subnet_read.properties.service_endpoints.Element.locations + locations.Element = AAZStrType() + + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + + _schema_virtual_network_tap_read = None + + @classmethod + def _build_schema_virtual_network_tap_read(cls, _schema): + if cls._schema_virtual_network_tap_read is not None: + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + return + + cls._schema_virtual_network_tap_read = _schema_virtual_network_tap_read = AAZObjectType() + + virtual_network_tap_read = _schema_virtual_network_tap_read + virtual_network_tap_read.etag = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.id = AAZStrType() + virtual_network_tap_read.location = AAZStrType() + virtual_network_tap_read.name = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + virtual_network_tap_read.tags = AAZDictType() + virtual_network_tap_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_virtual_network_tap_read.properties + properties.destination_load_balancer_front_end_ip_configuration = AAZObjectType( + serialized_name="destinationLoadBalancerFrontEndIPConfiguration", + ) + cls._build_schema_frontend_ip_configuration_read(properties.destination_load_balancer_front_end_ip_configuration) + properties.destination_network_interface_ip_configuration = AAZObjectType( + serialized_name="destinationNetworkInterfaceIPConfiguration", + ) + cls._build_schema_network_interface_ip_configuration_read(properties.destination_network_interface_ip_configuration) + properties.destination_port = AAZIntType( + serialized_name="destinationPort", + ) + properties.network_interface_tap_configurations = AAZListType( + serialized_name="networkInterfaceTapConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + network_interface_tap_configurations = _schema_virtual_network_tap_read.properties.network_interface_tap_configurations + network_interface_tap_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_tap_configuration_read(network_interface_tap_configurations.Element) + + tags = _schema_virtual_network_tap_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + + +__all__ = ["Show"] diff --git a/src/spring-cloud/azext_spring_cloud/azext_metadata.json b/src/spring-cloud/azext_spring_cloud/azext_metadata.json index afce12cdd37..91e03c05b84 100644 --- a/src/spring-cloud/azext_spring_cloud/azext_metadata.json +++ b/src/spring-cloud/azext_spring_cloud/azext_metadata.json @@ -1,4 +1,4 @@ -{ - "azext.isPreview": false, - "azext.minCliCoreVersion": "2.30.0" +{ + "azext.isPreview": false, + "azext.minCliCoreVersion": "2.45.0" } \ No newline at end of file diff --git a/src/spring/azext_spring/__init__.py b/src/spring/azext_spring/__init__.py index 7b6d390a2db..01cba2c2f31 100644 --- a/src/spring/azext_spring/__init__.py +++ b/src/spring/azext_spring/__init__.py @@ -21,6 +21,17 @@ def __init__(self, cli_ctx=None): super(springCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=spring_custom) def load_command_table(self, args): + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) load_command_table(self, args) return self.command_table diff --git a/src/spring/azext_spring/_validators.py b/src/spring/azext_spring/_validators.py index 8fc727bf5dc..460d8663d81 100644 --- a/src/spring/azext_spring/_validators.py +++ b/src/spring/azext_spring/_validators.py @@ -392,17 +392,23 @@ def _validate_subnet(namespace, subnet): def _get_vnet(cmd, vnet_id): vnet = parse_resource_id(vnet_id) - network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) - return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) - - -def _get_network_client(cli_ctx, subscription_id=None): - from azure.cli.core.profiles import ResourceType, get_api_version - from azure.cli.core.commands.client_factory import get_mgmt_service_client - return get_mgmt_service_client(cli_ctx, - ResourceType.MGMT_NETWORK, - subscription_id=subscription_id, - api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) + # network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) + # return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) + get_args = { + 'name': vnet['resource_name'], + 'resource_group': vnet['resource_group'] + } + from .aaz.latest.network.vnet import Show as VirtualNetworkShow + return VirtualNetworkShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) + + +# def _get_network_client(cli_ctx, subscription_id=None): +# from azure.cli.core.profiles import ResourceType, get_api_version +# from azure.cli.core.commands.client_factory import get_mgmt_service_client +# return get_mgmt_service_client(cli_ctx, +# ResourceType.MGMT_NETWORK, +# subscription_id=subscription_id, +# api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) def _get_authorization_client(cli_ctx, subscription_id=None): diff --git a/src/spring/azext_spring/aaz/__init__.py b/src/spring/azext_spring/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/spring/azext_spring/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/spring/azext_spring/aaz/latest/__init__.py b/src/spring/azext_spring/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/spring/azext_spring/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/spring/azext_spring/aaz/latest/network/__cmd_group.py b/src/spring/azext_spring/aaz/latest/network/__cmd_group.py new file mode 100644 index 00000000000..7582bb60b24 --- /dev/null +++ b/src/spring/azext_spring/aaz/latest/network/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Network resources. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/spring/azext_spring/aaz/latest/network/__init__.py b/src/spring/azext_spring/aaz/latest/network/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/spring/azext_spring/aaz/latest/network/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py b/src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py new file mode 100644 index 00000000000..4099513f8aa --- /dev/null +++ b/src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py @@ -0,0 +1,22 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class __CMDGroup(AAZCommandGroup): + """Check if a private IP address is available for use within a virtual network. + + To learn more about Virtual Networks visit https://docs.microsoft.com/azure/virtual-network/virtual-network-manage-network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/spring/azext_spring/aaz/latest/network/vnet/__init__.py b/src/spring/azext_spring/aaz/latest/network/vnet/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/spring/azext_spring/aaz/latest/network/vnet/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/spring/azext_spring/aaz/latest/network/vnet/_show.py b/src/spring/azext_spring/aaz/latest/network/vnet/_show.py new file mode 100644 index 00000000000..cb097da9151 --- /dev/null +++ b/src/spring/azext_spring/aaz/latest/network/vnet/_show.py @@ -0,0 +1,2450 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Show(AAZCommand): + """Get the details of a virtual network. + + :example: Get details for MyVNet. + az network vnet show -g MyResourceGroup -n MyVNet + """ + + _aaz_info = { + "version": "2022-01-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}", "2022-01-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The virtual network (VNet) name.", + required=True, + id_part="name", + ) + _args_schema.expand = AAZStrArg( + options=["--expand"], + help="Expands referenced resources. Default value is None.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworksGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VirtualNetworksGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "virtualNetworkName", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$expand", self.ctx.args.expand, + ), + **self.serialize_query_param( + "api-version", "2022-01-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.etag = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + _ShowHelper._build_schema_extended_location_read(_schema_on_200.extended_location) + _schema_on_200.id = AAZStrType() + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.address_space = AAZObjectType( + serialized_name="addressSpace", + ) + _ShowHelper._build_schema_address_space_read(properties.address_space) + properties.bgp_communities = AAZObjectType( + serialized_name="bgpCommunities", + ) + properties.ddos_protection_plan = AAZObjectType( + serialized_name="ddosProtectionPlan", + ) + properties.dhcp_options = AAZObjectType( + serialized_name="dhcpOptions", + ) + properties.enable_ddos_protection = AAZBoolType( + serialized_name="enableDdosProtection", + ) + properties.enable_vm_protection = AAZBoolType( + serialized_name="enableVmProtection", + ) + properties.encryption = AAZObjectType() + properties.flow_timeout_in_minutes = AAZIntType( + serialized_name="flowTimeoutInMinutes", + ) + properties.ip_allocations = AAZListType( + serialized_name="ipAllocations", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.subnets = AAZListType() + properties.virtual_network_peerings = AAZListType( + serialized_name="virtualNetworkPeerings", + ) + + bgp_communities = cls._schema_on_200.properties.bgp_communities + bgp_communities.regional_community = AAZStrType( + serialized_name="regionalCommunity", + flags={"read_only": True}, + ) + bgp_communities.virtual_network_community = AAZStrType( + serialized_name="virtualNetworkCommunity", + flags={"required": True}, + ) + + ddos_protection_plan = cls._schema_on_200.properties.ddos_protection_plan + ddos_protection_plan.id = AAZStrType() + + dhcp_options = cls._schema_on_200.properties.dhcp_options + dhcp_options.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + + dns_servers = cls._schema_on_200.properties.dhcp_options.dns_servers + dns_servers.Element = AAZStrType() + + encryption = cls._schema_on_200.properties.encryption + encryption.enabled = AAZBoolType( + flags={"required": True}, + ) + encryption.enforcement = AAZStrType() + + ip_allocations = cls._schema_on_200.properties.ip_allocations + ip_allocations.Element = AAZObjectType() + _ShowHelper._build_schema_sub_resource_read(ip_allocations.Element) + + subnets = cls._schema_on_200.properties.subnets + subnets.Element = AAZObjectType() + _ShowHelper._build_schema_subnet_read(subnets.Element) + + virtual_network_peerings = cls._schema_on_200.properties.virtual_network_peerings + virtual_network_peerings.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.virtual_network_peerings.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = cls._schema_on_200.properties.virtual_network_peerings.Element.properties + properties.allow_forwarded_traffic = AAZBoolType( + serialized_name="allowForwardedTraffic", + ) + properties.allow_gateway_transit = AAZBoolType( + serialized_name="allowGatewayTransit", + ) + properties.allow_virtual_network_access = AAZBoolType( + serialized_name="allowVirtualNetworkAccess", + ) + properties.do_not_verify_remote_gateways = AAZBoolType( + serialized_name="doNotVerifyRemoteGateways", + ) + properties.peering_state = AAZStrType( + serialized_name="peeringState", + ) + properties.peering_sync_level = AAZStrType( + serialized_name="peeringSyncLevel", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_address_space = AAZObjectType( + serialized_name="remoteAddressSpace", + ) + _ShowHelper._build_schema_address_space_read(properties.remote_address_space) + properties.remote_bgp_communities = AAZObjectType( + serialized_name="remoteBgpCommunities", + ) + properties.remote_virtual_network = AAZObjectType( + serialized_name="remoteVirtualNetwork", + ) + _ShowHelper._build_schema_sub_resource_read(properties.remote_virtual_network) + properties.remote_virtual_network_address_space = AAZObjectType( + serialized_name="remoteVirtualNetworkAddressSpace", + ) + _ShowHelper._build_schema_address_space_read(properties.remote_virtual_network_address_space) + properties.remote_virtual_network_encryption = AAZObjectType( + serialized_name="remoteVirtualNetworkEncryption", + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.use_remote_gateways = AAZBoolType( + serialized_name="useRemoteGateways", + ) + + remote_bgp_communities = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_bgp_communities + remote_bgp_communities.regional_community = AAZStrType( + serialized_name="regionalCommunity", + flags={"read_only": True}, + ) + remote_bgp_communities.virtual_network_community = AAZStrType( + serialized_name="virtualNetworkCommunity", + flags={"required": True}, + ) + + remote_virtual_network_encryption = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_virtual_network_encryption + remote_virtual_network_encryption.enabled = AAZBoolType( + flags={"required": True}, + ) + remote_virtual_network_encryption.enforcement = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_address_space_read = None + + @classmethod + def _build_schema_address_space_read(cls, _schema): + if cls._schema_address_space_read is not None: + _schema.address_prefixes = cls._schema_address_space_read.address_prefixes + return + + cls._schema_address_space_read = _schema_address_space_read = AAZObjectType() + + address_space_read = _schema_address_space_read + address_space_read.address_prefixes = AAZListType( + serialized_name="addressPrefixes", + ) + + address_prefixes = _schema_address_space_read.address_prefixes + address_prefixes.Element = AAZStrType() + + _schema.address_prefixes = cls._schema_address_space_read.address_prefixes + + _schema_application_security_group_read = None + + @classmethod + def _build_schema_application_security_group_read(cls, _schema): + if cls._schema_application_security_group_read is not None: + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + return + + cls._schema_application_security_group_read = _schema_application_security_group_read = AAZObjectType() + + application_security_group_read = _schema_application_security_group_read + application_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.id = AAZStrType() + application_security_group_read.location = AAZStrType() + application_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + application_security_group_read.tags = AAZDictType() + application_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_application_security_group_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + tags = _schema_application_security_group_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + + _schema_extended_location_read = None + + @classmethod + def _build_schema_extended_location_read(cls, _schema): + if cls._schema_extended_location_read is not None: + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + return + + cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType() + + extended_location_read = _schema_extended_location_read + extended_location_read.name = AAZStrType() + extended_location_read.type = AAZStrType() + + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + + _schema_frontend_ip_configuration_read = None + + @classmethod + def _build_schema_frontend_ip_configuration_read(cls, _schema): + if cls._schema_frontend_ip_configuration_read is not None: + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + return + + cls._schema_frontend_ip_configuration_read = _schema_frontend_ip_configuration_read = AAZObjectType() + + frontend_ip_configuration_read = _schema_frontend_ip_configuration_read + frontend_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.id = AAZStrType() + frontend_ip_configuration_read.name = AAZStrType() + frontend_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + frontend_ip_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.zones = AAZListType() + + properties = _schema_frontend_ip_configuration_read.properties + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.inbound_nat_pools = AAZListType( + serialized_name="inboundNatPools", + flags={"read_only": True}, + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + ) + cls._build_schema_sub_resource_read(properties.public_ip_prefix) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + inbound_nat_pools = _schema_frontend_ip_configuration_read.properties.inbound_nat_pools + inbound_nat_pools.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_pools.Element) + + inbound_nat_rules = _schema_frontend_ip_configuration_read.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancing_rules = _schema_frontend_ip_configuration_read.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_frontend_ip_configuration_read.properties.outbound_rules + outbound_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(outbound_rules.Element) + + zones = _schema_frontend_ip_configuration_read.zones + zones.Element = AAZStrType() + + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + + _schema_ip_configuration_read = None + + @classmethod + def _build_schema_ip_configuration_read(cls, _schema): + if cls._schema_ip_configuration_read is not None: + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + return + + cls._schema_ip_configuration_read = _schema_ip_configuration_read = AAZObjectType() + + ip_configuration_read = _schema_ip_configuration_read + ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + ip_configuration_read.id = AAZStrType() + ip_configuration_read.name = AAZStrType() + ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_ip_configuration_read.properties + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + + _schema_network_interface_ip_configuration_read = None + + @classmethod + def _build_schema_network_interface_ip_configuration_read(cls, _schema): + if cls._schema_network_interface_ip_configuration_read is not None: + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + return + + cls._schema_network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read = AAZObjectType() + + network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read + network_interface_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_ip_configuration_read.id = AAZStrType() + network_interface_ip_configuration_read.name = AAZStrType() + network_interface_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_ip_configuration_read.type = AAZStrType() + + properties = _schema_network_interface_ip_configuration_read.properties + properties.application_gateway_backend_address_pools = AAZListType( + serialized_name="applicationGatewayBackendAddressPools", + ) + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + ) + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.load_balancer_backend_address_pools = AAZListType( + serialized_name="loadBalancerBackendAddressPools", + ) + properties.load_balancer_inbound_nat_rules = AAZListType( + serialized_name="loadBalancerInboundNatRules", + ) + properties.primary = AAZBoolType() + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.private_link_connection_properties = AAZObjectType( + serialized_name="privateLinkConnectionProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + properties.virtual_network_taps = AAZListType( + serialized_name="virtualNetworkTaps", + ) + + application_gateway_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools + application_gateway_backend_address_pools.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties + properties.backend_addresses = AAZListType( + serialized_name="backendAddresses", + ) + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + backend_addresses = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses + backend_addresses.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses.Element + _element.fqdn = AAZStrType() + _element.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + application_security_groups = _schema_network_interface_ip_configuration_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(application_security_groups.Element) + + load_balancer_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools + load_balancer_backend_address_pools.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.drain_period_in_seconds = AAZIntType( + serialized_name="drainPeriodInSeconds", + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancer_backend_addresses = AAZListType( + serialized_name="loadBalancerBackendAddresses", + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.location = AAZStrType() + properties.outbound_rule = AAZObjectType( + serialized_name="outboundRule", + ) + cls._build_schema_sub_resource_read(properties.outbound_rule) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.tunnel_interfaces = AAZListType( + serialized_name="tunnelInterfaces", + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancer_backend_addresses = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses + load_balancer_backend_addresses.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties + properties.admin_state = AAZStrType( + serialized_name="adminState", + ) + properties.inbound_nat_rules_port_mapping = AAZListType( + serialized_name="inboundNatRulesPortMapping", + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.load_balancer_frontend_ip_configuration = AAZObjectType( + serialized_name="loadBalancerFrontendIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration) + properties.network_interface_ip_configuration = AAZObjectType( + serialized_name="networkInterfaceIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration) + properties.subnet = AAZObjectType() + cls._build_schema_sub_resource_read(properties.subnet) + properties.virtual_network = AAZObjectType( + serialized_name="virtualNetwork", + ) + cls._build_schema_sub_resource_read(properties.virtual_network) + + inbound_nat_rules_port_mapping = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping + inbound_nat_rules_port_mapping.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping.Element + _element.backend_port = AAZIntType( + serialized_name="backendPort", + ) + _element.frontend_port = AAZIntType( + serialized_name="frontendPort", + ) + _element.inbound_nat_rule_name = AAZStrType( + serialized_name="inboundNatRuleName", + ) + + load_balancing_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.outbound_rules + outbound_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(outbound_rules.Element) + + tunnel_interfaces = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces + tunnel_interfaces.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces.Element + _element.identifier = AAZIntType() + _element.port = AAZIntType() + _element.protocol = AAZStrType() + _element.type = AAZStrType() + + load_balancer_inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules + load_balancer_inbound_nat_rules.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element.properties + properties.backend_address_pool = AAZObjectType( + serialized_name="backendAddressPool", + ) + cls._build_schema_sub_resource_read(properties.backend_address_pool) + properties.backend_ip_configuration = AAZObjectType( + serialized_name="backendIPConfiguration", + ) + cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration) + properties.backend_port = AAZIntType( + serialized_name="backendPort", + ) + properties.enable_floating_ip = AAZBoolType( + serialized_name="enableFloatingIP", + ) + properties.enable_tcp_reset = AAZBoolType( + serialized_name="enableTcpReset", + ) + properties.frontend_ip_configuration = AAZObjectType( + serialized_name="frontendIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.frontend_ip_configuration) + properties.frontend_port = AAZIntType( + serialized_name="frontendPort", + ) + properties.frontend_port_range_end = AAZIntType( + serialized_name="frontendPortRangeEnd", + ) + properties.frontend_port_range_start = AAZIntType( + serialized_name="frontendPortRangeStart", + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.protocol = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_link_connection_properties = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties + private_link_connection_properties.fqdns = AAZListType( + flags={"read_only": True}, + ) + private_link_connection_properties.group_id = AAZStrType( + serialized_name="groupId", + flags={"read_only": True}, + ) + private_link_connection_properties.required_member_name = AAZStrType( + serialized_name="requiredMemberName", + flags={"read_only": True}, + ) + + fqdns = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties.fqdns + fqdns.Element = AAZStrType() + + virtual_network_taps = _schema_network_interface_ip_configuration_read.properties.virtual_network_taps + virtual_network_taps.Element = AAZObjectType() + cls._build_schema_virtual_network_tap_read(virtual_network_taps.Element) + + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + + _schema_network_interface_tap_configuration_read = None + + @classmethod + def _build_schema_network_interface_tap_configuration_read(cls, _schema): + if cls._schema_network_interface_tap_configuration_read is not None: + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + return + + cls._schema_network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read = AAZObjectType() + + network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read + network_interface_tap_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_tap_configuration_read.id = AAZStrType() + network_interface_tap_configuration_read.name = AAZStrType() + network_interface_tap_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_tap_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_tap_configuration_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.virtual_network_tap = AAZObjectType( + serialized_name="virtualNetworkTap", + ) + cls._build_schema_virtual_network_tap_read(properties.virtual_network_tap) + + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + + _schema_network_interface_read = None + + @classmethod + def _build_schema_network_interface_read(cls, _schema): + if cls._schema_network_interface_read is not None: + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + return + + cls._schema_network_interface_read = _schema_network_interface_read = AAZObjectType() + + network_interface_read = _schema_network_interface_read + network_interface_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(network_interface_read.extended_location) + network_interface_read.id = AAZStrType() + network_interface_read.location = AAZStrType() + network_interface_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_read.tags = AAZDictType() + network_interface_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties + properties.auxiliary_mode = AAZStrType( + serialized_name="auxiliaryMode", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + ) + properties.dscp_configuration = AAZObjectType( + serialized_name="dscpConfiguration", + ) + cls._build_schema_sub_resource_read(properties.dscp_configuration) + properties.enable_accelerated_networking = AAZBoolType( + serialized_name="enableAcceleratedNetworking", + ) + properties.enable_ip_forwarding = AAZBoolType( + serialized_name="enableIPForwarding", + ) + properties.hosted_workloads = AAZListType( + serialized_name="hostedWorkloads", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.mac_address = AAZStrType( + serialized_name="macAddress", + flags={"read_only": True}, + ) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + ) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.nic_type = AAZStrType( + serialized_name="nicType", + ) + properties.primary = AAZBoolType( + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service = AAZObjectType( + serialized_name="privateLinkService", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.tap_configurations = AAZListType( + serialized_name="tapConfigurations", + flags={"read_only": True}, + ) + properties.virtual_machine = AAZObjectType( + serialized_name="virtualMachine", + ) + cls._build_schema_sub_resource_read(properties.virtual_machine) + properties.vnet_encryption_supported = AAZBoolType( + serialized_name="vnetEncryptionSupported", + flags={"read_only": True}, + ) + properties.workload_type = AAZStrType( + serialized_name="workloadType", + ) + + dns_settings = _schema_network_interface_read.properties.dns_settings + dns_settings.applied_dns_servers = AAZListType( + serialized_name="appliedDnsServers", + flags={"read_only": True}, + ) + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.internal_dns_name_label = AAZStrType( + serialized_name="internalDnsNameLabel", + ) + dns_settings.internal_domain_name_suffix = AAZStrType( + serialized_name="internalDomainNameSuffix", + flags={"read_only": True}, + ) + dns_settings.internal_fqdn = AAZStrType( + serialized_name="internalFqdn", + flags={"read_only": True}, + ) + + applied_dns_servers = _schema_network_interface_read.properties.dns_settings.applied_dns_servers + applied_dns_servers.Element = AAZStrType() + + dns_servers = _schema_network_interface_read.properties.dns_settings.dns_servers + dns_servers.Element = AAZStrType() + + hosted_workloads = _schema_network_interface_read.properties.hosted_workloads + hosted_workloads.Element = AAZStrType() + + ip_configurations = _schema_network_interface_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(ip_configurations.Element) + + private_link_service = _schema_network_interface_read.properties.private_link_service + private_link_service.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_link_service.extended_location) + private_link_service.id = AAZStrType() + private_link_service.location = AAZStrType() + private_link_service.name = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_link_service.tags = AAZDictType() + private_link_service.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties + properties.alias = AAZStrType( + flags={"read_only": True}, + ) + properties.auto_approval = AAZObjectType( + serialized_name="autoApproval", + ) + properties.enable_proxy_protocol = AAZBoolType( + serialized_name="enableProxyProtocol", + ) + properties.fqdns = AAZListType() + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.load_balancer_frontend_ip_configurations = AAZListType( + serialized_name="loadBalancerFrontendIpConfigurations", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.visibility = AAZObjectType() + + auto_approval = _schema_network_interface_read.properties.private_link_service.properties.auto_approval + auto_approval.subscriptions = AAZListType() + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.auto_approval.subscriptions + subscriptions.Element = AAZStrType() + + fqdns = _schema_network_interface_read.properties.private_link_service.properties.fqdns + fqdns.Element = AAZStrType() + + ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + + _element = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element.properties + properties.primary = AAZBoolType() + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + load_balancer_frontend_ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.load_balancer_frontend_ip_configurations + load_balancer_frontend_ip_configurations.Element = AAZObjectType() + cls._build_schema_frontend_ip_configuration_read(load_balancer_frontend_ip_configurations.Element) + + network_interfaces = _schema_network_interface_read.properties.private_link_service.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_endpoint_connections = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element.properties + properties.link_identifier = AAZStrType( + serialized_name="linkIdentifier", + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + visibility = _schema_network_interface_read.properties.private_link_service.properties.visibility + visibility.subscriptions = AAZListType() + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.visibility.subscriptions + subscriptions.Element = AAZStrType() + + tags = _schema_network_interface_read.properties.private_link_service.tags + tags.Element = AAZStrType() + + tap_configurations = _schema_network_interface_read.properties.tap_configurations + tap_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_tap_configuration_read(tap_configurations.Element) + + tags = _schema_network_interface_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + + _schema_network_security_group_read = None + + @classmethod + def _build_schema_network_security_group_read(cls, _schema): + if cls._schema_network_security_group_read is not None: + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + return + + cls._schema_network_security_group_read = _schema_network_security_group_read = AAZObjectType() + + network_security_group_read = _schema_network_security_group_read + network_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.id = AAZStrType() + network_security_group_read.location = AAZStrType() + network_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_security_group_read.tags = AAZDictType() + network_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties + properties.default_security_rules = AAZListType( + serialized_name="defaultSecurityRules", + flags={"read_only": True}, + ) + properties.flow_logs = AAZListType( + serialized_name="flowLogs", + flags={"read_only": True}, + ) + properties.flush_connection = AAZBoolType( + serialized_name="flushConnection", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.security_rules = AAZListType( + serialized_name="securityRules", + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + default_security_rules = _schema_network_security_group_read.properties.default_security_rules + default_security_rules.Element = AAZObjectType() + cls._build_schema_security_rule_read(default_security_rules.Element) + + flow_logs = _schema_network_security_group_read.properties.flow_logs + flow_logs.Element = AAZObjectType() + + _element = _schema_network_security_group_read.properties.flow_logs.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties.flow_logs.Element.properties + properties.enabled = AAZBoolType() + properties.flow_analytics_configuration = AAZObjectType( + serialized_name="flowAnalyticsConfiguration", + ) + properties.format = AAZObjectType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention_policy = AAZObjectType( + serialized_name="retentionPolicy", + ) + properties.storage_id = AAZStrType( + serialized_name="storageId", + flags={"required": True}, + ) + properties.target_resource_guid = AAZStrType( + serialized_name="targetResourceGuid", + flags={"read_only": True}, + ) + properties.target_resource_id = AAZStrType( + serialized_name="targetResourceId", + flags={"required": True}, + ) + + flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration + flow_analytics_configuration.network_watcher_flow_analytics_configuration = AAZObjectType( + serialized_name="networkWatcherFlowAnalyticsConfiguration", + ) + + network_watcher_flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration.network_watcher_flow_analytics_configuration + network_watcher_flow_analytics_configuration.enabled = AAZBoolType() + network_watcher_flow_analytics_configuration.traffic_analytics_interval = AAZIntType( + serialized_name="trafficAnalyticsInterval", + ) + network_watcher_flow_analytics_configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + ) + network_watcher_flow_analytics_configuration.workspace_region = AAZStrType( + serialized_name="workspaceRegion", + ) + network_watcher_flow_analytics_configuration.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + ) + + format = _schema_network_security_group_read.properties.flow_logs.Element.properties.format + format.type = AAZStrType() + format.version = AAZIntType() + + retention_policy = _schema_network_security_group_read.properties.flow_logs.Element.properties.retention_policy + retention_policy.days = AAZIntType() + retention_policy.enabled = AAZBoolType() + + tags = _schema_network_security_group_read.properties.flow_logs.Element.tags + tags.Element = AAZStrType() + + network_interfaces = _schema_network_security_group_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + security_rules = _schema_network_security_group_read.properties.security_rules + security_rules.Element = AAZObjectType() + cls._build_schema_security_rule_read(security_rules.Element) + + subnets = _schema_network_security_group_read.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_network_security_group_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + + _schema_private_endpoint_read = None + + @classmethod + def _build_schema_private_endpoint_read(cls, _schema): + if cls._schema_private_endpoint_read is not None: + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + return + + cls._schema_private_endpoint_read = _schema_private_endpoint_read = AAZObjectType() + + private_endpoint_read = _schema_private_endpoint_read + private_endpoint_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_endpoint_read.extended_location) + private_endpoint_read.id = AAZStrType() + private_endpoint_read.location = AAZStrType() + private_endpoint_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_endpoint_read.tags = AAZDictType() + private_endpoint_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + ) + properties.custom_dns_configs = AAZListType( + serialized_name="customDnsConfigs", + ) + properties.custom_network_interface_name = AAZStrType( + serialized_name="customNetworkInterfaceName", + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.manual_private_link_service_connections = AAZListType( + serialized_name="manualPrivateLinkServiceConnections", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_link_service_connections = AAZListType( + serialized_name="privateLinkServiceConnections", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + application_security_groups = _schema_private_endpoint_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(application_security_groups.Element) + + custom_dns_configs = _schema_private_endpoint_read.properties.custom_dns_configs + custom_dns_configs.Element = AAZObjectType() + + _element = _schema_private_endpoint_read.properties.custom_dns_configs.Element + _element.fqdn = AAZStrType() + _element.ip_addresses = AAZListType( + serialized_name="ipAddresses", + ) + + ip_addresses = _schema_private_endpoint_read.properties.custom_dns_configs.Element.ip_addresses + ip_addresses.Element = AAZStrType() + + ip_configurations = _schema_private_endpoint_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + + _element = _schema_private_endpoint_read.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties.ip_configurations.Element.properties + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.member_name = AAZStrType( + serialized_name="memberName", + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + + manual_private_link_service_connections = _schema_private_endpoint_read.properties.manual_private_link_service_connections + manual_private_link_service_connections.Element = AAZObjectType() + cls._build_schema_private_link_service_connection_read(manual_private_link_service_connections.Element) + + network_interfaces = _schema_private_endpoint_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_link_service_connections = _schema_private_endpoint_read.properties.private_link_service_connections + private_link_service_connections.Element = AAZObjectType() + cls._build_schema_private_link_service_connection_read(private_link_service_connections.Element) + + tags = _schema_private_endpoint_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + + _schema_private_link_service_connection_state_read = None + + @classmethod + def _build_schema_private_link_service_connection_state_read(cls, _schema): + if cls._schema_private_link_service_connection_state_read is not None: + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + return + + cls._schema_private_link_service_connection_state_read = _schema_private_link_service_connection_state_read = AAZObjectType() + + private_link_service_connection_state_read = _schema_private_link_service_connection_state_read + private_link_service_connection_state_read.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state_read.description = AAZStrType() + private_link_service_connection_state_read.status = AAZStrType() + + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + + _schema_private_link_service_connection_read = None + + @classmethod + def _build_schema_private_link_service_connection_read(cls, _schema): + if cls._schema_private_link_service_connection_read is not None: + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + return + + cls._schema_private_link_service_connection_read = _schema_private_link_service_connection_read = AAZObjectType() + + private_link_service_connection_read = _schema_private_link_service_connection_read + private_link_service_connection_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service_connection_read.id = AAZStrType() + private_link_service_connection_read.name = AAZStrType() + private_link_service_connection_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_link_service_connection_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_link_service_connection_read.properties + properties.group_ids = AAZListType( + serialized_name="groupIds", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.private_link_service_id = AAZStrType( + serialized_name="privateLinkServiceId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.request_message = AAZStrType( + serialized_name="requestMessage", + ) + + group_ids = _schema_private_link_service_connection_read.properties.group_ids + group_ids.Element = AAZStrType() + + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + + _schema_public_ip_address_read = None + + @classmethod + def _build_schema_public_ip_address_read(cls, _schema): + if cls._schema_public_ip_address_read is not None: + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + return + + cls._schema_public_ip_address_read = _schema_public_ip_address_read = AAZObjectType() + + public_ip_address_read = _schema_public_ip_address_read + public_ip_address_read.etag = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(public_ip_address_read.extended_location) + public_ip_address_read.id = AAZStrType() + public_ip_address_read.location = AAZStrType() + public_ip_address_read.name = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + public_ip_address_read.sku = AAZObjectType() + public_ip_address_read.tags = AAZDictType() + public_ip_address_read.type = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties + properties.ddos_settings = AAZObjectType( + serialized_name="ddosSettings", + ) + properties.delete_option = AAZStrType( + serialized_name="deleteOption", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.ip_configuration = AAZObjectType( + serialized_name="ipConfiguration", + ) + cls._build_schema_ip_configuration_read(properties.ip_configuration) + properties.ip_tags = AAZListType( + serialized_name="ipTags", + ) + properties.linked_public_ip_address = AAZObjectType( + serialized_name="linkedPublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.linked_public_ip_address) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address_version = AAZStrType( + serialized_name="publicIPAddressVersion", + ) + properties.public_ip_allocation_method = AAZStrType( + serialized_name="publicIPAllocationMethod", + ) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + ) + cls._build_schema_sub_resource_read(properties.public_ip_prefix) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_public_ip_address = AAZObjectType( + serialized_name="servicePublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.service_public_ip_address) + + ddos_settings = _schema_public_ip_address_read.properties.ddos_settings + ddos_settings.ddos_custom_policy = AAZObjectType( + serialized_name="ddosCustomPolicy", + ) + cls._build_schema_sub_resource_read(ddos_settings.ddos_custom_policy) + ddos_settings.protected_ip = AAZBoolType( + serialized_name="protectedIP", + ) + ddos_settings.protection_coverage = AAZStrType( + serialized_name="protectionCoverage", + ) + + dns_settings = _schema_public_ip_address_read.properties.dns_settings + dns_settings.domain_name_label = AAZStrType( + serialized_name="domainNameLabel", + ) + dns_settings.fqdn = AAZStrType() + dns_settings.reverse_fqdn = AAZStrType( + serialized_name="reverseFqdn", + ) + + ip_tags = _schema_public_ip_address_read.properties.ip_tags + ip_tags.Element = AAZObjectType() + + _element = _schema_public_ip_address_read.properties.ip_tags.Element + _element.ip_tag_type = AAZStrType( + serialized_name="ipTagType", + ) + _element.tag = AAZStrType() + + nat_gateway = _schema_public_ip_address_read.properties.nat_gateway + nat_gateway.etag = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.id = AAZStrType() + nat_gateway.location = AAZStrType() + nat_gateway.name = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + nat_gateway.sku = AAZObjectType() + nat_gateway.tags = AAZDictType() + nat_gateway.type = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties.nat_gateway.properties + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_addresses = AAZListType( + serialized_name="publicIpAddresses", + ) + properties.public_ip_prefixes = AAZListType( + serialized_name="publicIpPrefixes", + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + public_ip_addresses = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + cls._build_schema_sub_resource_read(public_ip_addresses.Element) + + public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes + public_ip_prefixes.Element = AAZObjectType() + cls._build_schema_sub_resource_read(public_ip_prefixes.Element) + + subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_sub_resource_read(subnets.Element) + + sku = _schema_public_ip_address_read.properties.nat_gateway.sku + sku.name = AAZStrType() + + tags = _schema_public_ip_address_read.properties.nat_gateway.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.properties.nat_gateway.zones + zones.Element = AAZStrType() + + sku = _schema_public_ip_address_read.sku + sku.name = AAZStrType() + sku.tier = AAZStrType() + + tags = _schema_public_ip_address_read.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.zones + zones.Element = AAZStrType() + + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + + _schema_security_rule_read = None + + @classmethod + def _build_schema_security_rule_read(cls, _schema): + if cls._schema_security_rule_read is not None: + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + return + + cls._schema_security_rule_read = _schema_security_rule_read = AAZObjectType() + + security_rule_read = _schema_security_rule_read + security_rule_read.etag = AAZStrType( + flags={"read_only": True}, + ) + security_rule_read.id = AAZStrType() + security_rule_read.name = AAZStrType() + security_rule_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + security_rule_read.type = AAZStrType() + + properties = _schema_security_rule_read.properties + properties.access = AAZStrType( + flags={"required": True}, + ) + properties.description = AAZStrType() + properties.destination_address_prefix = AAZStrType( + serialized_name="destinationAddressPrefix", + ) + properties.destination_address_prefixes = AAZListType( + serialized_name="destinationAddressPrefixes", + ) + properties.destination_application_security_groups = AAZListType( + serialized_name="destinationApplicationSecurityGroups", + ) + properties.destination_port_range = AAZStrType( + serialized_name="destinationPortRange", + ) + properties.destination_port_ranges = AAZListType( + serialized_name="destinationPortRanges", + ) + properties.direction = AAZStrType( + flags={"required": True}, + ) + properties.priority = AAZIntType() + properties.protocol = AAZStrType( + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.source_address_prefix = AAZStrType( + serialized_name="sourceAddressPrefix", + ) + properties.source_address_prefixes = AAZListType( + serialized_name="sourceAddressPrefixes", + ) + properties.source_application_security_groups = AAZListType( + serialized_name="sourceApplicationSecurityGroups", + ) + properties.source_port_range = AAZStrType( + serialized_name="sourcePortRange", + ) + properties.source_port_ranges = AAZListType( + serialized_name="sourcePortRanges", + ) + + destination_address_prefixes = _schema_security_rule_read.properties.destination_address_prefixes + destination_address_prefixes.Element = AAZStrType() + + destination_application_security_groups = _schema_security_rule_read.properties.destination_application_security_groups + destination_application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(destination_application_security_groups.Element) + + destination_port_ranges = _schema_security_rule_read.properties.destination_port_ranges + destination_port_ranges.Element = AAZStrType() + + source_address_prefixes = _schema_security_rule_read.properties.source_address_prefixes + source_address_prefixes.Element = AAZStrType() + + source_application_security_groups = _schema_security_rule_read.properties.source_application_security_groups + source_application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(source_application_security_groups.Element) + + source_port_ranges = _schema_security_rule_read.properties.source_port_ranges + source_port_ranges.Element = AAZStrType() + + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + + _schema_sub_resource_read = None + + @classmethod + def _build_schema_sub_resource_read(cls, _schema): + if cls._schema_sub_resource_read is not None: + _schema.id = cls._schema_sub_resource_read.id + return + + cls._schema_sub_resource_read = _schema_sub_resource_read = AAZObjectType() + + sub_resource_read = _schema_sub_resource_read + sub_resource_read.id = AAZStrType() + + _schema.id = cls._schema_sub_resource_read.id + + _schema_subnet_read = None + + @classmethod + def _build_schema_subnet_read(cls, _schema): + if cls._schema_subnet_read is not None: + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + return + + cls._schema_subnet_read = _schema_subnet_read = AAZObjectType() + + subnet_read = _schema_subnet_read + subnet_read.etag = AAZStrType( + flags={"read_only": True}, + ) + subnet_read.id = AAZStrType() + subnet_read.name = AAZStrType() + subnet_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + subnet_read.type = AAZStrType() + + properties = _schema_subnet_read.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + ) + properties.address_prefixes = AAZListType( + serialized_name="addressPrefixes", + ) + properties.application_gateway_ip_configurations = AAZListType( + serialized_name="applicationGatewayIpConfigurations", + ) + properties.delegations = AAZListType() + properties.ip_allocations = AAZListType( + serialized_name="ipAllocations", + ) + properties.ip_configuration_profiles = AAZListType( + serialized_name="ipConfigurationProfiles", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + flags={"read_only": True}, + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + ) + cls._build_schema_sub_resource_read(properties.nat_gateway) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.private_endpoint_network_policies = AAZStrType( + serialized_name="privateEndpointNetworkPolicies", + ) + properties.private_endpoints = AAZListType( + serialized_name="privateEndpoints", + flags={"read_only": True}, + ) + properties.private_link_service_network_policies = AAZStrType( + serialized_name="privateLinkServiceNetworkPolicies", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.purpose = AAZStrType( + flags={"read_only": True}, + ) + properties.resource_navigation_links = AAZListType( + serialized_name="resourceNavigationLinks", + flags={"read_only": True}, + ) + properties.route_table = AAZObjectType( + serialized_name="routeTable", + ) + properties.service_association_links = AAZListType( + serialized_name="serviceAssociationLinks", + flags={"read_only": True}, + ) + properties.service_endpoint_policies = AAZListType( + serialized_name="serviceEndpointPolicies", + ) + properties.service_endpoints = AAZListType( + serialized_name="serviceEndpoints", + ) + + address_prefixes = _schema_subnet_read.properties.address_prefixes + address_prefixes.Element = AAZStrType() + + application_gateway_ip_configurations = _schema_subnet_read.properties.application_gateway_ip_configurations + application_gateway_ip_configurations.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.application_gateway_ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.application_gateway_ip_configurations.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_sub_resource_read(properties.subnet) + + delegations = _schema_subnet_read.properties.delegations + delegations.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.delegations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.delegations.Element.properties + properties.actions = AAZListType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_name = AAZStrType( + serialized_name="serviceName", + ) + + actions = _schema_subnet_read.properties.delegations.Element.properties.actions + actions.Element = AAZStrType() + + ip_allocations = _schema_subnet_read.properties.ip_allocations + ip_allocations.Element = AAZObjectType() + cls._build_schema_sub_resource_read(ip_allocations.Element) + + ip_configuration_profiles = _schema_subnet_read.properties.ip_configuration_profiles + ip_configuration_profiles.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.ip_configuration_profiles.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.ip_configuration_profiles.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + ip_configurations = _schema_subnet_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + cls._build_schema_ip_configuration_read(ip_configurations.Element) + + private_endpoints = _schema_subnet_read.properties.private_endpoints + private_endpoints.Element = AAZObjectType() + cls._build_schema_private_endpoint_read(private_endpoints.Element) + + resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links + resource_navigation_links.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.resource_navigation_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.resource_navigation_links.Element.properties + properties.link = AAZStrType() + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + route_table = _schema_subnet_read.properties.route_table + route_table.etag = AAZStrType( + flags={"read_only": True}, + ) + route_table.id = AAZStrType() + route_table.location = AAZStrType() + route_table.name = AAZStrType( + flags={"read_only": True}, + ) + route_table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + route_table.tags = AAZDictType() + route_table.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.route_table.properties + properties.disable_bgp_route_propagation = AAZBoolType( + serialized_name="disableBgpRoutePropagation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.routes = AAZListType() + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + routes = _schema_subnet_read.properties.route_table.properties.routes + routes.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.route_table.properties.routes.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.route_table.properties.routes.Element.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + ) + properties.has_bgp_override = AAZBoolType( + serialized_name="hasBgpOverride", + ) + properties.next_hop_ip_address = AAZStrType( + serialized_name="nextHopIpAddress", + ) + properties.next_hop_type = AAZStrType( + serialized_name="nextHopType", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + subnets = _schema_subnet_read.properties.route_table.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.route_table.tags + tags.Element = AAZStrType() + + service_association_links = _schema_subnet_read.properties.service_association_links + service_association_links.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_association_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_association_links.Element.properties + properties.allow_delete = AAZBoolType( + serialized_name="allowDelete", + ) + properties.link = AAZStrType() + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + ) + properties.locations = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + locations = _schema_subnet_read.properties.service_association_links.Element.properties.locations + locations.Element = AAZStrType() + + service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies + service_endpoint_policies.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.kind = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties + properties.contextual_service_endpoint_policies = AAZListType( + serialized_name="contextualServiceEndpointPolicies", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_alias = AAZStrType( + serialized_name="serviceAlias", + ) + properties.service_endpoint_policy_definitions = AAZListType( + serialized_name="serviceEndpointPolicyDefinitions", + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + contextual_service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.contextual_service_endpoint_policies + contextual_service_endpoint_policies.Element = AAZStrType() + + service_endpoint_policy_definitions = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions + service_endpoint_policy_definitions.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service = AAZStrType() + properties.service_resources = AAZListType( + serialized_name="serviceResources", + ) + + service_resources = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties.service_resources + service_resources.Element = AAZStrType() + + subnets = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.service_endpoint_policies.Element.tags + tags.Element = AAZStrType() + + service_endpoints = _schema_subnet_read.properties.service_endpoints + service_endpoints.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoints.Element + _element.locations = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + _element.service = AAZStrType() + + locations = _schema_subnet_read.properties.service_endpoints.Element.locations + locations.Element = AAZStrType() + + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + + _schema_virtual_network_tap_read = None + + @classmethod + def _build_schema_virtual_network_tap_read(cls, _schema): + if cls._schema_virtual_network_tap_read is not None: + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + return + + cls._schema_virtual_network_tap_read = _schema_virtual_network_tap_read = AAZObjectType() + + virtual_network_tap_read = _schema_virtual_network_tap_read + virtual_network_tap_read.etag = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.id = AAZStrType() + virtual_network_tap_read.location = AAZStrType() + virtual_network_tap_read.name = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + virtual_network_tap_read.tags = AAZDictType() + virtual_network_tap_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_virtual_network_tap_read.properties + properties.destination_load_balancer_front_end_ip_configuration = AAZObjectType( + serialized_name="destinationLoadBalancerFrontEndIPConfiguration", + ) + cls._build_schema_frontend_ip_configuration_read(properties.destination_load_balancer_front_end_ip_configuration) + properties.destination_network_interface_ip_configuration = AAZObjectType( + serialized_name="destinationNetworkInterfaceIPConfiguration", + ) + cls._build_schema_network_interface_ip_configuration_read(properties.destination_network_interface_ip_configuration) + properties.destination_port = AAZIntType( + serialized_name="destinationPort", + ) + properties.network_interface_tap_configurations = AAZListType( + serialized_name="networkInterfaceTapConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + network_interface_tap_configurations = _schema_virtual_network_tap_read.properties.network_interface_tap_configurations + network_interface_tap_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_tap_configuration_read(network_interface_tap_configurations.Element) + + tags = _schema_virtual_network_tap_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + + +__all__ = ["Show"] diff --git a/src/spring/azext_spring/azext_metadata.json b/src/spring/azext_spring/azext_metadata.json index 4dd9b8ae926..91e03c05b84 100644 --- a/src/spring/azext_spring/azext_metadata.json +++ b/src/spring/azext_spring/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": false, - "azext.minCliCoreVersion": "2.38.0" + "azext.minCliCoreVersion": "2.45.0" } \ No newline at end of file diff --git a/src/ssh/azext_ssh/__init__.py b/src/ssh/azext_ssh/__init__.py index 87e7b0159f7..429703a29ee 100644 --- a/src/ssh/azext_ssh/__init__.py +++ b/src/ssh/azext_ssh/__init__.py @@ -17,6 +17,17 @@ def __init__(self, cli_ctx=None): def load_command_table(self, args): from azext_ssh.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) load_command_table(self, args) return self.command_table diff --git a/src/ssh/azext_ssh/aaz/__init__.py b/src/ssh/azext_ssh/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/ssh/azext_ssh/aaz/latest/__init__.py b/src/ssh/azext_ssh/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/ssh/azext_ssh/aaz/latest/network/__cmd_group.py b/src/ssh/azext_ssh/aaz/latest/network/__cmd_group.py new file mode 100644 index 00000000000..7582bb60b24 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Network resources. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/ssh/azext_ssh/aaz/latest/network/__init__.py b/src/ssh/azext_ssh/aaz/latest/network/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/ssh/azext_ssh/aaz/latest/network/nic/__cmd_group.py b/src/ssh/azext_ssh/aaz/latest/network/nic/__cmd_group.py new file mode 100644 index 00000000000..7d71d8c1f92 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/nic/__cmd_group.py @@ -0,0 +1,22 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class __CMDGroup(AAZCommandGroup): + """Manage network interfaces. + + To learn more about network interfaces in Azure, visit https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface?tabs=network-interface-portal. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/ssh/azext_ssh/aaz/latest/network/nic/__init__.py b/src/ssh/azext_ssh/aaz/latest/network/nic/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/nic/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/ssh/azext_ssh/aaz/latest/network/nic/_show.py b/src/ssh/azext_ssh/aaz/latest/network/nic/_show.py new file mode 100644 index 00000000000..2d26dd1a744 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/nic/_show.py @@ -0,0 +1,2253 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Show(AAZCommand): + """Get the details of a network interface. + + :example: Get the internal domain name suffix of a NIC. + az network nic show -g MyResourceGroup -n MyNic --query "dnsSettings.internalDomainNameSuffix" + """ + + _aaz_info = { + "version": "2022-01-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkinterfaces/{}", "2022-01-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the network interface (NIC).", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.expand = AAZStrArg( + options=["--expand"], + help="Expands referenced resources.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkInterfacesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class NetworkInterfacesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "networkInterfaceName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$expand", self.ctx.args.expand, + ), + **self.serialize_query_param( + "api-version", "2022-01-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _ShowHelper._build_schema_network_interface_read(cls._schema_on_200) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_application_security_group_read = None + + @classmethod + def _build_schema_application_security_group_read(cls, _schema): + if cls._schema_application_security_group_read is not None: + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + return + + cls._schema_application_security_group_read = _schema_application_security_group_read = AAZObjectType() + + application_security_group_read = _schema_application_security_group_read + application_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.id = AAZStrType() + application_security_group_read.location = AAZStrType() + application_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + application_security_group_read.tags = AAZDictType() + application_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_application_security_group_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + tags = _schema_application_security_group_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + + _schema_extended_location_read = None + + @classmethod + def _build_schema_extended_location_read(cls, _schema): + if cls._schema_extended_location_read is not None: + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + return + + cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType() + + extended_location_read = _schema_extended_location_read + extended_location_read.name = AAZStrType() + extended_location_read.type = AAZStrType() + + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + + _schema_frontend_ip_configuration_read = None + + @classmethod + def _build_schema_frontend_ip_configuration_read(cls, _schema): + if cls._schema_frontend_ip_configuration_read is not None: + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + return + + cls._schema_frontend_ip_configuration_read = _schema_frontend_ip_configuration_read = AAZObjectType() + + frontend_ip_configuration_read = _schema_frontend_ip_configuration_read + frontend_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.id = AAZStrType() + frontend_ip_configuration_read.name = AAZStrType() + frontend_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + frontend_ip_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.zones = AAZListType() + + properties = _schema_frontend_ip_configuration_read.properties + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.inbound_nat_pools = AAZListType( + serialized_name="inboundNatPools", + flags={"read_only": True}, + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + ) + cls._build_schema_sub_resource_read(properties.public_ip_prefix) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + inbound_nat_pools = _schema_frontend_ip_configuration_read.properties.inbound_nat_pools + inbound_nat_pools.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_pools.Element) + + inbound_nat_rules = _schema_frontend_ip_configuration_read.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancing_rules = _schema_frontend_ip_configuration_read.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_frontend_ip_configuration_read.properties.outbound_rules + outbound_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(outbound_rules.Element) + + zones = _schema_frontend_ip_configuration_read.zones + zones.Element = AAZStrType() + + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + + _schema_ip_configuration_read = None + + @classmethod + def _build_schema_ip_configuration_read(cls, _schema): + if cls._schema_ip_configuration_read is not None: + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + return + + cls._schema_ip_configuration_read = _schema_ip_configuration_read = AAZObjectType() + + ip_configuration_read = _schema_ip_configuration_read + ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + ip_configuration_read.id = AAZStrType() + ip_configuration_read.name = AAZStrType() + ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_ip_configuration_read.properties + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + + _schema_network_interface_ip_configuration_read = None + + @classmethod + def _build_schema_network_interface_ip_configuration_read(cls, _schema): + if cls._schema_network_interface_ip_configuration_read is not None: + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + return + + cls._schema_network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read = AAZObjectType() + + network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read + network_interface_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_ip_configuration_read.id = AAZStrType() + network_interface_ip_configuration_read.name = AAZStrType() + network_interface_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_ip_configuration_read.type = AAZStrType() + + properties = _schema_network_interface_ip_configuration_read.properties + properties.application_gateway_backend_address_pools = AAZListType( + serialized_name="applicationGatewayBackendAddressPools", + ) + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + ) + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.load_balancer_backend_address_pools = AAZListType( + serialized_name="loadBalancerBackendAddressPools", + ) + properties.load_balancer_inbound_nat_rules = AAZListType( + serialized_name="loadBalancerInboundNatRules", + ) + properties.primary = AAZBoolType() + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.private_link_connection_properties = AAZObjectType( + serialized_name="privateLinkConnectionProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + properties.virtual_network_taps = AAZListType( + serialized_name="virtualNetworkTaps", + ) + + application_gateway_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools + application_gateway_backend_address_pools.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties + properties.backend_addresses = AAZListType( + serialized_name="backendAddresses", + ) + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + backend_addresses = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses + backend_addresses.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses.Element + _element.fqdn = AAZStrType() + _element.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + application_security_groups = _schema_network_interface_ip_configuration_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(application_security_groups.Element) + + load_balancer_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools + load_balancer_backend_address_pools.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.drain_period_in_seconds = AAZIntType( + serialized_name="drainPeriodInSeconds", + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancer_backend_addresses = AAZListType( + serialized_name="loadBalancerBackendAddresses", + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.location = AAZStrType() + properties.outbound_rule = AAZObjectType( + serialized_name="outboundRule", + ) + cls._build_schema_sub_resource_read(properties.outbound_rule) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.tunnel_interfaces = AAZListType( + serialized_name="tunnelInterfaces", + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancer_backend_addresses = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses + load_balancer_backend_addresses.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties + properties.admin_state = AAZStrType( + serialized_name="adminState", + ) + properties.inbound_nat_rules_port_mapping = AAZListType( + serialized_name="inboundNatRulesPortMapping", + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.load_balancer_frontend_ip_configuration = AAZObjectType( + serialized_name="loadBalancerFrontendIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration) + properties.network_interface_ip_configuration = AAZObjectType( + serialized_name="networkInterfaceIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration) + properties.subnet = AAZObjectType() + cls._build_schema_sub_resource_read(properties.subnet) + properties.virtual_network = AAZObjectType( + serialized_name="virtualNetwork", + ) + cls._build_schema_sub_resource_read(properties.virtual_network) + + inbound_nat_rules_port_mapping = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping + inbound_nat_rules_port_mapping.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping.Element + _element.backend_port = AAZIntType( + serialized_name="backendPort", + ) + _element.frontend_port = AAZIntType( + serialized_name="frontendPort", + ) + _element.inbound_nat_rule_name = AAZStrType( + serialized_name="inboundNatRuleName", + ) + + load_balancing_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.outbound_rules + outbound_rules.Element = AAZObjectType() + cls._build_schema_sub_resource_read(outbound_rules.Element) + + tunnel_interfaces = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces + tunnel_interfaces.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces.Element + _element.identifier = AAZIntType() + _element.port = AAZIntType() + _element.protocol = AAZStrType() + _element.type = AAZStrType() + + load_balancer_inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules + load_balancer_inbound_nat_rules.Element = AAZObjectType() + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element.properties + properties.backend_address_pool = AAZObjectType( + serialized_name="backendAddressPool", + ) + cls._build_schema_sub_resource_read(properties.backend_address_pool) + properties.backend_ip_configuration = AAZObjectType( + serialized_name="backendIPConfiguration", + ) + cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration) + properties.backend_port = AAZIntType( + serialized_name="backendPort", + ) + properties.enable_floating_ip = AAZBoolType( + serialized_name="enableFloatingIP", + ) + properties.enable_tcp_reset = AAZBoolType( + serialized_name="enableTcpReset", + ) + properties.frontend_ip_configuration = AAZObjectType( + serialized_name="frontendIPConfiguration", + ) + cls._build_schema_sub_resource_read(properties.frontend_ip_configuration) + properties.frontend_port = AAZIntType( + serialized_name="frontendPort", + ) + properties.frontend_port_range_end = AAZIntType( + serialized_name="frontendPortRangeEnd", + ) + properties.frontend_port_range_start = AAZIntType( + serialized_name="frontendPortRangeStart", + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.protocol = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_link_connection_properties = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties + private_link_connection_properties.fqdns = AAZListType( + flags={"read_only": True}, + ) + private_link_connection_properties.group_id = AAZStrType( + serialized_name="groupId", + flags={"read_only": True}, + ) + private_link_connection_properties.required_member_name = AAZStrType( + serialized_name="requiredMemberName", + flags={"read_only": True}, + ) + + fqdns = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties.fqdns + fqdns.Element = AAZStrType() + + virtual_network_taps = _schema_network_interface_ip_configuration_read.properties.virtual_network_taps + virtual_network_taps.Element = AAZObjectType() + cls._build_schema_virtual_network_tap_read(virtual_network_taps.Element) + + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + + _schema_network_interface_tap_configuration_read = None + + @classmethod + def _build_schema_network_interface_tap_configuration_read(cls, _schema): + if cls._schema_network_interface_tap_configuration_read is not None: + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + return + + cls._schema_network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read = AAZObjectType() + + network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read + network_interface_tap_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_tap_configuration_read.id = AAZStrType() + network_interface_tap_configuration_read.name = AAZStrType() + network_interface_tap_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_tap_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_tap_configuration_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.virtual_network_tap = AAZObjectType( + serialized_name="virtualNetworkTap", + ) + cls._build_schema_virtual_network_tap_read(properties.virtual_network_tap) + + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + + _schema_network_interface_read = None + + @classmethod + def _build_schema_network_interface_read(cls, _schema): + if cls._schema_network_interface_read is not None: + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + return + + cls._schema_network_interface_read = _schema_network_interface_read = AAZObjectType() + + network_interface_read = _schema_network_interface_read + network_interface_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(network_interface_read.extended_location) + network_interface_read.id = AAZStrType() + network_interface_read.location = AAZStrType() + network_interface_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_interface_read.tags = AAZDictType() + network_interface_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties + properties.auxiliary_mode = AAZStrType( + serialized_name="auxiliaryMode", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + ) + properties.dscp_configuration = AAZObjectType( + serialized_name="dscpConfiguration", + ) + cls._build_schema_sub_resource_read(properties.dscp_configuration) + properties.enable_accelerated_networking = AAZBoolType( + serialized_name="enableAcceleratedNetworking", + ) + properties.enable_ip_forwarding = AAZBoolType( + serialized_name="enableIPForwarding", + ) + properties.hosted_workloads = AAZListType( + serialized_name="hostedWorkloads", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.mac_address = AAZStrType( + serialized_name="macAddress", + flags={"read_only": True}, + ) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + ) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.nic_type = AAZStrType( + serialized_name="nicType", + ) + properties.primary = AAZBoolType( + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service = AAZObjectType( + serialized_name="privateLinkService", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.tap_configurations = AAZListType( + serialized_name="tapConfigurations", + flags={"read_only": True}, + ) + properties.virtual_machine = AAZObjectType( + serialized_name="virtualMachine", + ) + cls._build_schema_sub_resource_read(properties.virtual_machine) + properties.vnet_encryption_supported = AAZBoolType( + serialized_name="vnetEncryptionSupported", + flags={"read_only": True}, + ) + properties.workload_type = AAZStrType( + serialized_name="workloadType", + ) + + dns_settings = _schema_network_interface_read.properties.dns_settings + dns_settings.applied_dns_servers = AAZListType( + serialized_name="appliedDnsServers", + flags={"read_only": True}, + ) + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.internal_dns_name_label = AAZStrType( + serialized_name="internalDnsNameLabel", + ) + dns_settings.internal_domain_name_suffix = AAZStrType( + serialized_name="internalDomainNameSuffix", + flags={"read_only": True}, + ) + dns_settings.internal_fqdn = AAZStrType( + serialized_name="internalFqdn", + flags={"read_only": True}, + ) + + applied_dns_servers = _schema_network_interface_read.properties.dns_settings.applied_dns_servers + applied_dns_servers.Element = AAZStrType() + + dns_servers = _schema_network_interface_read.properties.dns_settings.dns_servers + dns_servers.Element = AAZStrType() + + hosted_workloads = _schema_network_interface_read.properties.hosted_workloads + hosted_workloads.Element = AAZStrType() + + ip_configurations = _schema_network_interface_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_ip_configuration_read(ip_configurations.Element) + + private_link_service = _schema_network_interface_read.properties.private_link_service + private_link_service.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_link_service.extended_location) + private_link_service.id = AAZStrType() + private_link_service.location = AAZStrType() + private_link_service.name = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_link_service.tags = AAZDictType() + private_link_service.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties + properties.alias = AAZStrType( + flags={"read_only": True}, + ) + properties.auto_approval = AAZObjectType( + serialized_name="autoApproval", + ) + properties.enable_proxy_protocol = AAZBoolType( + serialized_name="enableProxyProtocol", + ) + properties.fqdns = AAZListType() + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.load_balancer_frontend_ip_configurations = AAZListType( + serialized_name="loadBalancerFrontendIpConfigurations", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.visibility = AAZObjectType() + + auto_approval = _schema_network_interface_read.properties.private_link_service.properties.auto_approval + auto_approval.subscriptions = AAZListType() + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.auto_approval.subscriptions + subscriptions.Element = AAZStrType() + + fqdns = _schema_network_interface_read.properties.private_link_service.properties.fqdns + fqdns.Element = AAZStrType() + + ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + + _element = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element.properties + properties.primary = AAZBoolType() + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + load_balancer_frontend_ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.load_balancer_frontend_ip_configurations + load_balancer_frontend_ip_configurations.Element = AAZObjectType() + cls._build_schema_frontend_ip_configuration_read(load_balancer_frontend_ip_configurations.Element) + + network_interfaces = _schema_network_interface_read.properties.private_link_service.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_endpoint_connections = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType() + + _element = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element.properties + properties.link_identifier = AAZStrType( + serialized_name="linkIdentifier", + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + visibility = _schema_network_interface_read.properties.private_link_service.properties.visibility + visibility.subscriptions = AAZListType() + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.visibility.subscriptions + subscriptions.Element = AAZStrType() + + tags = _schema_network_interface_read.properties.private_link_service.tags + tags.Element = AAZStrType() + + tap_configurations = _schema_network_interface_read.properties.tap_configurations + tap_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_tap_configuration_read(tap_configurations.Element) + + tags = _schema_network_interface_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + + _schema_network_security_group_read = None + + @classmethod + def _build_schema_network_security_group_read(cls, _schema): + if cls._schema_network_security_group_read is not None: + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + return + + cls._schema_network_security_group_read = _schema_network_security_group_read = AAZObjectType() + + network_security_group_read = _schema_network_security_group_read + network_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.id = AAZStrType() + network_security_group_read.location = AAZStrType() + network_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + network_security_group_read.tags = AAZDictType() + network_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties + properties.default_security_rules = AAZListType( + serialized_name="defaultSecurityRules", + flags={"read_only": True}, + ) + properties.flow_logs = AAZListType( + serialized_name="flowLogs", + flags={"read_only": True}, + ) + properties.flush_connection = AAZBoolType( + serialized_name="flushConnection", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.security_rules = AAZListType( + serialized_name="securityRules", + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + default_security_rules = _schema_network_security_group_read.properties.default_security_rules + default_security_rules.Element = AAZObjectType() + cls._build_schema_security_rule_read(default_security_rules.Element) + + flow_logs = _schema_network_security_group_read.properties.flow_logs + flow_logs.Element = AAZObjectType() + + _element = _schema_network_security_group_read.properties.flow_logs.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties.flow_logs.Element.properties + properties.enabled = AAZBoolType() + properties.flow_analytics_configuration = AAZObjectType( + serialized_name="flowAnalyticsConfiguration", + ) + properties.format = AAZObjectType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention_policy = AAZObjectType( + serialized_name="retentionPolicy", + ) + properties.storage_id = AAZStrType( + serialized_name="storageId", + flags={"required": True}, + ) + properties.target_resource_guid = AAZStrType( + serialized_name="targetResourceGuid", + flags={"read_only": True}, + ) + properties.target_resource_id = AAZStrType( + serialized_name="targetResourceId", + flags={"required": True}, + ) + + flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration + flow_analytics_configuration.network_watcher_flow_analytics_configuration = AAZObjectType( + serialized_name="networkWatcherFlowAnalyticsConfiguration", + ) + + network_watcher_flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration.network_watcher_flow_analytics_configuration + network_watcher_flow_analytics_configuration.enabled = AAZBoolType() + network_watcher_flow_analytics_configuration.traffic_analytics_interval = AAZIntType( + serialized_name="trafficAnalyticsInterval", + ) + network_watcher_flow_analytics_configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + ) + network_watcher_flow_analytics_configuration.workspace_region = AAZStrType( + serialized_name="workspaceRegion", + ) + network_watcher_flow_analytics_configuration.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + ) + + format = _schema_network_security_group_read.properties.flow_logs.Element.properties.format + format.type = AAZStrType() + format.version = AAZIntType() + + retention_policy = _schema_network_security_group_read.properties.flow_logs.Element.properties.retention_policy + retention_policy.days = AAZIntType() + retention_policy.enabled = AAZBoolType() + + tags = _schema_network_security_group_read.properties.flow_logs.Element.tags + tags.Element = AAZStrType() + + network_interfaces = _schema_network_security_group_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + security_rules = _schema_network_security_group_read.properties.security_rules + security_rules.Element = AAZObjectType() + cls._build_schema_security_rule_read(security_rules.Element) + + subnets = _schema_network_security_group_read.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_network_security_group_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + + _schema_private_endpoint_read = None + + @classmethod + def _build_schema_private_endpoint_read(cls, _schema): + if cls._schema_private_endpoint_read is not None: + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + return + + cls._schema_private_endpoint_read = _schema_private_endpoint_read = AAZObjectType() + + private_endpoint_read = _schema_private_endpoint_read + private_endpoint_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_endpoint_read.extended_location) + private_endpoint_read.id = AAZStrType() + private_endpoint_read.location = AAZStrType() + private_endpoint_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_endpoint_read.tags = AAZDictType() + private_endpoint_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + ) + properties.custom_dns_configs = AAZListType( + serialized_name="customDnsConfigs", + ) + properties.custom_network_interface_name = AAZStrType( + serialized_name="customNetworkInterfaceName", + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + ) + properties.manual_private_link_service_connections = AAZListType( + serialized_name="manualPrivateLinkServiceConnections", + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_link_service_connections = AAZListType( + serialized_name="privateLinkServiceConnections", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + application_security_groups = _schema_private_endpoint_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(application_security_groups.Element) + + custom_dns_configs = _schema_private_endpoint_read.properties.custom_dns_configs + custom_dns_configs.Element = AAZObjectType() + + _element = _schema_private_endpoint_read.properties.custom_dns_configs.Element + _element.fqdn = AAZStrType() + _element.ip_addresses = AAZListType( + serialized_name="ipAddresses", + ) + + ip_addresses = _schema_private_endpoint_read.properties.custom_dns_configs.Element.ip_addresses + ip_addresses.Element = AAZStrType() + + ip_configurations = _schema_private_endpoint_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + + _element = _schema_private_endpoint_read.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties.ip_configurations.Element.properties + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.member_name = AAZStrType( + serialized_name="memberName", + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + ) + + manual_private_link_service_connections = _schema_private_endpoint_read.properties.manual_private_link_service_connections + manual_private_link_service_connections.Element = AAZObjectType() + cls._build_schema_private_link_service_connection_read(manual_private_link_service_connections.Element) + + network_interfaces = _schema_private_endpoint_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType() + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_link_service_connections = _schema_private_endpoint_read.properties.private_link_service_connections + private_link_service_connections.Element = AAZObjectType() + cls._build_schema_private_link_service_connection_read(private_link_service_connections.Element) + + tags = _schema_private_endpoint_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + + _schema_private_link_service_connection_state_read = None + + @classmethod + def _build_schema_private_link_service_connection_state_read(cls, _schema): + if cls._schema_private_link_service_connection_state_read is not None: + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + return + + cls._schema_private_link_service_connection_state_read = _schema_private_link_service_connection_state_read = AAZObjectType() + + private_link_service_connection_state_read = _schema_private_link_service_connection_state_read + private_link_service_connection_state_read.actions_required = AAZStrType( + serialized_name="actionsRequired", + ) + private_link_service_connection_state_read.description = AAZStrType() + private_link_service_connection_state_read.status = AAZStrType() + + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + + _schema_private_link_service_connection_read = None + + @classmethod + def _build_schema_private_link_service_connection_read(cls, _schema): + if cls._schema_private_link_service_connection_read is not None: + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + return + + cls._schema_private_link_service_connection_read = _schema_private_link_service_connection_read = AAZObjectType() + + private_link_service_connection_read = _schema_private_link_service_connection_read + private_link_service_connection_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service_connection_read.id = AAZStrType() + private_link_service_connection_read.name = AAZStrType() + private_link_service_connection_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + private_link_service_connection_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_link_service_connection_read.properties + properties.group_ids = AAZListType( + serialized_name="groupIds", + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.private_link_service_id = AAZStrType( + serialized_name="privateLinkServiceId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.request_message = AAZStrType( + serialized_name="requestMessage", + ) + + group_ids = _schema_private_link_service_connection_read.properties.group_ids + group_ids.Element = AAZStrType() + + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + + _schema_public_ip_address_read = None + + @classmethod + def _build_schema_public_ip_address_read(cls, _schema): + if cls._schema_public_ip_address_read is not None: + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + return + + cls._schema_public_ip_address_read = _schema_public_ip_address_read = AAZObjectType() + + public_ip_address_read = _schema_public_ip_address_read + public_ip_address_read.etag = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(public_ip_address_read.extended_location) + public_ip_address_read.id = AAZStrType() + public_ip_address_read.location = AAZStrType() + public_ip_address_read.name = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + public_ip_address_read.sku = AAZObjectType() + public_ip_address_read.tags = AAZDictType() + public_ip_address_read.type = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties + properties.ddos_settings = AAZObjectType( + serialized_name="ddosSettings", + ) + properties.delete_option = AAZStrType( + serialized_name="deleteOption", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.ip_configuration = AAZObjectType( + serialized_name="ipConfiguration", + ) + cls._build_schema_ip_configuration_read(properties.ip_configuration) + properties.ip_tags = AAZListType( + serialized_name="ipTags", + ) + properties.linked_public_ip_address = AAZObjectType( + serialized_name="linkedPublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.linked_public_ip_address) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address_version = AAZStrType( + serialized_name="publicIPAddressVersion", + ) + properties.public_ip_allocation_method = AAZStrType( + serialized_name="publicIPAllocationMethod", + ) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + ) + cls._build_schema_sub_resource_read(properties.public_ip_prefix) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_public_ip_address = AAZObjectType( + serialized_name="servicePublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.service_public_ip_address) + + ddos_settings = _schema_public_ip_address_read.properties.ddos_settings + ddos_settings.ddos_custom_policy = AAZObjectType( + serialized_name="ddosCustomPolicy", + ) + cls._build_schema_sub_resource_read(ddos_settings.ddos_custom_policy) + ddos_settings.protected_ip = AAZBoolType( + serialized_name="protectedIP", + ) + ddos_settings.protection_coverage = AAZStrType( + serialized_name="protectionCoverage", + ) + + dns_settings = _schema_public_ip_address_read.properties.dns_settings + dns_settings.domain_name_label = AAZStrType( + serialized_name="domainNameLabel", + ) + dns_settings.fqdn = AAZStrType() + dns_settings.reverse_fqdn = AAZStrType( + serialized_name="reverseFqdn", + ) + + ip_tags = _schema_public_ip_address_read.properties.ip_tags + ip_tags.Element = AAZObjectType() + + _element = _schema_public_ip_address_read.properties.ip_tags.Element + _element.ip_tag_type = AAZStrType( + serialized_name="ipTagType", + ) + _element.tag = AAZStrType() + + nat_gateway = _schema_public_ip_address_read.properties.nat_gateway + nat_gateway.etag = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.id = AAZStrType() + nat_gateway.location = AAZStrType() + nat_gateway.name = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + nat_gateway.sku = AAZObjectType() + nat_gateway.tags = AAZDictType() + nat_gateway.type = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties.nat_gateway.properties + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_addresses = AAZListType( + serialized_name="publicIpAddresses", + ) + properties.public_ip_prefixes = AAZListType( + serialized_name="publicIpPrefixes", + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + public_ip_addresses = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses + public_ip_addresses.Element = AAZObjectType() + cls._build_schema_sub_resource_read(public_ip_addresses.Element) + + public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes + public_ip_prefixes.Element = AAZObjectType() + cls._build_schema_sub_resource_read(public_ip_prefixes.Element) + + subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_sub_resource_read(subnets.Element) + + sku = _schema_public_ip_address_read.properties.nat_gateway.sku + sku.name = AAZStrType() + + tags = _schema_public_ip_address_read.properties.nat_gateway.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.properties.nat_gateway.zones + zones.Element = AAZStrType() + + sku = _schema_public_ip_address_read.sku + sku.name = AAZStrType() + sku.tier = AAZStrType() + + tags = _schema_public_ip_address_read.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.zones + zones.Element = AAZStrType() + + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + + _schema_security_rule_read = None + + @classmethod + def _build_schema_security_rule_read(cls, _schema): + if cls._schema_security_rule_read is not None: + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + return + + cls._schema_security_rule_read = _schema_security_rule_read = AAZObjectType() + + security_rule_read = _schema_security_rule_read + security_rule_read.etag = AAZStrType( + flags={"read_only": True}, + ) + security_rule_read.id = AAZStrType() + security_rule_read.name = AAZStrType() + security_rule_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + security_rule_read.type = AAZStrType() + + properties = _schema_security_rule_read.properties + properties.access = AAZStrType( + flags={"required": True}, + ) + properties.description = AAZStrType() + properties.destination_address_prefix = AAZStrType( + serialized_name="destinationAddressPrefix", + ) + properties.destination_address_prefixes = AAZListType( + serialized_name="destinationAddressPrefixes", + ) + properties.destination_application_security_groups = AAZListType( + serialized_name="destinationApplicationSecurityGroups", + ) + properties.destination_port_range = AAZStrType( + serialized_name="destinationPortRange", + ) + properties.destination_port_ranges = AAZListType( + serialized_name="destinationPortRanges", + ) + properties.direction = AAZStrType( + flags={"required": True}, + ) + properties.priority = AAZIntType() + properties.protocol = AAZStrType( + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.source_address_prefix = AAZStrType( + serialized_name="sourceAddressPrefix", + ) + properties.source_address_prefixes = AAZListType( + serialized_name="sourceAddressPrefixes", + ) + properties.source_application_security_groups = AAZListType( + serialized_name="sourceApplicationSecurityGroups", + ) + properties.source_port_range = AAZStrType( + serialized_name="sourcePortRange", + ) + properties.source_port_ranges = AAZListType( + serialized_name="sourcePortRanges", + ) + + destination_address_prefixes = _schema_security_rule_read.properties.destination_address_prefixes + destination_address_prefixes.Element = AAZStrType() + + destination_application_security_groups = _schema_security_rule_read.properties.destination_application_security_groups + destination_application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(destination_application_security_groups.Element) + + destination_port_ranges = _schema_security_rule_read.properties.destination_port_ranges + destination_port_ranges.Element = AAZStrType() + + source_address_prefixes = _schema_security_rule_read.properties.source_address_prefixes + source_address_prefixes.Element = AAZStrType() + + source_application_security_groups = _schema_security_rule_read.properties.source_application_security_groups + source_application_security_groups.Element = AAZObjectType() + cls._build_schema_application_security_group_read(source_application_security_groups.Element) + + source_port_ranges = _schema_security_rule_read.properties.source_port_ranges + source_port_ranges.Element = AAZStrType() + + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + + _schema_sub_resource_read = None + + @classmethod + def _build_schema_sub_resource_read(cls, _schema): + if cls._schema_sub_resource_read is not None: + _schema.id = cls._schema_sub_resource_read.id + return + + cls._schema_sub_resource_read = _schema_sub_resource_read = AAZObjectType() + + sub_resource_read = _schema_sub_resource_read + sub_resource_read.id = AAZStrType() + + _schema.id = cls._schema_sub_resource_read.id + + _schema_subnet_read = None + + @classmethod + def _build_schema_subnet_read(cls, _schema): + if cls._schema_subnet_read is not None: + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + return + + cls._schema_subnet_read = _schema_subnet_read = AAZObjectType() + + subnet_read = _schema_subnet_read + subnet_read.etag = AAZStrType( + flags={"read_only": True}, + ) + subnet_read.id = AAZStrType() + subnet_read.name = AAZStrType() + subnet_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + subnet_read.type = AAZStrType() + + properties = _schema_subnet_read.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + ) + properties.address_prefixes = AAZListType( + serialized_name="addressPrefixes", + ) + properties.application_gateway_ip_configurations = AAZListType( + serialized_name="applicationGatewayIpConfigurations", + ) + properties.delegations = AAZListType() + properties.ip_allocations = AAZListType( + serialized_name="ipAllocations", + ) + properties.ip_configuration_profiles = AAZListType( + serialized_name="ipConfigurationProfiles", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + flags={"read_only": True}, + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + ) + cls._build_schema_sub_resource_read(properties.nat_gateway) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.private_endpoint_network_policies = AAZStrType( + serialized_name="privateEndpointNetworkPolicies", + ) + properties.private_endpoints = AAZListType( + serialized_name="privateEndpoints", + flags={"read_only": True}, + ) + properties.private_link_service_network_policies = AAZStrType( + serialized_name="privateLinkServiceNetworkPolicies", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.purpose = AAZStrType( + flags={"read_only": True}, + ) + properties.resource_navigation_links = AAZListType( + serialized_name="resourceNavigationLinks", + flags={"read_only": True}, + ) + properties.route_table = AAZObjectType( + serialized_name="routeTable", + ) + properties.service_association_links = AAZListType( + serialized_name="serviceAssociationLinks", + flags={"read_only": True}, + ) + properties.service_endpoint_policies = AAZListType( + serialized_name="serviceEndpointPolicies", + ) + properties.service_endpoints = AAZListType( + serialized_name="serviceEndpoints", + ) + + address_prefixes = _schema_subnet_read.properties.address_prefixes + address_prefixes.Element = AAZStrType() + + application_gateway_ip_configurations = _schema_subnet_read.properties.application_gateway_ip_configurations + application_gateway_ip_configurations.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.application_gateway_ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.application_gateway_ip_configurations.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_sub_resource_read(properties.subnet) + + delegations = _schema_subnet_read.properties.delegations + delegations.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.delegations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.delegations.Element.properties + properties.actions = AAZListType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_name = AAZStrType( + serialized_name="serviceName", + ) + + actions = _schema_subnet_read.properties.delegations.Element.properties.actions + actions.Element = AAZStrType() + + ip_allocations = _schema_subnet_read.properties.ip_allocations + ip_allocations.Element = AAZObjectType() + cls._build_schema_sub_resource_read(ip_allocations.Element) + + ip_configuration_profiles = _schema_subnet_read.properties.ip_configuration_profiles + ip_configuration_profiles.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.ip_configuration_profiles.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.ip_configuration_profiles.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + cls._build_schema_subnet_read(properties.subnet) + + ip_configurations = _schema_subnet_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType() + cls._build_schema_ip_configuration_read(ip_configurations.Element) + + private_endpoints = _schema_subnet_read.properties.private_endpoints + private_endpoints.Element = AAZObjectType() + cls._build_schema_private_endpoint_read(private_endpoints.Element) + + resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links + resource_navigation_links.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.resource_navigation_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.resource_navigation_links.Element.properties + properties.link = AAZStrType() + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + route_table = _schema_subnet_read.properties.route_table + route_table.etag = AAZStrType( + flags={"read_only": True}, + ) + route_table.id = AAZStrType() + route_table.location = AAZStrType() + route_table.name = AAZStrType( + flags={"read_only": True}, + ) + route_table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + route_table.tags = AAZDictType() + route_table.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.route_table.properties + properties.disable_bgp_route_propagation = AAZBoolType( + serialized_name="disableBgpRoutePropagation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.routes = AAZListType() + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + routes = _schema_subnet_read.properties.route_table.properties.routes + routes.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.route_table.properties.routes.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.route_table.properties.routes.Element.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + ) + properties.has_bgp_override = AAZBoolType( + serialized_name="hasBgpOverride", + ) + properties.next_hop_ip_address = AAZStrType( + serialized_name="nextHopIpAddress", + ) + properties.next_hop_type = AAZStrType( + serialized_name="nextHopType", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + subnets = _schema_subnet_read.properties.route_table.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.route_table.tags + tags.Element = AAZStrType() + + service_association_links = _schema_subnet_read.properties.service_association_links + service_association_links.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_association_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_association_links.Element.properties + properties.allow_delete = AAZBoolType( + serialized_name="allowDelete", + ) + properties.link = AAZStrType() + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + ) + properties.locations = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + locations = _schema_subnet_read.properties.service_association_links.Element.properties.locations + locations.Element = AAZStrType() + + service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies + service_endpoint_policies.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.kind = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties + properties.contextual_service_endpoint_policies = AAZListType( + serialized_name="contextualServiceEndpointPolicies", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_alias = AAZStrType( + serialized_name="serviceAlias", + ) + properties.service_endpoint_policy_definitions = AAZListType( + serialized_name="serviceEndpointPolicyDefinitions", + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + contextual_service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.contextual_service_endpoint_policies + contextual_service_endpoint_policies.Element = AAZStrType() + + service_endpoint_policy_definitions = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions + service_endpoint_policy_definitions.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType() + _element.name = AAZStrType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType() + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service = AAZStrType() + properties.service_resources = AAZListType( + serialized_name="serviceResources", + ) + + service_resources = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties.service_resources + service_resources.Element = AAZStrType() + + subnets = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.subnets + subnets.Element = AAZObjectType() + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.service_endpoint_policies.Element.tags + tags.Element = AAZStrType() + + service_endpoints = _schema_subnet_read.properties.service_endpoints + service_endpoints.Element = AAZObjectType() + + _element = _schema_subnet_read.properties.service_endpoints.Element + _element.locations = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + _element.service = AAZStrType() + + locations = _schema_subnet_read.properties.service_endpoints.Element.locations + locations.Element = AAZStrType() + + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + + _schema_virtual_network_tap_read = None + + @classmethod + def _build_schema_virtual_network_tap_read(cls, _schema): + if cls._schema_virtual_network_tap_read is not None: + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + return + + cls._schema_virtual_network_tap_read = _schema_virtual_network_tap_read = AAZObjectType() + + virtual_network_tap_read = _schema_virtual_network_tap_read + virtual_network_tap_read.etag = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.id = AAZStrType() + virtual_network_tap_read.location = AAZStrType() + virtual_network_tap_read.name = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + virtual_network_tap_read.tags = AAZDictType() + virtual_network_tap_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_virtual_network_tap_read.properties + properties.destination_load_balancer_front_end_ip_configuration = AAZObjectType( + serialized_name="destinationLoadBalancerFrontEndIPConfiguration", + ) + cls._build_schema_frontend_ip_configuration_read(properties.destination_load_balancer_front_end_ip_configuration) + properties.destination_network_interface_ip_configuration = AAZObjectType( + serialized_name="destinationNetworkInterfaceIPConfiguration", + ) + cls._build_schema_network_interface_ip_configuration_read(properties.destination_network_interface_ip_configuration) + properties.destination_port = AAZIntType( + serialized_name="destinationPort", + ) + properties.network_interface_tap_configurations = AAZListType( + serialized_name="networkInterfaceTapConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + network_interface_tap_configurations = _schema_virtual_network_tap_read.properties.network_interface_tap_configurations + network_interface_tap_configurations.Element = AAZObjectType() + cls._build_schema_network_interface_tap_configuration_read(network_interface_tap_configurations.Element) + + tags = _schema_virtual_network_tap_read.tags + tags.Element = AAZStrType() + + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + + +__all__ = ["Show"] diff --git a/src/ssh/azext_ssh/aaz/latest/network/public_ip/__cmd_group.py b/src/ssh/azext_ssh/aaz/latest/network/public_ip/__cmd_group.py new file mode 100644 index 00000000000..569e6343494 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/public_ip/__cmd_group.py @@ -0,0 +1,22 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class __CMDGroup(AAZCommandGroup): + """Manage public IP addresses. + + To learn more about public IP addresses visit https://docs.microsoft.com/azure/virtual-network/virtual-network-public-ip-address. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/ssh/azext_ssh/aaz/latest/network/public_ip/__init__.py b/src/ssh/azext_ssh/aaz/latest/network/public_ip/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/public_ip/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/ssh/azext_ssh/aaz/latest/network/public_ip/_show.py b/src/ssh/azext_ssh/aaz/latest/network/public_ip/_show.py new file mode 100644 index 00000000000..37d6f1a6212 --- /dev/null +++ b/src/ssh/azext_ssh/aaz/latest/network/public_ip/_show.py @@ -0,0 +1,2816 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Show(AAZCommand): + """Get the details of a public IP address. + + :example: Get information about a public IP resource. + az network public-ip show -g MyResourceGroup -n MyIp + + :example: Get the FQDN and IP address of a public IP resource. + az network public-ip show -g MyResourceGroup -n MyIp --query "{fqdn: dnsSettings.fqdn,address: ipAddress}" + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/publicipaddresses/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The name of the public IP address.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.expand = AAZStrArg( + options=["--expand"], + help="Expands referenced resources.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PublicIPAddressesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PublicIPAddressesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "publicIpAddressName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$expand", self.ctx.args.expand, + ), + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _ShowHelper._build_schema_public_ip_address_read(cls._schema_on_200) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_application_security_group_read = None + + @classmethod + def _build_schema_application_security_group_read(cls, _schema): + if cls._schema_application_security_group_read is not None: + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + return + + cls._schema_application_security_group_read = _schema_application_security_group_read = AAZObjectType( + flags={"read_only": True} + ) + + application_security_group_read = _schema_application_security_group_read + application_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.id = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.location = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + application_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + application_security_group_read.tags = AAZDictType( + flags={"read_only": True}, + ) + application_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_application_security_group_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + tags = _schema_application_security_group_read.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_application_security_group_read.etag + _schema.id = cls._schema_application_security_group_read.id + _schema.location = cls._schema_application_security_group_read.location + _schema.name = cls._schema_application_security_group_read.name + _schema.properties = cls._schema_application_security_group_read.properties + _schema.tags = cls._schema_application_security_group_read.tags + _schema.type = cls._schema_application_security_group_read.type + + _schema_extended_location_read = None + + @classmethod + def _build_schema_extended_location_read(cls, _schema): + if cls._schema_extended_location_read is not None: + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + return + + cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType() + + extended_location_read = _schema_extended_location_read + extended_location_read.name = AAZStrType() + extended_location_read.type = AAZStrType() + + _schema.name = cls._schema_extended_location_read.name + _schema.type = cls._schema_extended_location_read.type + + _schema_frontend_ip_configuration_read = None + + @classmethod + def _build_schema_frontend_ip_configuration_read(cls, _schema): + if cls._schema_frontend_ip_configuration_read is not None: + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + return + + cls._schema_frontend_ip_configuration_read = _schema_frontend_ip_configuration_read = AAZObjectType( + flags={"read_only": True} + ) + + frontend_ip_configuration_read = _schema_frontend_ip_configuration_read + frontend_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.id = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.name = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + frontend_ip_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + frontend_ip_configuration_read.zones = AAZListType( + flags={"read_only": True}, + ) + + properties = _schema_frontend_ip_configuration_read.properties + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.inbound_nat_pools = AAZListType( + serialized_name="inboundNatPools", + flags={"read_only": True}, + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + flags={"read_only": True}, + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + flags={"read_only": True}, + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.public_ip_prefix) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(properties.subnet) + + inbound_nat_pools = _schema_frontend_ip_configuration_read.properties.inbound_nat_pools + inbound_nat_pools.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(inbound_nat_pools.Element) + + inbound_nat_rules = _schema_frontend_ip_configuration_read.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancing_rules = _schema_frontend_ip_configuration_read.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_frontend_ip_configuration_read.properties.outbound_rules + outbound_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(outbound_rules.Element) + + zones = _schema_frontend_ip_configuration_read.zones + zones.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_frontend_ip_configuration_read.etag + _schema.id = cls._schema_frontend_ip_configuration_read.id + _schema.name = cls._schema_frontend_ip_configuration_read.name + _schema.properties = cls._schema_frontend_ip_configuration_read.properties + _schema.type = cls._schema_frontend_ip_configuration_read.type + _schema.zones = cls._schema_frontend_ip_configuration_read.zones + + _schema_ip_configuration_read = None + + @classmethod + def _build_schema_ip_configuration_read(cls, _schema): + if cls._schema_ip_configuration_read is not None: + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + return + + cls._schema_ip_configuration_read = _schema_ip_configuration_read = AAZObjectType( + flags={"read_only": True} + ) + + ip_configuration_read = _schema_ip_configuration_read + ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + ip_configuration_read.id = AAZStrType( + flags={"read_only": True}, + ) + ip_configuration_read.name = AAZStrType( + flags={"read_only": True}, + ) + ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + + properties = _schema_ip_configuration_read.properties + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + flags={"read_only": True}, + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(properties.subnet) + + _schema.etag = cls._schema_ip_configuration_read.etag + _schema.id = cls._schema_ip_configuration_read.id + _schema.name = cls._schema_ip_configuration_read.name + _schema.properties = cls._schema_ip_configuration_read.properties + + _schema_network_interface_ip_configuration_read = None + + @classmethod + def _build_schema_network_interface_ip_configuration_read(cls, _schema): + if cls._schema_network_interface_ip_configuration_read is not None: + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + return + + cls._schema_network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read = AAZObjectType( + flags={"read_only": True} + ) + + network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read + network_interface_ip_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_ip_configuration_read.id = AAZStrType( + flags={"read_only": True}, + ) + network_interface_ip_configuration_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_interface_ip_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + network_interface_ip_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties + properties.application_gateway_backend_address_pools = AAZListType( + serialized_name="applicationGatewayBackendAddressPools", + flags={"read_only": True}, + ) + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + flags={"read_only": True}, + ) + properties.gateway_load_balancer = AAZObjectType( + serialized_name="gatewayLoadBalancer", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.gateway_load_balancer) + properties.load_balancer_backend_address_pools = AAZListType( + serialized_name="loadBalancerBackendAddressPools", + flags={"read_only": True}, + ) + properties.load_balancer_inbound_nat_rules = AAZListType( + serialized_name="loadBalancerInboundNatRules", + flags={"read_only": True}, + ) + properties.primary = AAZBoolType( + flags={"read_only": True}, + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + flags={"read_only": True}, + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + flags={"read_only": True}, + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + flags={"read_only": True}, + ) + properties.private_link_connection_properties = AAZObjectType( + serialized_name="privateLinkConnectionProperties", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address = AAZObjectType( + serialized_name="publicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.public_ip_address) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(properties.subnet) + properties.virtual_network_taps = AAZListType( + serialized_name="virtualNetworkTaps", + flags={"read_only": True}, + ) + + application_gateway_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools + application_gateway_backend_address_pools.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties + properties.backend_addresses = AAZListType( + serialized_name="backendAddresses", + flags={"read_only": True}, + ) + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + backend_addresses = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses + backend_addresses.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses.Element + _element.fqdn = AAZStrType( + flags={"read_only": True}, + ) + _element.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + application_security_groups = _schema_network_interface_ip_configuration_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_application_security_group_read(application_security_groups.Element) + + load_balancer_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools + load_balancer_backend_address_pools.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties + properties.backend_ip_configurations = AAZListType( + serialized_name="backendIPConfigurations", + flags={"read_only": True}, + ) + properties.drain_period_in_seconds = AAZIntType( + serialized_name="drainPeriodInSeconds", + flags={"read_only": True}, + ) + properties.inbound_nat_rules = AAZListType( + serialized_name="inboundNatRules", + flags={"read_only": True}, + ) + properties.load_balancer_backend_addresses = AAZListType( + serialized_name="loadBalancerBackendAddresses", + flags={"read_only": True}, + ) + properties.load_balancing_rules = AAZListType( + serialized_name="loadBalancingRules", + flags={"read_only": True}, + ) + properties.location = AAZStrType( + flags={"read_only": True}, + ) + properties.outbound_rule = AAZObjectType( + serialized_name="outboundRule", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.outbound_rule) + properties.outbound_rules = AAZListType( + serialized_name="outboundRules", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.tunnel_interfaces = AAZListType( + serialized_name="tunnelInterfaces", + flags={"read_only": True}, + ) + + backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.backend_ip_configurations + backend_ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) + + inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.inbound_nat_rules + inbound_nat_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(inbound_nat_rules.Element) + + load_balancer_backend_addresses = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses + load_balancer_backend_addresses.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties + properties.admin_state = AAZStrType( + serialized_name="adminState", + flags={"read_only": True}, + ) + properties.inbound_nat_rules_port_mapping = AAZListType( + serialized_name="inboundNatRulesPortMapping", + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"read_only": True}, + ) + properties.load_balancer_frontend_ip_configuration = AAZObjectType( + serialized_name="loadBalancerFrontendIPConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration) + properties.network_interface_ip_configuration = AAZObjectType( + serialized_name="networkInterfaceIPConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.subnet) + properties.virtual_network = AAZObjectType( + serialized_name="virtualNetwork", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.virtual_network) + + inbound_nat_rules_port_mapping = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping + inbound_nat_rules_port_mapping.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping.Element + _element.backend_port = AAZIntType( + serialized_name="backendPort", + flags={"read_only": True}, + ) + _element.frontend_port = AAZIntType( + serialized_name="frontendPort", + flags={"read_only": True}, + ) + _element.inbound_nat_rule_name = AAZStrType( + serialized_name="inboundNatRuleName", + flags={"read_only": True}, + ) + + load_balancing_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancing_rules + load_balancing_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(load_balancing_rules.Element) + + outbound_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.outbound_rules + outbound_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(outbound_rules.Element) + + tunnel_interfaces = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces + tunnel_interfaces.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces.Element + _element.identifier = AAZIntType( + flags={"read_only": True}, + ) + _element.port = AAZIntType( + flags={"read_only": True}, + ) + _element.protocol = AAZStrType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + load_balancer_inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules + load_balancer_inbound_nat_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element.properties + properties.backend_address_pool = AAZObjectType( + serialized_name="backendAddressPool", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.backend_address_pool) + properties.backend_ip_configuration = AAZObjectType( + serialized_name="backendIPConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration) + properties.backend_port = AAZIntType( + serialized_name="backendPort", + flags={"read_only": True}, + ) + properties.enable_floating_ip = AAZBoolType( + serialized_name="enableFloatingIP", + flags={"read_only": True}, + ) + properties.enable_tcp_reset = AAZBoolType( + serialized_name="enableTcpReset", + flags={"read_only": True}, + ) + properties.frontend_ip_configuration = AAZObjectType( + serialized_name="frontendIPConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.frontend_ip_configuration) + properties.frontend_port = AAZIntType( + serialized_name="frontendPort", + flags={"read_only": True}, + ) + properties.frontend_port_range_end = AAZIntType( + serialized_name="frontendPortRangeEnd", + flags={"read_only": True}, + ) + properties.frontend_port_range_start = AAZIntType( + serialized_name="frontendPortRangeStart", + flags={"read_only": True}, + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + flags={"read_only": True}, + ) + properties.protocol = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + private_link_connection_properties = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties + private_link_connection_properties.fqdns = AAZListType( + flags={"read_only": True}, + ) + private_link_connection_properties.group_id = AAZStrType( + serialized_name="groupId", + flags={"read_only": True}, + ) + private_link_connection_properties.required_member_name = AAZStrType( + serialized_name="requiredMemberName", + flags={"read_only": True}, + ) + + fqdns = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties.fqdns + fqdns.Element = AAZStrType( + flags={"read_only": True}, + ) + + virtual_network_taps = _schema_network_interface_ip_configuration_read.properties.virtual_network_taps + virtual_network_taps.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_virtual_network_tap_read(virtual_network_taps.Element) + + _schema.etag = cls._schema_network_interface_ip_configuration_read.etag + _schema.id = cls._schema_network_interface_ip_configuration_read.id + _schema.name = cls._schema_network_interface_ip_configuration_read.name + _schema.properties = cls._schema_network_interface_ip_configuration_read.properties + _schema.type = cls._schema_network_interface_ip_configuration_read.type + + _schema_network_interface_tap_configuration_read = None + + @classmethod + def _build_schema_network_interface_tap_configuration_read(cls, _schema): + if cls._schema_network_interface_tap_configuration_read is not None: + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + return + + cls._schema_network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read = AAZObjectType( + flags={"read_only": True} + ) + + network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read + network_interface_tap_configuration_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_tap_configuration_read.id = AAZStrType( + flags={"read_only": True}, + ) + network_interface_tap_configuration_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_interface_tap_configuration_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + network_interface_tap_configuration_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_tap_configuration_read.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.virtual_network_tap = AAZObjectType( + serialized_name="virtualNetworkTap", + flags={"read_only": True}, + ) + cls._build_schema_virtual_network_tap_read(properties.virtual_network_tap) + + _schema.etag = cls._schema_network_interface_tap_configuration_read.etag + _schema.id = cls._schema_network_interface_tap_configuration_read.id + _schema.name = cls._schema_network_interface_tap_configuration_read.name + _schema.properties = cls._schema_network_interface_tap_configuration_read.properties + _schema.type = cls._schema_network_interface_tap_configuration_read.type + + _schema_network_interface_read = None + + @classmethod + def _build_schema_network_interface_read(cls, _schema): + if cls._schema_network_interface_read is not None: + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + return + + cls._schema_network_interface_read = _schema_network_interface_read = AAZObjectType( + flags={"read_only": True} + ) + + network_interface_read = _schema_network_interface_read + network_interface_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(network_interface_read.extended_location) + network_interface_read.id = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.location = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_interface_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + network_interface_read.tags = AAZDictType( + flags={"read_only": True}, + ) + network_interface_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties + properties.auxiliary_mode = AAZStrType( + serialized_name="auxiliaryMode", + flags={"read_only": True}, + ) + properties.disable_tcp_state_tracking = AAZBoolType( + serialized_name="disableTcpStateTracking", + flags={"read_only": True}, + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + flags={"read_only": True}, + ) + properties.dscp_configuration = AAZObjectType( + serialized_name="dscpConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.dscp_configuration) + properties.enable_accelerated_networking = AAZBoolType( + serialized_name="enableAcceleratedNetworking", + flags={"read_only": True}, + ) + properties.enable_ip_forwarding = AAZBoolType( + serialized_name="enableIPForwarding", + flags={"read_only": True}, + ) + properties.hosted_workloads = AAZListType( + serialized_name="hostedWorkloads", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + flags={"read_only": True}, + ) + properties.mac_address = AAZStrType( + serialized_name="macAddress", + flags={"read_only": True}, + ) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + flags={"read_only": True}, + ) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + flags={"read_only": True}, + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.nic_type = AAZStrType( + serialized_name="nicType", + flags={"read_only": True}, + ) + properties.primary = AAZBoolType( + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + flags={"read_only": True}, + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service = AAZObjectType( + serialized_name="privateLinkService", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.tap_configurations = AAZListType( + serialized_name="tapConfigurations", + flags={"read_only": True}, + ) + properties.virtual_machine = AAZObjectType( + serialized_name="virtualMachine", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.virtual_machine) + properties.vnet_encryption_supported = AAZBoolType( + serialized_name="vnetEncryptionSupported", + flags={"read_only": True}, + ) + properties.workload_type = AAZStrType( + serialized_name="workloadType", + flags={"read_only": True}, + ) + + dns_settings = _schema_network_interface_read.properties.dns_settings + dns_settings.applied_dns_servers = AAZListType( + serialized_name="appliedDnsServers", + flags={"read_only": True}, + ) + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + flags={"read_only": True}, + ) + dns_settings.internal_dns_name_label = AAZStrType( + serialized_name="internalDnsNameLabel", + flags={"read_only": True}, + ) + dns_settings.internal_domain_name_suffix = AAZStrType( + serialized_name="internalDomainNameSuffix", + flags={"read_only": True}, + ) + dns_settings.internal_fqdn = AAZStrType( + serialized_name="internalFqdn", + flags={"read_only": True}, + ) + + applied_dns_servers = _schema_network_interface_read.properties.dns_settings.applied_dns_servers + applied_dns_servers.Element = AAZStrType( + flags={"read_only": True}, + ) + + dns_servers = _schema_network_interface_read.properties.dns_settings.dns_servers + dns_servers.Element = AAZStrType( + flags={"read_only": True}, + ) + + hosted_workloads = _schema_network_interface_read.properties.hosted_workloads + hosted_workloads.Element = AAZStrType( + flags={"read_only": True}, + ) + + ip_configurations = _schema_network_interface_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_ip_configuration_read(ip_configurations.Element) + + private_link_service = _schema_network_interface_read.properties.private_link_service + private_link_service.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_link_service.extended_location) + private_link_service.id = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.location = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.name = AAZStrType( + flags={"read_only": True}, + ) + private_link_service.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + private_link_service.tags = AAZDictType( + flags={"read_only": True}, + ) + private_link_service.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties + properties.alias = AAZStrType( + flags={"read_only": True}, + ) + properties.auto_approval = AAZObjectType( + serialized_name="autoApproval", + flags={"read_only": True}, + ) + properties.enable_proxy_protocol = AAZBoolType( + serialized_name="enableProxyProtocol", + flags={"read_only": True}, + ) + properties.fqdns = AAZListType( + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + flags={"read_only": True}, + ) + properties.load_balancer_frontend_ip_configurations = AAZListType( + serialized_name="loadBalancerFrontendIpConfigurations", + flags={"read_only": True}, + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_endpoint_connections = AAZListType( + serialized_name="privateEndpointConnections", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.visibility = AAZObjectType( + flags={"read_only": True}, + ) + + auto_approval = _schema_network_interface_read.properties.private_link_service.properties.auto_approval + auto_approval.subscriptions = AAZListType( + flags={"read_only": True}, + ) + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.auto_approval.subscriptions + subscriptions.Element = AAZStrType( + flags={"read_only": True}, + ) + + fqdns = _schema_network_interface_read.properties.private_link_service.properties.fqdns + fqdns.Element = AAZStrType( + flags={"read_only": True}, + ) + + ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations + ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element.properties + properties.primary = AAZBoolType( + flags={"read_only": True}, + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + flags={"read_only": True}, + ) + properties.private_ip_address_version = AAZStrType( + serialized_name="privateIPAddressVersion", + flags={"read_only": True}, + ) + properties.private_ip_allocation_method = AAZStrType( + serialized_name="privateIPAllocationMethod", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(properties.subnet) + + load_balancer_frontend_ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.load_balancer_frontend_ip_configurations + load_balancer_frontend_ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_frontend_ip_configuration_read(load_balancer_frontend_ip_configurations.Element) + + network_interfaces = _schema_network_interface_read.properties.private_link_service.properties.network_interfaces + network_interfaces.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_endpoint_connections = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections + private_endpoint_connections.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element.properties + properties.link_identifier = AAZStrType( + serialized_name="linkIdentifier", + flags={"read_only": True}, + ) + properties.private_endpoint = AAZObjectType( + serialized_name="privateEndpoint", + flags={"read_only": True}, + ) + cls._build_schema_private_endpoint_read(properties.private_endpoint) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"read_only": True}, + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + visibility = _schema_network_interface_read.properties.private_link_service.properties.visibility + visibility.subscriptions = AAZListType( + flags={"read_only": True}, + ) + + subscriptions = _schema_network_interface_read.properties.private_link_service.properties.visibility.subscriptions + subscriptions.Element = AAZStrType( + flags={"read_only": True}, + ) + + tags = _schema_network_interface_read.properties.private_link_service.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + tap_configurations = _schema_network_interface_read.properties.tap_configurations + tap_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_tap_configuration_read(tap_configurations.Element) + + tags = _schema_network_interface_read.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_network_interface_read.etag + _schema.extended_location = cls._schema_network_interface_read.extended_location + _schema.id = cls._schema_network_interface_read.id + _schema.location = cls._schema_network_interface_read.location + _schema.name = cls._schema_network_interface_read.name + _schema.properties = cls._schema_network_interface_read.properties + _schema.tags = cls._schema_network_interface_read.tags + _schema.type = cls._schema_network_interface_read.type + + _schema_network_security_group_read = None + + @classmethod + def _build_schema_network_security_group_read(cls, _schema): + if cls._schema_network_security_group_read is not None: + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + return + + cls._schema_network_security_group_read = _schema_network_security_group_read = AAZObjectType( + flags={"read_only": True} + ) + + network_security_group_read = _schema_network_security_group_read + network_security_group_read.etag = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.id = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.location = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + network_security_group_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + network_security_group_read.tags = AAZDictType( + flags={"read_only": True}, + ) + network_security_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties + properties.default_security_rules = AAZListType( + serialized_name="defaultSecurityRules", + flags={"read_only": True}, + ) + properties.flow_logs = AAZListType( + serialized_name="flowLogs", + flags={"read_only": True}, + ) + properties.flush_connection = AAZBoolType( + serialized_name="flushConnection", + flags={"read_only": True}, + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.security_rules = AAZListType( + serialized_name="securityRules", + flags={"read_only": True}, + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + default_security_rules = _schema_network_security_group_read.properties.default_security_rules + default_security_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_security_rule_read(default_security_rules.Element) + + flow_logs = _schema_network_security_group_read.properties.flow_logs + flow_logs.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_network_security_group_read.properties.flow_logs.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.tags = AAZDictType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_network_security_group_read.properties.flow_logs.Element.properties + properties.enabled = AAZBoolType( + flags={"read_only": True}, + ) + properties.flow_analytics_configuration = AAZObjectType( + serialized_name="flowAnalyticsConfiguration", + flags={"read_only": True}, + ) + properties.format = AAZObjectType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention_policy = AAZObjectType( + serialized_name="retentionPolicy", + flags={"read_only": True}, + ) + properties.storage_id = AAZStrType( + serialized_name="storageId", + flags={"required": True, "read_only": True}, + ) + properties.target_resource_guid = AAZStrType( + serialized_name="targetResourceGuid", + flags={"read_only": True}, + ) + properties.target_resource_id = AAZStrType( + serialized_name="targetResourceId", + flags={"required": True, "read_only": True}, + ) + + flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration + flow_analytics_configuration.network_watcher_flow_analytics_configuration = AAZObjectType( + serialized_name="networkWatcherFlowAnalyticsConfiguration", + flags={"read_only": True}, + ) + + network_watcher_flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration.network_watcher_flow_analytics_configuration + network_watcher_flow_analytics_configuration.enabled = AAZBoolType( + flags={"read_only": True}, + ) + network_watcher_flow_analytics_configuration.traffic_analytics_interval = AAZIntType( + serialized_name="trafficAnalyticsInterval", + flags={"read_only": True}, + ) + network_watcher_flow_analytics_configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + flags={"read_only": True}, + ) + network_watcher_flow_analytics_configuration.workspace_region = AAZStrType( + serialized_name="workspaceRegion", + flags={"read_only": True}, + ) + network_watcher_flow_analytics_configuration.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + flags={"read_only": True}, + ) + + format = _schema_network_security_group_read.properties.flow_logs.Element.properties.format + format.type = AAZStrType( + flags={"read_only": True}, + ) + format.version = AAZIntType( + flags={"read_only": True}, + ) + + retention_policy = _schema_network_security_group_read.properties.flow_logs.Element.properties.retention_policy + retention_policy.days = AAZIntType( + flags={"read_only": True}, + ) + retention_policy.enabled = AAZBoolType( + flags={"read_only": True}, + ) + + tags = _schema_network_security_group_read.properties.flow_logs.Element.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + network_interfaces = _schema_network_security_group_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_read(network_interfaces.Element) + + security_rules = _schema_network_security_group_read.properties.security_rules + security_rules.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_security_rule_read(security_rules.Element) + + subnets = _schema_network_security_group_read.properties.subnets + subnets.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_network_security_group_read.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_network_security_group_read.etag + _schema.id = cls._schema_network_security_group_read.id + _schema.location = cls._schema_network_security_group_read.location + _schema.name = cls._schema_network_security_group_read.name + _schema.properties = cls._schema_network_security_group_read.properties + _schema.tags = cls._schema_network_security_group_read.tags + _schema.type = cls._schema_network_security_group_read.type + + _schema_private_endpoint_read = None + + @classmethod + def _build_schema_private_endpoint_read(cls, _schema): + if cls._schema_private_endpoint_read is not None: + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + return + + cls._schema_private_endpoint_read = _schema_private_endpoint_read = AAZObjectType( + flags={"read_only": True} + ) + + private_endpoint_read = _schema_private_endpoint_read + private_endpoint_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(private_endpoint_read.extended_location) + private_endpoint_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.location = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_endpoint_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + private_endpoint_read.tags = AAZDictType( + flags={"read_only": True}, + ) + private_endpoint_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties + properties.application_security_groups = AAZListType( + serialized_name="applicationSecurityGroups", + flags={"read_only": True}, + ) + properties.custom_dns_configs = AAZListType( + serialized_name="customDnsConfigs", + flags={"read_only": True}, + ) + properties.custom_network_interface_name = AAZStrType( + serialized_name="customNetworkInterfaceName", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + flags={"read_only": True}, + ) + properties.manual_private_link_service_connections = AAZListType( + serialized_name="manualPrivateLinkServiceConnections", + flags={"read_only": True}, + ) + properties.network_interfaces = AAZListType( + serialized_name="networkInterfaces", + flags={"read_only": True}, + ) + properties.private_link_service_connections = AAZListType( + serialized_name="privateLinkServiceConnections", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(properties.subnet) + + application_security_groups = _schema_private_endpoint_read.properties.application_security_groups + application_security_groups.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_application_security_group_read(application_security_groups.Element) + + custom_dns_configs = _schema_private_endpoint_read.properties.custom_dns_configs + custom_dns_configs.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_private_endpoint_read.properties.custom_dns_configs.Element + _element.fqdn = AAZStrType( + flags={"read_only": True}, + ) + _element.ip_addresses = AAZListType( + serialized_name="ipAddresses", + flags={"read_only": True}, + ) + + ip_addresses = _schema_private_endpoint_read.properties.custom_dns_configs.Element.ip_addresses + ip_addresses.Element = AAZStrType( + flags={"read_only": True}, + ) + + ip_configurations = _schema_private_endpoint_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_private_endpoint_read.properties.ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_endpoint_read.properties.ip_configurations.Element.properties + properties.group_id = AAZStrType( + serialized_name="groupId", + flags={"read_only": True}, + ) + properties.member_name = AAZStrType( + serialized_name="memberName", + flags={"read_only": True}, + ) + properties.private_ip_address = AAZStrType( + serialized_name="privateIPAddress", + flags={"read_only": True}, + ) + + manual_private_link_service_connections = _schema_private_endpoint_read.properties.manual_private_link_service_connections + manual_private_link_service_connections.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_private_link_service_connection_read(manual_private_link_service_connections.Element) + + network_interfaces = _schema_private_endpoint_read.properties.network_interfaces + network_interfaces.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_read(network_interfaces.Element) + + private_link_service_connections = _schema_private_endpoint_read.properties.private_link_service_connections + private_link_service_connections.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_private_link_service_connection_read(private_link_service_connections.Element) + + tags = _schema_private_endpoint_read.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_private_endpoint_read.etag + _schema.extended_location = cls._schema_private_endpoint_read.extended_location + _schema.id = cls._schema_private_endpoint_read.id + _schema.location = cls._schema_private_endpoint_read.location + _schema.name = cls._schema_private_endpoint_read.name + _schema.properties = cls._schema_private_endpoint_read.properties + _schema.tags = cls._schema_private_endpoint_read.tags + _schema.type = cls._schema_private_endpoint_read.type + + _schema_private_link_service_connection_state_read = None + + @classmethod + def _build_schema_private_link_service_connection_state_read(cls, _schema): + if cls._schema_private_link_service_connection_state_read is not None: + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + return + + cls._schema_private_link_service_connection_state_read = _schema_private_link_service_connection_state_read = AAZObjectType( + flags={"read_only": True} + ) + + private_link_service_connection_state_read = _schema_private_link_service_connection_state_read + private_link_service_connection_state_read.actions_required = AAZStrType( + serialized_name="actionsRequired", + flags={"read_only": True}, + ) + private_link_service_connection_state_read.description = AAZStrType( + flags={"read_only": True}, + ) + private_link_service_connection_state_read.status = AAZStrType( + flags={"read_only": True}, + ) + + _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required + _schema.description = cls._schema_private_link_service_connection_state_read.description + _schema.status = cls._schema_private_link_service_connection_state_read.status + + _schema_private_link_service_connection_read = None + + @classmethod + def _build_schema_private_link_service_connection_read(cls, _schema): + if cls._schema_private_link_service_connection_read is not None: + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + return + + cls._schema_private_link_service_connection_read = _schema_private_link_service_connection_read = AAZObjectType( + flags={"read_only": True} + ) + + private_link_service_connection_read = _schema_private_link_service_connection_read + private_link_service_connection_read.etag = AAZStrType( + flags={"read_only": True}, + ) + private_link_service_connection_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_link_service_connection_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_link_service_connection_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + private_link_service_connection_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_private_link_service_connection_read.properties + properties.group_ids = AAZListType( + serialized_name="groupIds", + flags={"read_only": True}, + ) + properties.private_link_service_connection_state = AAZObjectType( + serialized_name="privateLinkServiceConnectionState", + flags={"read_only": True}, + ) + cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) + properties.private_link_service_id = AAZStrType( + serialized_name="privateLinkServiceId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.request_message = AAZStrType( + serialized_name="requestMessage", + flags={"read_only": True}, + ) + + group_ids = _schema_private_link_service_connection_read.properties.group_ids + group_ids.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_private_link_service_connection_read.etag + _schema.id = cls._schema_private_link_service_connection_read.id + _schema.name = cls._schema_private_link_service_connection_read.name + _schema.properties = cls._schema_private_link_service_connection_read.properties + _schema.type = cls._schema_private_link_service_connection_read.type + + _schema_public_ip_address_read = None + + @classmethod + def _build_schema_public_ip_address_read(cls, _schema): + if cls._schema_public_ip_address_read is not None: + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + return + + cls._schema_public_ip_address_read = _schema_public_ip_address_read = AAZObjectType() + + public_ip_address_read = _schema_public_ip_address_read + public_ip_address_read.etag = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.extended_location = AAZObjectType( + serialized_name="extendedLocation", + ) + cls._build_schema_extended_location_read(public_ip_address_read.extended_location) + public_ip_address_read.id = AAZStrType() + public_ip_address_read.location = AAZStrType() + public_ip_address_read.name = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + public_ip_address_read.sku = AAZObjectType() + public_ip_address_read.tags = AAZDictType() + public_ip_address_read.type = AAZStrType( + flags={"read_only": True}, + ) + public_ip_address_read.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties + properties.ddos_settings = AAZObjectType( + serialized_name="ddosSettings", + ) + properties.delete_option = AAZStrType( + serialized_name="deleteOption", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + ) + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.ip_configuration = AAZObjectType( + serialized_name="ipConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_ip_configuration_read(properties.ip_configuration) + properties.ip_tags = AAZListType( + serialized_name="ipTags", + ) + properties.linked_public_ip_address = AAZObjectType( + serialized_name="linkedPublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.linked_public_ip_address) + properties.migration_phase = AAZStrType( + serialized_name="migrationPhase", + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_address_version = AAZStrType( + serialized_name="publicIPAddressVersion", + ) + properties.public_ip_allocation_method = AAZStrType( + serialized_name="publicIPAllocationMethod", + ) + properties.public_ip_prefix = AAZObjectType( + serialized_name="publicIPPrefix", + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_public_ip_address = AAZObjectType( + serialized_name="servicePublicIPAddress", + ) + cls._build_schema_public_ip_address_read(properties.service_public_ip_address) + + ddos_settings = _schema_public_ip_address_read.properties.ddos_settings + ddos_settings.ddos_protection_plan = AAZObjectType( + serialized_name="ddosProtectionPlan", + ) + ddos_settings.protection_mode = AAZStrType( + serialized_name="protectionMode", + ) + + ddos_protection_plan = _schema_public_ip_address_read.properties.ddos_settings.ddos_protection_plan + ddos_protection_plan.id = AAZStrType() + + dns_settings = _schema_public_ip_address_read.properties.dns_settings + dns_settings.domain_name_label = AAZStrType( + serialized_name="domainNameLabel", + ) + dns_settings.fqdn = AAZStrType() + dns_settings.reverse_fqdn = AAZStrType( + serialized_name="reverseFqdn", + ) + + ip_tags = _schema_public_ip_address_read.properties.ip_tags + ip_tags.Element = AAZObjectType() + + _element = _schema_public_ip_address_read.properties.ip_tags.Element + _element.ip_tag_type = AAZStrType( + serialized_name="ipTagType", + ) + _element.tag = AAZStrType() + + nat_gateway = _schema_public_ip_address_read.properties.nat_gateway + nat_gateway.etag = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.id = AAZStrType() + nat_gateway.location = AAZStrType() + nat_gateway.name = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + nat_gateway.sku = AAZObjectType() + nat_gateway.tags = AAZDictType() + nat_gateway.type = AAZStrType( + flags={"read_only": True}, + ) + nat_gateway.zones = AAZListType() + + properties = _schema_public_ip_address_read.properties.nat_gateway.properties + properties.idle_timeout_in_minutes = AAZIntType( + serialized_name="idleTimeoutInMinutes", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_addresses = AAZListType( + serialized_name="publicIpAddresses", + ) + properties.public_ip_prefixes = AAZListType( + serialized_name="publicIpPrefixes", + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + public_ip_addresses = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses + public_ip_addresses.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(public_ip_addresses.Element) + + public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes + public_ip_prefixes.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(public_ip_prefixes.Element) + + subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets + subnets.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(subnets.Element) + + sku = _schema_public_ip_address_read.properties.nat_gateway.sku + sku.name = AAZStrType() + + tags = _schema_public_ip_address_read.properties.nat_gateway.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.properties.nat_gateway.zones + zones.Element = AAZStrType() + + public_ip_prefix = _schema_public_ip_address_read.properties.public_ip_prefix + public_ip_prefix.id = AAZStrType() + + sku = _schema_public_ip_address_read.sku + sku.name = AAZStrType() + sku.tier = AAZStrType() + + tags = _schema_public_ip_address_read.tags + tags.Element = AAZStrType() + + zones = _schema_public_ip_address_read.zones + zones.Element = AAZStrType() + + _schema.etag = cls._schema_public_ip_address_read.etag + _schema.extended_location = cls._schema_public_ip_address_read.extended_location + _schema.id = cls._schema_public_ip_address_read.id + _schema.location = cls._schema_public_ip_address_read.location + _schema.name = cls._schema_public_ip_address_read.name + _schema.properties = cls._schema_public_ip_address_read.properties + _schema.sku = cls._schema_public_ip_address_read.sku + _schema.tags = cls._schema_public_ip_address_read.tags + _schema.type = cls._schema_public_ip_address_read.type + _schema.zones = cls._schema_public_ip_address_read.zones + + _schema_security_rule_read = None + + @classmethod + def _build_schema_security_rule_read(cls, _schema): + if cls._schema_security_rule_read is not None: + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + return + + cls._schema_security_rule_read = _schema_security_rule_read = AAZObjectType( + flags={"read_only": True} + ) + + security_rule_read = _schema_security_rule_read + security_rule_read.etag = AAZStrType( + flags={"read_only": True}, + ) + security_rule_read.id = AAZStrType( + flags={"read_only": True}, + ) + security_rule_read.name = AAZStrType( + flags={"read_only": True}, + ) + security_rule_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + security_rule_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_security_rule_read.properties + properties.access = AAZStrType( + flags={"required": True, "read_only": True}, + ) + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.destination_address_prefix = AAZStrType( + serialized_name="destinationAddressPrefix", + flags={"read_only": True}, + ) + properties.destination_address_prefixes = AAZListType( + serialized_name="destinationAddressPrefixes", + flags={"read_only": True}, + ) + properties.destination_application_security_groups = AAZListType( + serialized_name="destinationApplicationSecurityGroups", + flags={"read_only": True}, + ) + properties.destination_port_range = AAZStrType( + serialized_name="destinationPortRange", + flags={"read_only": True}, + ) + properties.destination_port_ranges = AAZListType( + serialized_name="destinationPortRanges", + flags={"read_only": True}, + ) + properties.direction = AAZStrType( + flags={"required": True, "read_only": True}, + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType( + flags={"required": True, "read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.source_address_prefix = AAZStrType( + serialized_name="sourceAddressPrefix", + flags={"read_only": True}, + ) + properties.source_address_prefixes = AAZListType( + serialized_name="sourceAddressPrefixes", + flags={"read_only": True}, + ) + properties.source_application_security_groups = AAZListType( + serialized_name="sourceApplicationSecurityGroups", + flags={"read_only": True}, + ) + properties.source_port_range = AAZStrType( + serialized_name="sourcePortRange", + flags={"read_only": True}, + ) + properties.source_port_ranges = AAZListType( + serialized_name="sourcePortRanges", + flags={"read_only": True}, + ) + + destination_address_prefixes = _schema_security_rule_read.properties.destination_address_prefixes + destination_address_prefixes.Element = AAZStrType( + flags={"read_only": True}, + ) + + destination_application_security_groups = _schema_security_rule_read.properties.destination_application_security_groups + destination_application_security_groups.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_application_security_group_read(destination_application_security_groups.Element) + + destination_port_ranges = _schema_security_rule_read.properties.destination_port_ranges + destination_port_ranges.Element = AAZStrType( + flags={"read_only": True}, + ) + + source_address_prefixes = _schema_security_rule_read.properties.source_address_prefixes + source_address_prefixes.Element = AAZStrType( + flags={"read_only": True}, + ) + + source_application_security_groups = _schema_security_rule_read.properties.source_application_security_groups + source_application_security_groups.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_application_security_group_read(source_application_security_groups.Element) + + source_port_ranges = _schema_security_rule_read.properties.source_port_ranges + source_port_ranges.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_security_rule_read.etag + _schema.id = cls._schema_security_rule_read.id + _schema.name = cls._schema_security_rule_read.name + _schema.properties = cls._schema_security_rule_read.properties + _schema.type = cls._schema_security_rule_read.type + + _schema_sub_resource_read = None + + @classmethod + def _build_schema_sub_resource_read(cls, _schema): + if cls._schema_sub_resource_read is not None: + _schema.id = cls._schema_sub_resource_read.id + return + + cls._schema_sub_resource_read = _schema_sub_resource_read = AAZObjectType( + flags={"read_only": True} + ) + + sub_resource_read = _schema_sub_resource_read + sub_resource_read.id = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_sub_resource_read.id + + _schema_subnet_read = None + + @classmethod + def _build_schema_subnet_read(cls, _schema): + if cls._schema_subnet_read is not None: + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + return + + cls._schema_subnet_read = _schema_subnet_read = AAZObjectType( + flags={"read_only": True} + ) + + subnet_read = _schema_subnet_read + subnet_read.etag = AAZStrType( + flags={"read_only": True}, + ) + subnet_read.id = AAZStrType( + flags={"read_only": True}, + ) + subnet_read.name = AAZStrType( + flags={"read_only": True}, + ) + subnet_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + subnet_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + flags={"read_only": True}, + ) + properties.address_prefixes = AAZListType( + serialized_name="addressPrefixes", + flags={"read_only": True}, + ) + properties.application_gateway_ip_configurations = AAZListType( + serialized_name="applicationGatewayIpConfigurations", + flags={"read_only": True}, + ) + properties.delegations = AAZListType( + flags={"read_only": True}, + ) + properties.ip_allocations = AAZListType( + serialized_name="ipAllocations", + flags={"read_only": True}, + ) + properties.ip_configuration_profiles = AAZListType( + serialized_name="ipConfigurationProfiles", + flags={"read_only": True}, + ) + properties.ip_configurations = AAZListType( + serialized_name="ipConfigurations", + flags={"read_only": True}, + ) + properties.nat_gateway = AAZObjectType( + serialized_name="natGateway", + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.nat_gateway) + properties.network_security_group = AAZObjectType( + serialized_name="networkSecurityGroup", + flags={"read_only": True}, + ) + cls._build_schema_network_security_group_read(properties.network_security_group) + properties.private_endpoint_network_policies = AAZStrType( + serialized_name="privateEndpointNetworkPolicies", + flags={"read_only": True}, + ) + properties.private_endpoints = AAZListType( + serialized_name="privateEndpoints", + flags={"read_only": True}, + ) + properties.private_link_service_network_policies = AAZStrType( + serialized_name="privateLinkServiceNetworkPolicies", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.purpose = AAZStrType( + flags={"read_only": True}, + ) + properties.resource_navigation_links = AAZListType( + serialized_name="resourceNavigationLinks", + flags={"read_only": True}, + ) + properties.route_table = AAZObjectType( + serialized_name="routeTable", + flags={"read_only": True}, + ) + properties.service_association_links = AAZListType( + serialized_name="serviceAssociationLinks", + flags={"read_only": True}, + ) + properties.service_endpoint_policies = AAZListType( + serialized_name="serviceEndpointPolicies", + flags={"read_only": True}, + ) + properties.service_endpoints = AAZListType( + serialized_name="serviceEndpoints", + flags={"read_only": True}, + ) + + address_prefixes = _schema_subnet_read.properties.address_prefixes + address_prefixes.Element = AAZStrType( + flags={"read_only": True}, + ) + + application_gateway_ip_configurations = _schema_subnet_read.properties.application_gateway_ip_configurations + application_gateway_ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.application_gateway_ip_configurations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.application_gateway_ip_configurations.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(properties.subnet) + + delegations = _schema_subnet_read.properties.delegations + delegations.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.delegations.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.delegations.Element.properties + properties.actions = AAZListType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_name = AAZStrType( + serialized_name="serviceName", + flags={"read_only": True}, + ) + + actions = _schema_subnet_read.properties.delegations.Element.properties.actions + actions.Element = AAZStrType( + flags={"read_only": True}, + ) + + ip_allocations = _schema_subnet_read.properties.ip_allocations + ip_allocations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_sub_resource_read(ip_allocations.Element) + + ip_configuration_profiles = _schema_subnet_read.properties.ip_configuration_profiles + ip_configuration_profiles.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.ip_configuration_profiles.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.ip_configuration_profiles.Element.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(properties.subnet) + + ip_configurations = _schema_subnet_read.properties.ip_configurations + ip_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_ip_configuration_read(ip_configurations.Element) + + private_endpoints = _schema_subnet_read.properties.private_endpoints + private_endpoints.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_private_endpoint_read(private_endpoints.Element) + + resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links + resource_navigation_links.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.resource_navigation_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.resource_navigation_links.Element.properties + properties.link = AAZStrType( + flags={"read_only": True}, + ) + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + route_table = _schema_subnet_read.properties.route_table + route_table.etag = AAZStrType( + flags={"read_only": True}, + ) + route_table.id = AAZStrType( + flags={"read_only": True}, + ) + route_table.location = AAZStrType( + flags={"read_only": True}, + ) + route_table.name = AAZStrType( + flags={"read_only": True}, + ) + route_table.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + route_table.tags = AAZDictType( + flags={"read_only": True}, + ) + route_table.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.route_table.properties + properties.disable_bgp_route_propagation = AAZBoolType( + serialized_name="disableBgpRoutePropagation", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.routes = AAZListType( + flags={"read_only": True}, + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + routes = _schema_subnet_read.properties.route_table.properties.routes + routes.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.route_table.properties.routes.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.route_table.properties.routes.Element.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + flags={"read_only": True}, + ) + properties.has_bgp_override = AAZBoolType( + serialized_name="hasBgpOverride", + flags={"read_only": True}, + ) + properties.next_hop_ip_address = AAZStrType( + serialized_name="nextHopIpAddress", + flags={"read_only": True}, + ) + properties.next_hop_type = AAZStrType( + serialized_name="nextHopType", + flags={"required": True, "read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + subnets = _schema_subnet_read.properties.route_table.properties.subnets + subnets.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.route_table.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + service_association_links = _schema_subnet_read.properties.service_association_links + service_association_links.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.service_association_links.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_association_links.Element.properties + properties.allow_delete = AAZBoolType( + serialized_name="allowDelete", + flags={"read_only": True}, + ) + properties.link = AAZStrType( + flags={"read_only": True}, + ) + properties.linked_resource_type = AAZStrType( + serialized_name="linkedResourceType", + flags={"read_only": True}, + ) + properties.locations = AAZListType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + locations = _schema_subnet_read.properties.service_association_links.Element.properties.locations + locations.Element = AAZStrType( + flags={"read_only": True}, + ) + + service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies + service_endpoint_policies.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.kind = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.tags = AAZDictType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties + properties.contextual_service_endpoint_policies = AAZListType( + serialized_name="contextualServiceEndpointPolicies", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + properties.service_alias = AAZStrType( + serialized_name="serviceAlias", + flags={"read_only": True}, + ) + properties.service_endpoint_policy_definitions = AAZListType( + serialized_name="serviceEndpointPolicyDefinitions", + flags={"read_only": True}, + ) + properties.subnets = AAZListType( + flags={"read_only": True}, + ) + + contextual_service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.contextual_service_endpoint_policies + contextual_service_endpoint_policies.Element = AAZStrType( + flags={"read_only": True}, + ) + + service_endpoint_policy_definitions = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions + service_endpoint_policy_definitions.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element + _element.etag = AAZStrType( + flags={"read_only": True}, + ) + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service = AAZStrType( + flags={"read_only": True}, + ) + properties.service_resources = AAZListType( + serialized_name="serviceResources", + flags={"read_only": True}, + ) + + service_resources = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties.service_resources + service_resources.Element = AAZStrType( + flags={"read_only": True}, + ) + + subnets = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.subnets + subnets.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_subnet_read(subnets.Element) + + tags = _schema_subnet_read.properties.service_endpoint_policies.Element.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + service_endpoints = _schema_subnet_read.properties.service_endpoints + service_endpoints.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = _schema_subnet_read.properties.service_endpoints.Element + _element.locations = AAZListType( + flags={"read_only": True}, + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + _element.service = AAZStrType( + flags={"read_only": True}, + ) + + locations = _schema_subnet_read.properties.service_endpoints.Element.locations + locations.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_subnet_read.etag + _schema.id = cls._schema_subnet_read.id + _schema.name = cls._schema_subnet_read.name + _schema.properties = cls._schema_subnet_read.properties + _schema.type = cls._schema_subnet_read.type + + _schema_virtual_network_tap_read = None + + @classmethod + def _build_schema_virtual_network_tap_read(cls, _schema): + if cls._schema_virtual_network_tap_read is not None: + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + return + + cls._schema_virtual_network_tap_read = _schema_virtual_network_tap_read = AAZObjectType( + flags={"read_only": True} + ) + + virtual_network_tap_read = _schema_virtual_network_tap_read + virtual_network_tap_read.etag = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.id = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.location = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.name = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_tap_read.properties = AAZObjectType( + flags={"client_flatten": True, "read_only": True}, + ) + virtual_network_tap_read.tags = AAZDictType( + flags={"read_only": True}, + ) + virtual_network_tap_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_virtual_network_tap_read.properties + properties.destination_load_balancer_front_end_ip_configuration = AAZObjectType( + serialized_name="destinationLoadBalancerFrontEndIPConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_frontend_ip_configuration_read(properties.destination_load_balancer_front_end_ip_configuration) + properties.destination_network_interface_ip_configuration = AAZObjectType( + serialized_name="destinationNetworkInterfaceIPConfiguration", + flags={"read_only": True}, + ) + cls._build_schema_network_interface_ip_configuration_read(properties.destination_network_interface_ip_configuration) + properties.destination_port = AAZIntType( + serialized_name="destinationPort", + flags={"read_only": True}, + ) + properties.network_interface_tap_configurations = AAZListType( + serialized_name="networkInterfaceTapConfigurations", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_guid = AAZStrType( + serialized_name="resourceGuid", + flags={"read_only": True}, + ) + + network_interface_tap_configurations = _schema_virtual_network_tap_read.properties.network_interface_tap_configurations + network_interface_tap_configurations.Element = AAZObjectType( + flags={"read_only": True}, + ) + cls._build_schema_network_interface_tap_configuration_read(network_interface_tap_configurations.Element) + + tags = _schema_virtual_network_tap_read.tags + tags.Element = AAZStrType( + flags={"read_only": True}, + ) + + _schema.etag = cls._schema_virtual_network_tap_read.etag + _schema.id = cls._schema_virtual_network_tap_read.id + _schema.location = cls._schema_virtual_network_tap_read.location + _schema.name = cls._schema_virtual_network_tap_read.name + _schema.properties = cls._schema_virtual_network_tap_read.properties + _schema.tags = cls._schema_virtual_network_tap_read.tags + _schema.type = cls._schema_virtual_network_tap_read.type + + +__all__ = ["Show"] diff --git a/src/ssh/azext_ssh/azext_metadata.json b/src/ssh/azext_ssh/azext_metadata.json index 17c19bca98e..91e03c05b84 100644 --- a/src/ssh/azext_ssh/azext_metadata.json +++ b/src/ssh/azext_ssh/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": false, - "azext.minCliCoreVersion": "2.4.0" + "azext.minCliCoreVersion": "2.45.0" } \ No newline at end of file diff --git a/src/ssh/azext_ssh/ip_utils.py b/src/ssh/azext_ssh/ip_utils.py index a6c61ee0f04..3e88e329153 100644 --- a/src/ssh/azext_ssh/ip_utils.py +++ b/src/ssh/azext_ssh/ip_utils.py @@ -14,10 +14,12 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): compute_client = client_factory.get_mgmt_service_client(cmd.cli_ctx, profiles.ResourceType.MGMT_COMPUTE) - network_client = client_factory.get_mgmt_service_client(cmd.cli_ctx, profiles.ResourceType.MGMT_NETWORK) + # network_client = client_factory.get_mgmt_service_client(cmd.cli_ctx, profiles.ResourceType.MGMT_NETWORK) vm_client = compute_client.virtual_machines - nic_client = network_client.network_interfaces - ip_client = network_client.public_ip_addresses + # nic_client = network_client.network_interfaces + # ip_client = network_client.public_ip_addresses + from .aaz.latest.network.public_ip import Show as PublicIpShow + from .aaz.latest.network.nic import Show as InterfaceShow vm = vm_client.get(resource_group, vm_name) @@ -25,14 +27,24 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): for nic_ref in vm.network_profile.network_interfaces: parsed_id = tools.parse_resource_id(nic_ref.id) - nic = nic_client.get(parsed_id['resource_group'], parsed_id['name']) + # nic = nic_client.get(parsed_id['resource_group'], parsed_id['name']) + get_args = { + 'name': parsed_id['name'], + 'resource_group': parsed_id['resource_group'] + } + nic = InterfaceShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) for ip_config in nic.ip_configurations: if use_private_ip and ip_config.private_ip_address: return ip_config.private_ip_address public_ip_ref = ip_config.public_ip_address if public_ip_ref and public_ip_ref.id: parsed_ip_id = tools.parse_resource_id(public_ip_ref.id) - public_ip = ip_client.get(parsed_ip_id['resource_group'], parsed_ip_id['name']) + # public_ip = ip_client.get(parsed_ip_id['resource_group'], parsed_ip_id['name']) + api_args = { + 'name': parsed_ip_id['name'], + 'resource_group': parsed_ip_id['resource_group'] + } + public_ip = PublicIpShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) if public_ip and public_ip.ip_address: return public_ip.ip_address if ip_config.private_ip_address: From d26d52800fdd7625cc50c4154ee782d2ee8fc837 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Tue, 7 Mar 2023 18:49:00 +0800 Subject: [PATCH 2/7] update args and subscriptions --- src/spring-cloud/azext_spring_cloud/_validators.py | 2 ++ src/spring/azext_spring/_validators.py | 2 ++ src/ssh/azext_ssh/ip_utils.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/spring-cloud/azext_spring_cloud/_validators.py b/src/spring-cloud/azext_spring_cloud/_validators.py index ecda64b019b..dcfa403c56e 100644 --- a/src/spring-cloud/azext_spring_cloud/_validators.py +++ b/src/spring-cloud/azext_spring_cloud/_validators.py @@ -335,6 +335,8 @@ def _get_vnet(cmd, vnet_id): vnet = parse_resource_id(vnet_id) # network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) # return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) + ctx = cmd.cli_ctx + ctx.update_aux_subscriptions(vnet['subscription']) get_args = { 'name': vnet['resource_name'], 'resource_group': vnet['resource_group'] diff --git a/src/spring/azext_spring/_validators.py b/src/spring/azext_spring/_validators.py index 460d8663d81..58011d04559 100644 --- a/src/spring/azext_spring/_validators.py +++ b/src/spring/azext_spring/_validators.py @@ -394,6 +394,8 @@ def _get_vnet(cmd, vnet_id): vnet = parse_resource_id(vnet_id) # network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) # return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) + ctx = cmd.cli_ctx + ctx.update_aux_subscriptions(vnet['subscription']) get_args = { 'name': vnet['resource_name'], 'resource_group': vnet['resource_group'] diff --git a/src/ssh/azext_ssh/ip_utils.py b/src/ssh/azext_ssh/ip_utils.py index 3e88e329153..9e294f2dbc6 100644 --- a/src/ssh/azext_ssh/ip_utils.py +++ b/src/ssh/azext_ssh/ip_utils.py @@ -44,7 +44,7 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): 'name': parsed_ip_id['name'], 'resource_group': parsed_ip_id['resource_group'] } - public_ip = PublicIpShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) + public_ip = PublicIpShow(cli_ctx=cmd.cli_ctx)(command_args=api_args) if public_ip and public_ip.ip_address: return public_ip.ip_address if ip_config.private_ip_address: From b2cb2c3c437e18111141bee957eb3c0f763daa64 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Fri, 10 Mar 2023 21:39:29 +0800 Subject: [PATCH 3/7] update build verson --- src/ssh/HISTORY.md | 4 ++++ src/ssh/azext_ssh/ip_utils.py | 20 ++++++++++---------- src/ssh/setup.py | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/ssh/HISTORY.md b/src/ssh/HISTORY.md index fb6548dacc6..4cb70d39d5c 100644 --- a/src/ssh/HISTORY.md +++ b/src/ssh/HISTORY.md @@ -1,5 +1,9 @@ Release History =============== +1.1.4 +----- +* Remove dependency to NETWORK SDK + 1.1.3 ----- * Add support to Microsoft.ConnectedVMwarevSphere/virtualMachines Resource Type. diff --git a/src/ssh/azext_ssh/ip_utils.py b/src/ssh/azext_ssh/ip_utils.py index 9e294f2dbc6..15cf5fae8ae 100644 --- a/src/ssh/azext_ssh/ip_utils.py +++ b/src/ssh/azext_ssh/ip_utils.py @@ -33,22 +33,22 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): 'resource_group': parsed_id['resource_group'] } nic = InterfaceShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) - for ip_config in nic.ip_configurations: - if use_private_ip and ip_config.private_ip_address: - return ip_config.private_ip_address - public_ip_ref = ip_config.public_ip_address - if public_ip_ref and public_ip_ref.id: - parsed_ip_id = tools.parse_resource_id(public_ip_ref.id) + for ip_config in nic["ipConfigurations"]: + if use_private_ip and ip_config.get("privateIpAddress", None): + return ip_config["privateIpAddress"] + public_ip_ref = ip_config["privateIpAddress"] + if public_ip_ref and public_ip_ref.get("id", None): + parsed_ip_id = tools.parse_resource_id(public_ip_ref["id"]) # public_ip = ip_client.get(parsed_ip_id['resource_group'], parsed_ip_id['name']) api_args = { 'name': parsed_ip_id['name'], 'resource_group': parsed_ip_id['resource_group'] } public_ip = PublicIpShow(cli_ctx=cmd.cli_ctx)(command_args=api_args) - if public_ip and public_ip.ip_address: - return public_ip.ip_address - if ip_config.private_ip_address: - private_ips.append(ip_config.private_ip_address) + if public_ip and public_ip.get("ipAddress", None): + return public_ip["ipAddress"] + if ip_config.get("privateIpAddress", None): + private_ips.append(ip_config["privateIpAddress"]) if len(private_ips) > 0: logger.warning("No public IP detected, attempting private IP (you must bring your own connectivity).") diff --git a/src/ssh/setup.py b/src/ssh/setup.py index c58433bc6e8..d986ab7456e 100644 --- a/src/ssh/setup.py +++ b/src/ssh/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages -VERSION = "1.1.3" +VERSION = "1.1.4" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From eaadc6f73b3c1e72a768e52a0d974d8965f927cc Mon Sep 17 00:00:00 2001 From: AllyWang Date: Mon, 13 Mar 2023 10:44:46 +0800 Subject: [PATCH 4/7] remove unrelated change --- .../azext_spring_cloud/__init__.py | 73 ++++++++----------- .../azext_spring_cloud/_validators.py | 30 +++----- .../azext_spring_cloud/azext_metadata.json | 6 +- src/spring/azext_spring/__init__.py | 11 --- src/spring/azext_spring/_validators.py | 30 +++----- src/spring/azext_spring/azext_metadata.json | 2 +- 6 files changed, 57 insertions(+), 95 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/__init__.py b/src/spring-cloud/azext_spring_cloud/__init__.py index f1f6829e24f..e12ffb04db9 100644 --- a/src/spring-cloud/azext_spring_cloud/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/__init__.py @@ -1,42 +1,31 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from azure.cli.core import AzCommandsLoader - -from azure.cli.core.commands import CliCommandType -from azext_spring_cloud._help import helps # pylint: disable=unused-import -from azext_spring_cloud._client_factory import cf_spring_cloud -from azext_spring_cloud.commands import load_command_table -from azext_spring_cloud._params import load_arguments - - -class spring_cloudCommandsLoader(AzCommandsLoader): - - def __init__(self, cli_ctx=None): - spring_cloud_custom = CliCommandType( - operations_tmpl='azext_spring_cloud.custom#{}', - client_factory=cf_spring_cloud) - super(spring_cloudCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=spring_cloud_custom) - - def load_command_table(self, args): - from azure.cli.core.aaz import load_aaz_command_table - try: - from . import aaz - except ImportError: - aaz = None - if aaz: - load_aaz_command_table( - loader=self, - aaz_pkg_name=aaz.__name__, - args=args - ) - load_command_table(self, args) - return self.command_table - - def load_arguments(self, command): - load_arguments(self, command) - - -COMMAND_LOADER_CLS = spring_cloudCommandsLoader +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +from azure.cli.core.commands import CliCommandType +from azext_spring_cloud._help import helps # pylint: disable=unused-import +from azext_spring_cloud._client_factory import cf_spring_cloud +from azext_spring_cloud.commands import load_command_table +from azext_spring_cloud._params import load_arguments + + +class spring_cloudCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + spring_cloud_custom = CliCommandType( + operations_tmpl='azext_spring_cloud.custom#{}', + client_factory=cf_spring_cloud) + super(spring_cloudCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=spring_cloud_custom) + + def load_command_table(self, args): + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + load_arguments(self, command) + + +COMMAND_LOADER_CLS = spring_cloudCommandsLoader diff --git a/src/spring-cloud/azext_spring_cloud/_validators.py b/src/spring-cloud/azext_spring_cloud/_validators.py index dcfa403c56e..3bdc2161c2d 100644 --- a/src/spring-cloud/azext_spring_cloud/_validators.py +++ b/src/spring-cloud/azext_spring_cloud/_validators.py @@ -333,25 +333,17 @@ def _validate_subnet(namespace, subnet): def _get_vnet(cmd, vnet_id): vnet = parse_resource_id(vnet_id) - # network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) - # return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) - ctx = cmd.cli_ctx - ctx.update_aux_subscriptions(vnet['subscription']) - get_args = { - 'name': vnet['resource_name'], - 'resource_group': vnet['resource_group'] - } - from .aaz.latest.network.vnet import Show as VirtualNetworkShow - return VirtualNetworkShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) - - -# def _get_network_client(cli_ctx, subscription_id=None): -# from azure.cli.core.profiles import ResourceType, get_api_version -# from azure.cli.core.commands.client_factory import get_mgmt_service_client -# return get_mgmt_service_client(cli_ctx, -# ResourceType.MGMT_NETWORK, -# subscription_id=subscription_id, -# api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) + network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) + return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) + + +def _get_network_client(cli_ctx, subscription_id=None): + from azure.cli.core.profiles import ResourceType, get_api_version + from azure.cli.core.commands.client_factory import get_mgmt_service_client + return get_mgmt_service_client(cli_ctx, + ResourceType.MGMT_NETWORK, + subscription_id=subscription_id, + api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) def _get_authorization_client(cli_ctx, subscription_id=None): diff --git a/src/spring-cloud/azext_spring_cloud/azext_metadata.json b/src/spring-cloud/azext_spring_cloud/azext_metadata.json index 91e03c05b84..afce12cdd37 100644 --- a/src/spring-cloud/azext_spring_cloud/azext_metadata.json +++ b/src/spring-cloud/azext_spring_cloud/azext_metadata.json @@ -1,4 +1,4 @@ -{ - "azext.isPreview": false, - "azext.minCliCoreVersion": "2.45.0" +{ + "azext.isPreview": false, + "azext.minCliCoreVersion": "2.30.0" } \ No newline at end of file diff --git a/src/spring/azext_spring/__init__.py b/src/spring/azext_spring/__init__.py index 01cba2c2f31..7b6d390a2db 100644 --- a/src/spring/azext_spring/__init__.py +++ b/src/spring/azext_spring/__init__.py @@ -21,17 +21,6 @@ def __init__(self, cli_ctx=None): super(springCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=spring_custom) def load_command_table(self, args): - from azure.cli.core.aaz import load_aaz_command_table - try: - from . import aaz - except ImportError: - aaz = None - if aaz: - load_aaz_command_table( - loader=self, - aaz_pkg_name=aaz.__name__, - args=args - ) load_command_table(self, args) return self.command_table diff --git a/src/spring/azext_spring/_validators.py b/src/spring/azext_spring/_validators.py index 58011d04559..8fc727bf5dc 100644 --- a/src/spring/azext_spring/_validators.py +++ b/src/spring/azext_spring/_validators.py @@ -392,25 +392,17 @@ def _validate_subnet(namespace, subnet): def _get_vnet(cmd, vnet_id): vnet = parse_resource_id(vnet_id) - # network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) - # return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) - ctx = cmd.cli_ctx - ctx.update_aux_subscriptions(vnet['subscription']) - get_args = { - 'name': vnet['resource_name'], - 'resource_group': vnet['resource_group'] - } - from .aaz.latest.network.vnet import Show as VirtualNetworkShow - return VirtualNetworkShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) - - -# def _get_network_client(cli_ctx, subscription_id=None): -# from azure.cli.core.profiles import ResourceType, get_api_version -# from azure.cli.core.commands.client_factory import get_mgmt_service_client -# return get_mgmt_service_client(cli_ctx, -# ResourceType.MGMT_NETWORK, -# subscription_id=subscription_id, -# api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) + network_client = _get_network_client(cmd.cli_ctx, subscription_id=vnet['subscription']) + return network_client.virtual_networks.get(vnet['resource_group'], vnet['resource_name']) + + +def _get_network_client(cli_ctx, subscription_id=None): + from azure.cli.core.profiles import ResourceType, get_api_version + from azure.cli.core.commands.client_factory import get_mgmt_service_client + return get_mgmt_service_client(cli_ctx, + ResourceType.MGMT_NETWORK, + subscription_id=subscription_id, + api_version=get_api_version(cli_ctx, ResourceType.MGMT_NETWORK)) def _get_authorization_client(cli_ctx, subscription_id=None): diff --git a/src/spring/azext_spring/azext_metadata.json b/src/spring/azext_spring/azext_metadata.json index 91e03c05b84..4dd9b8ae926 100644 --- a/src/spring/azext_spring/azext_metadata.json +++ b/src/spring/azext_spring/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": false, - "azext.minCliCoreVersion": "2.45.0" + "azext.minCliCoreVersion": "2.38.0" } \ No newline at end of file From 48061d72cddaaec5582cf963c2ee1d6d132d5ac6 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Mon, 13 Mar 2023 10:58:00 +0800 Subject: [PATCH 5/7] remove unrelated file --- .../azext_spring_cloud/aaz/__init__.py | 6 - .../azext_spring_cloud/aaz/latest/__init__.py | 6 - .../aaz/latest/network/__cmd_group.py | 20 - .../aaz/latest/network/__init__.py | 11 - .../aaz/latest/network/vnet/__cmd_group.py | 22 - .../aaz/latest/network/vnet/__init__.py | 12 - .../aaz/latest/network/vnet/_show.py | 2450 ----------------- src/spring/azext_spring/aaz/__init__.py | 6 - .../azext_spring/aaz/latest/__init__.py | 6 - .../aaz/latest/network/__cmd_group.py | 20 - .../aaz/latest/network/__init__.py | 11 - .../aaz/latest/network/vnet/__cmd_group.py | 22 - .../aaz/latest/network/vnet/__init__.py | 12 - .../aaz/latest/network/vnet/_show.py | 2450 ----------------- 14 files changed, 5054 deletions(-) delete mode 100644 src/spring-cloud/azext_spring_cloud/aaz/__init__.py delete mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py delete mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py delete mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py delete mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py delete mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py delete mode 100644 src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py delete mode 100644 src/spring/azext_spring/aaz/__init__.py delete mode 100644 src/spring/azext_spring/aaz/latest/__init__.py delete mode 100644 src/spring/azext_spring/aaz/latest/network/__cmd_group.py delete mode 100644 src/spring/azext_spring/aaz/latest/network/__init__.py delete mode 100644 src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py delete mode 100644 src/spring/azext_spring/aaz/latest/network/vnet/__init__.py delete mode 100644 src/spring/azext_spring/aaz/latest/network/vnet/_show.py diff --git a/src/spring-cloud/azext_spring_cloud/aaz/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/__init__.py deleted file mode 100644 index 5757aea3175..00000000000 --- a/src/spring-cloud/azext_spring_cloud/aaz/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py deleted file mode 100644 index 5757aea3175..00000000000 --- a/src/spring-cloud/azext_spring_cloud/aaz/latest/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py deleted file mode 100644 index 7582bb60b24..00000000000 --- a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__cmd_group.py +++ /dev/null @@ -1,20 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -class __CMDGroup(AAZCommandGroup): - """Manage Azure Network resources. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py deleted file mode 100644 index 5a9d61963d6..00000000000 --- a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py deleted file mode 100644 index 4099513f8aa..00000000000 --- a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__cmd_group.py +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -class __CMDGroup(AAZCommandGroup): - """Check if a private IP address is available for use within a virtual network. - - To learn more about Virtual Networks visit https://docs.microsoft.com/azure/virtual-network/virtual-network-manage-network. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py deleted file mode 100644 index 28d5f355813..00000000000 --- a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._show import * diff --git a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py b/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py deleted file mode 100644 index cb097da9151..00000000000 --- a/src/spring-cloud/azext_spring_cloud/aaz/latest/network/vnet/_show.py +++ /dev/null @@ -1,2450 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -class Show(AAZCommand): - """Get the details of a virtual network. - - :example: Get details for MyVNet. - az network vnet show -g MyResourceGroup -n MyVNet - """ - - _aaz_info = { - "version": "2022-01-01", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}", "2022-01-01"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - _args_schema.name = AAZStrArg( - options=["-n", "--name"], - help="The virtual network (VNet) name.", - required=True, - id_part="name", - ) - _args_schema.expand = AAZStrArg( - options=["--expand"], - help="Expands referenced resources. Default value is None.", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.VirtualNetworksGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class VirtualNetworksGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "ODataV4Format" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - **self.serialize_url_param( - "virtualNetworkName", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "$expand", self.ctx.args.expand, - ), - **self.serialize_query_param( - "api-version", "2022-01-01", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.etag = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - _ShowHelper._build_schema_extended_location_read(_schema_on_200.extended_location) - _schema_on_200.id = AAZStrType() - _schema_on_200.location = AAZStrType() - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _schema_on_200.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.address_space = AAZObjectType( - serialized_name="addressSpace", - ) - _ShowHelper._build_schema_address_space_read(properties.address_space) - properties.bgp_communities = AAZObjectType( - serialized_name="bgpCommunities", - ) - properties.ddos_protection_plan = AAZObjectType( - serialized_name="ddosProtectionPlan", - ) - properties.dhcp_options = AAZObjectType( - serialized_name="dhcpOptions", - ) - properties.enable_ddos_protection = AAZBoolType( - serialized_name="enableDdosProtection", - ) - properties.enable_vm_protection = AAZBoolType( - serialized_name="enableVmProtection", - ) - properties.encryption = AAZObjectType() - properties.flow_timeout_in_minutes = AAZIntType( - serialized_name="flowTimeoutInMinutes", - ) - properties.ip_allocations = AAZListType( - serialized_name="ipAllocations", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.subnets = AAZListType() - properties.virtual_network_peerings = AAZListType( - serialized_name="virtualNetworkPeerings", - ) - - bgp_communities = cls._schema_on_200.properties.bgp_communities - bgp_communities.regional_community = AAZStrType( - serialized_name="regionalCommunity", - flags={"read_only": True}, - ) - bgp_communities.virtual_network_community = AAZStrType( - serialized_name="virtualNetworkCommunity", - flags={"required": True}, - ) - - ddos_protection_plan = cls._schema_on_200.properties.ddos_protection_plan - ddos_protection_plan.id = AAZStrType() - - dhcp_options = cls._schema_on_200.properties.dhcp_options - dhcp_options.dns_servers = AAZListType( - serialized_name="dnsServers", - ) - - dns_servers = cls._schema_on_200.properties.dhcp_options.dns_servers - dns_servers.Element = AAZStrType() - - encryption = cls._schema_on_200.properties.encryption - encryption.enabled = AAZBoolType( - flags={"required": True}, - ) - encryption.enforcement = AAZStrType() - - ip_allocations = cls._schema_on_200.properties.ip_allocations - ip_allocations.Element = AAZObjectType() - _ShowHelper._build_schema_sub_resource_read(ip_allocations.Element) - - subnets = cls._schema_on_200.properties.subnets - subnets.Element = AAZObjectType() - _ShowHelper._build_schema_subnet_read(subnets.Element) - - virtual_network_peerings = cls._schema_on_200.properties.virtual_network_peerings - virtual_network_peerings.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.virtual_network_peerings.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = cls._schema_on_200.properties.virtual_network_peerings.Element.properties - properties.allow_forwarded_traffic = AAZBoolType( - serialized_name="allowForwardedTraffic", - ) - properties.allow_gateway_transit = AAZBoolType( - serialized_name="allowGatewayTransit", - ) - properties.allow_virtual_network_access = AAZBoolType( - serialized_name="allowVirtualNetworkAccess", - ) - properties.do_not_verify_remote_gateways = AAZBoolType( - serialized_name="doNotVerifyRemoteGateways", - ) - properties.peering_state = AAZStrType( - serialized_name="peeringState", - ) - properties.peering_sync_level = AAZStrType( - serialized_name="peeringSyncLevel", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.remote_address_space = AAZObjectType( - serialized_name="remoteAddressSpace", - ) - _ShowHelper._build_schema_address_space_read(properties.remote_address_space) - properties.remote_bgp_communities = AAZObjectType( - serialized_name="remoteBgpCommunities", - ) - properties.remote_virtual_network = AAZObjectType( - serialized_name="remoteVirtualNetwork", - ) - _ShowHelper._build_schema_sub_resource_read(properties.remote_virtual_network) - properties.remote_virtual_network_address_space = AAZObjectType( - serialized_name="remoteVirtualNetworkAddressSpace", - ) - _ShowHelper._build_schema_address_space_read(properties.remote_virtual_network_address_space) - properties.remote_virtual_network_encryption = AAZObjectType( - serialized_name="remoteVirtualNetworkEncryption", - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.use_remote_gateways = AAZBoolType( - serialized_name="useRemoteGateways", - ) - - remote_bgp_communities = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_bgp_communities - remote_bgp_communities.regional_community = AAZStrType( - serialized_name="regionalCommunity", - flags={"read_only": True}, - ) - remote_bgp_communities.virtual_network_community = AAZStrType( - serialized_name="virtualNetworkCommunity", - flags={"required": True}, - ) - - remote_virtual_network_encryption = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_virtual_network_encryption - remote_virtual_network_encryption.enabled = AAZBoolType( - flags={"required": True}, - ) - remote_virtual_network_encryption.enforcement = AAZStrType() - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - _schema_address_space_read = None - - @classmethod - def _build_schema_address_space_read(cls, _schema): - if cls._schema_address_space_read is not None: - _schema.address_prefixes = cls._schema_address_space_read.address_prefixes - return - - cls._schema_address_space_read = _schema_address_space_read = AAZObjectType() - - address_space_read = _schema_address_space_read - address_space_read.address_prefixes = AAZListType( - serialized_name="addressPrefixes", - ) - - address_prefixes = _schema_address_space_read.address_prefixes - address_prefixes.Element = AAZStrType() - - _schema.address_prefixes = cls._schema_address_space_read.address_prefixes - - _schema_application_security_group_read = None - - @classmethod - def _build_schema_application_security_group_read(cls, _schema): - if cls._schema_application_security_group_read is not None: - _schema.etag = cls._schema_application_security_group_read.etag - _schema.id = cls._schema_application_security_group_read.id - _schema.location = cls._schema_application_security_group_read.location - _schema.name = cls._schema_application_security_group_read.name - _schema.properties = cls._schema_application_security_group_read.properties - _schema.tags = cls._schema_application_security_group_read.tags - _schema.type = cls._schema_application_security_group_read.type - return - - cls._schema_application_security_group_read = _schema_application_security_group_read = AAZObjectType() - - application_security_group_read = _schema_application_security_group_read - application_security_group_read.etag = AAZStrType( - flags={"read_only": True}, - ) - application_security_group_read.id = AAZStrType() - application_security_group_read.location = AAZStrType() - application_security_group_read.name = AAZStrType( - flags={"read_only": True}, - ) - application_security_group_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - application_security_group_read.tags = AAZDictType() - application_security_group_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_application_security_group_read.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - - tags = _schema_application_security_group_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_application_security_group_read.etag - _schema.id = cls._schema_application_security_group_read.id - _schema.location = cls._schema_application_security_group_read.location - _schema.name = cls._schema_application_security_group_read.name - _schema.properties = cls._schema_application_security_group_read.properties - _schema.tags = cls._schema_application_security_group_read.tags - _schema.type = cls._schema_application_security_group_read.type - - _schema_extended_location_read = None - - @classmethod - def _build_schema_extended_location_read(cls, _schema): - if cls._schema_extended_location_read is not None: - _schema.name = cls._schema_extended_location_read.name - _schema.type = cls._schema_extended_location_read.type - return - - cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType() - - extended_location_read = _schema_extended_location_read - extended_location_read.name = AAZStrType() - extended_location_read.type = AAZStrType() - - _schema.name = cls._schema_extended_location_read.name - _schema.type = cls._schema_extended_location_read.type - - _schema_frontend_ip_configuration_read = None - - @classmethod - def _build_schema_frontend_ip_configuration_read(cls, _schema): - if cls._schema_frontend_ip_configuration_read is not None: - _schema.etag = cls._schema_frontend_ip_configuration_read.etag - _schema.id = cls._schema_frontend_ip_configuration_read.id - _schema.name = cls._schema_frontend_ip_configuration_read.name - _schema.properties = cls._schema_frontend_ip_configuration_read.properties - _schema.type = cls._schema_frontend_ip_configuration_read.type - _schema.zones = cls._schema_frontend_ip_configuration_read.zones - return - - cls._schema_frontend_ip_configuration_read = _schema_frontend_ip_configuration_read = AAZObjectType() - - frontend_ip_configuration_read = _schema_frontend_ip_configuration_read - frontend_ip_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - frontend_ip_configuration_read.id = AAZStrType() - frontend_ip_configuration_read.name = AAZStrType() - frontend_ip_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - frontend_ip_configuration_read.type = AAZStrType( - flags={"read_only": True}, - ) - frontend_ip_configuration_read.zones = AAZListType() - - properties = _schema_frontend_ip_configuration_read.properties - properties.gateway_load_balancer = AAZObjectType( - serialized_name="gatewayLoadBalancer", - ) - cls._build_schema_sub_resource_read(properties.gateway_load_balancer) - properties.inbound_nat_pools = AAZListType( - serialized_name="inboundNatPools", - flags={"read_only": True}, - ) - properties.inbound_nat_rules = AAZListType( - serialized_name="inboundNatRules", - flags={"read_only": True}, - ) - properties.load_balancing_rules = AAZListType( - serialized_name="loadBalancingRules", - flags={"read_only": True}, - ) - properties.outbound_rules = AAZListType( - serialized_name="outboundRules", - flags={"read_only": True}, - ) - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_address_version = AAZStrType( - serialized_name="privateIPAddressVersion", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address = AAZObjectType( - serialized_name="publicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.public_ip_address) - properties.public_ip_prefix = AAZObjectType( - serialized_name="publicIPPrefix", - ) - cls._build_schema_sub_resource_read(properties.public_ip_prefix) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - inbound_nat_pools = _schema_frontend_ip_configuration_read.properties.inbound_nat_pools - inbound_nat_pools.Element = AAZObjectType() - cls._build_schema_sub_resource_read(inbound_nat_pools.Element) - - inbound_nat_rules = _schema_frontend_ip_configuration_read.properties.inbound_nat_rules - inbound_nat_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(inbound_nat_rules.Element) - - load_balancing_rules = _schema_frontend_ip_configuration_read.properties.load_balancing_rules - load_balancing_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(load_balancing_rules.Element) - - outbound_rules = _schema_frontend_ip_configuration_read.properties.outbound_rules - outbound_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(outbound_rules.Element) - - zones = _schema_frontend_ip_configuration_read.zones - zones.Element = AAZStrType() - - _schema.etag = cls._schema_frontend_ip_configuration_read.etag - _schema.id = cls._schema_frontend_ip_configuration_read.id - _schema.name = cls._schema_frontend_ip_configuration_read.name - _schema.properties = cls._schema_frontend_ip_configuration_read.properties - _schema.type = cls._schema_frontend_ip_configuration_read.type - _schema.zones = cls._schema_frontend_ip_configuration_read.zones - - _schema_ip_configuration_read = None - - @classmethod - def _build_schema_ip_configuration_read(cls, _schema): - if cls._schema_ip_configuration_read is not None: - _schema.etag = cls._schema_ip_configuration_read.etag - _schema.id = cls._schema_ip_configuration_read.id - _schema.name = cls._schema_ip_configuration_read.name - _schema.properties = cls._schema_ip_configuration_read.properties - return - - cls._schema_ip_configuration_read = _schema_ip_configuration_read = AAZObjectType() - - ip_configuration_read = _schema_ip_configuration_read - ip_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - ip_configuration_read.id = AAZStrType() - ip_configuration_read.name = AAZStrType() - ip_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - - properties = _schema_ip_configuration_read.properties - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address = AAZObjectType( - serialized_name="publicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.public_ip_address) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - _schema.etag = cls._schema_ip_configuration_read.etag - _schema.id = cls._schema_ip_configuration_read.id - _schema.name = cls._schema_ip_configuration_read.name - _schema.properties = cls._schema_ip_configuration_read.properties - - _schema_network_interface_ip_configuration_read = None - - @classmethod - def _build_schema_network_interface_ip_configuration_read(cls, _schema): - if cls._schema_network_interface_ip_configuration_read is not None: - _schema.etag = cls._schema_network_interface_ip_configuration_read.etag - _schema.id = cls._schema_network_interface_ip_configuration_read.id - _schema.name = cls._schema_network_interface_ip_configuration_read.name - _schema.properties = cls._schema_network_interface_ip_configuration_read.properties - _schema.type = cls._schema_network_interface_ip_configuration_read.type - return - - cls._schema_network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read = AAZObjectType() - - network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read - network_interface_ip_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_interface_ip_configuration_read.id = AAZStrType() - network_interface_ip_configuration_read.name = AAZStrType() - network_interface_ip_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_interface_ip_configuration_read.type = AAZStrType() - - properties = _schema_network_interface_ip_configuration_read.properties - properties.application_gateway_backend_address_pools = AAZListType( - serialized_name="applicationGatewayBackendAddressPools", - ) - properties.application_security_groups = AAZListType( - serialized_name="applicationSecurityGroups", - ) - properties.gateway_load_balancer = AAZObjectType( - serialized_name="gatewayLoadBalancer", - ) - cls._build_schema_sub_resource_read(properties.gateway_load_balancer) - properties.load_balancer_backend_address_pools = AAZListType( - serialized_name="loadBalancerBackendAddressPools", - ) - properties.load_balancer_inbound_nat_rules = AAZListType( - serialized_name="loadBalancerInboundNatRules", - ) - properties.primary = AAZBoolType() - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_address_version = AAZStrType( - serialized_name="privateIPAddressVersion", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.private_link_connection_properties = AAZObjectType( - serialized_name="privateLinkConnectionProperties", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address = AAZObjectType( - serialized_name="publicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.public_ip_address) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - properties.virtual_network_taps = AAZListType( - serialized_name="virtualNetworkTaps", - ) - - application_gateway_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools - application_gateway_backend_address_pools.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties - properties.backend_addresses = AAZListType( - serialized_name="backendAddresses", - ) - properties.backend_ip_configurations = AAZListType( - serialized_name="backendIPConfigurations", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - backend_addresses = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses - backend_addresses.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses.Element - _element.fqdn = AAZStrType() - _element.ip_address = AAZStrType( - serialized_name="ipAddress", - ) - - backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_ip_configurations - backend_ip_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) - - application_security_groups = _schema_network_interface_ip_configuration_read.properties.application_security_groups - application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(application_security_groups.Element) - - load_balancer_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools - load_balancer_backend_address_pools.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties - properties.backend_ip_configurations = AAZListType( - serialized_name="backendIPConfigurations", - flags={"read_only": True}, - ) - properties.drain_period_in_seconds = AAZIntType( - serialized_name="drainPeriodInSeconds", - ) - properties.inbound_nat_rules = AAZListType( - serialized_name="inboundNatRules", - flags={"read_only": True}, - ) - properties.load_balancer_backend_addresses = AAZListType( - serialized_name="loadBalancerBackendAddresses", - ) - properties.load_balancing_rules = AAZListType( - serialized_name="loadBalancingRules", - flags={"read_only": True}, - ) - properties.location = AAZStrType() - properties.outbound_rule = AAZObjectType( - serialized_name="outboundRule", - ) - cls._build_schema_sub_resource_read(properties.outbound_rule) - properties.outbound_rules = AAZListType( - serialized_name="outboundRules", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.tunnel_interfaces = AAZListType( - serialized_name="tunnelInterfaces", - ) - - backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.backend_ip_configurations - backend_ip_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) - - inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.inbound_nat_rules - inbound_nat_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(inbound_nat_rules.Element) - - load_balancer_backend_addresses = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses - load_balancer_backend_addresses.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties - properties.admin_state = AAZStrType( - serialized_name="adminState", - ) - properties.inbound_nat_rules_port_mapping = AAZListType( - serialized_name="inboundNatRulesPortMapping", - flags={"read_only": True}, - ) - properties.ip_address = AAZStrType( - serialized_name="ipAddress", - ) - properties.load_balancer_frontend_ip_configuration = AAZObjectType( - serialized_name="loadBalancerFrontendIPConfiguration", - ) - cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration) - properties.network_interface_ip_configuration = AAZObjectType( - serialized_name="networkInterfaceIPConfiguration", - ) - cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration) - properties.subnet = AAZObjectType() - cls._build_schema_sub_resource_read(properties.subnet) - properties.virtual_network = AAZObjectType( - serialized_name="virtualNetwork", - ) - cls._build_schema_sub_resource_read(properties.virtual_network) - - inbound_nat_rules_port_mapping = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping - inbound_nat_rules_port_mapping.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping.Element - _element.backend_port = AAZIntType( - serialized_name="backendPort", - ) - _element.frontend_port = AAZIntType( - serialized_name="frontendPort", - ) - _element.inbound_nat_rule_name = AAZStrType( - serialized_name="inboundNatRuleName", - ) - - load_balancing_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancing_rules - load_balancing_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(load_balancing_rules.Element) - - outbound_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.outbound_rules - outbound_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(outbound_rules.Element) - - tunnel_interfaces = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces - tunnel_interfaces.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces.Element - _element.identifier = AAZIntType() - _element.port = AAZIntType() - _element.protocol = AAZStrType() - _element.type = AAZStrType() - - load_balancer_inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules - load_balancer_inbound_nat_rules.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element.properties - properties.backend_address_pool = AAZObjectType( - serialized_name="backendAddressPool", - ) - cls._build_schema_sub_resource_read(properties.backend_address_pool) - properties.backend_ip_configuration = AAZObjectType( - serialized_name="backendIPConfiguration", - ) - cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration) - properties.backend_port = AAZIntType( - serialized_name="backendPort", - ) - properties.enable_floating_ip = AAZBoolType( - serialized_name="enableFloatingIP", - ) - properties.enable_tcp_reset = AAZBoolType( - serialized_name="enableTcpReset", - ) - properties.frontend_ip_configuration = AAZObjectType( - serialized_name="frontendIPConfiguration", - ) - cls._build_schema_sub_resource_read(properties.frontend_ip_configuration) - properties.frontend_port = AAZIntType( - serialized_name="frontendPort", - ) - properties.frontend_port_range_end = AAZIntType( - serialized_name="frontendPortRangeEnd", - ) - properties.frontend_port_range_start = AAZIntType( - serialized_name="frontendPortRangeStart", - ) - properties.idle_timeout_in_minutes = AAZIntType( - serialized_name="idleTimeoutInMinutes", - ) - properties.protocol = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - private_link_connection_properties = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties - private_link_connection_properties.fqdns = AAZListType( - flags={"read_only": True}, - ) - private_link_connection_properties.group_id = AAZStrType( - serialized_name="groupId", - flags={"read_only": True}, - ) - private_link_connection_properties.required_member_name = AAZStrType( - serialized_name="requiredMemberName", - flags={"read_only": True}, - ) - - fqdns = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties.fqdns - fqdns.Element = AAZStrType() - - virtual_network_taps = _schema_network_interface_ip_configuration_read.properties.virtual_network_taps - virtual_network_taps.Element = AAZObjectType() - cls._build_schema_virtual_network_tap_read(virtual_network_taps.Element) - - _schema.etag = cls._schema_network_interface_ip_configuration_read.etag - _schema.id = cls._schema_network_interface_ip_configuration_read.id - _schema.name = cls._schema_network_interface_ip_configuration_read.name - _schema.properties = cls._schema_network_interface_ip_configuration_read.properties - _schema.type = cls._schema_network_interface_ip_configuration_read.type - - _schema_network_interface_tap_configuration_read = None - - @classmethod - def _build_schema_network_interface_tap_configuration_read(cls, _schema): - if cls._schema_network_interface_tap_configuration_read is not None: - _schema.etag = cls._schema_network_interface_tap_configuration_read.etag - _schema.id = cls._schema_network_interface_tap_configuration_read.id - _schema.name = cls._schema_network_interface_tap_configuration_read.name - _schema.properties = cls._schema_network_interface_tap_configuration_read.properties - _schema.type = cls._schema_network_interface_tap_configuration_read.type - return - - cls._schema_network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read = AAZObjectType() - - network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read - network_interface_tap_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_interface_tap_configuration_read.id = AAZStrType() - network_interface_tap_configuration_read.name = AAZStrType() - network_interface_tap_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_interface_tap_configuration_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_tap_configuration_read.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.virtual_network_tap = AAZObjectType( - serialized_name="virtualNetworkTap", - ) - cls._build_schema_virtual_network_tap_read(properties.virtual_network_tap) - - _schema.etag = cls._schema_network_interface_tap_configuration_read.etag - _schema.id = cls._schema_network_interface_tap_configuration_read.id - _schema.name = cls._schema_network_interface_tap_configuration_read.name - _schema.properties = cls._schema_network_interface_tap_configuration_read.properties - _schema.type = cls._schema_network_interface_tap_configuration_read.type - - _schema_network_interface_read = None - - @classmethod - def _build_schema_network_interface_read(cls, _schema): - if cls._schema_network_interface_read is not None: - _schema.etag = cls._schema_network_interface_read.etag - _schema.extended_location = cls._schema_network_interface_read.extended_location - _schema.id = cls._schema_network_interface_read.id - _schema.location = cls._schema_network_interface_read.location - _schema.name = cls._schema_network_interface_read.name - _schema.properties = cls._schema_network_interface_read.properties - _schema.tags = cls._schema_network_interface_read.tags - _schema.type = cls._schema_network_interface_read.type - return - - cls._schema_network_interface_read = _schema_network_interface_read = AAZObjectType() - - network_interface_read = _schema_network_interface_read - network_interface_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_interface_read.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(network_interface_read.extended_location) - network_interface_read.id = AAZStrType() - network_interface_read.location = AAZStrType() - network_interface_read.name = AAZStrType( - flags={"read_only": True}, - ) - network_interface_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_interface_read.tags = AAZDictType() - network_interface_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties - properties.auxiliary_mode = AAZStrType( - serialized_name="auxiliaryMode", - ) - properties.dns_settings = AAZObjectType( - serialized_name="dnsSettings", - ) - properties.dscp_configuration = AAZObjectType( - serialized_name="dscpConfiguration", - ) - cls._build_schema_sub_resource_read(properties.dscp_configuration) - properties.enable_accelerated_networking = AAZBoolType( - serialized_name="enableAcceleratedNetworking", - ) - properties.enable_ip_forwarding = AAZBoolType( - serialized_name="enableIPForwarding", - ) - properties.hosted_workloads = AAZListType( - serialized_name="hostedWorkloads", - flags={"read_only": True}, - ) - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - ) - properties.mac_address = AAZStrType( - serialized_name="macAddress", - flags={"read_only": True}, - ) - properties.migration_phase = AAZStrType( - serialized_name="migrationPhase", - ) - properties.network_security_group = AAZObjectType( - serialized_name="networkSecurityGroup", - ) - cls._build_schema_network_security_group_read(properties.network_security_group) - properties.nic_type = AAZStrType( - serialized_name="nicType", - ) - properties.primary = AAZBoolType( - flags={"read_only": True}, - ) - properties.private_endpoint = AAZObjectType( - serialized_name="privateEndpoint", - ) - cls._build_schema_private_endpoint_read(properties.private_endpoint) - properties.private_link_service = AAZObjectType( - serialized_name="privateLinkService", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.tap_configurations = AAZListType( - serialized_name="tapConfigurations", - flags={"read_only": True}, - ) - properties.virtual_machine = AAZObjectType( - serialized_name="virtualMachine", - ) - cls._build_schema_sub_resource_read(properties.virtual_machine) - properties.vnet_encryption_supported = AAZBoolType( - serialized_name="vnetEncryptionSupported", - flags={"read_only": True}, - ) - properties.workload_type = AAZStrType( - serialized_name="workloadType", - ) - - dns_settings = _schema_network_interface_read.properties.dns_settings - dns_settings.applied_dns_servers = AAZListType( - serialized_name="appliedDnsServers", - flags={"read_only": True}, - ) - dns_settings.dns_servers = AAZListType( - serialized_name="dnsServers", - ) - dns_settings.internal_dns_name_label = AAZStrType( - serialized_name="internalDnsNameLabel", - ) - dns_settings.internal_domain_name_suffix = AAZStrType( - serialized_name="internalDomainNameSuffix", - flags={"read_only": True}, - ) - dns_settings.internal_fqdn = AAZStrType( - serialized_name="internalFqdn", - flags={"read_only": True}, - ) - - applied_dns_servers = _schema_network_interface_read.properties.dns_settings.applied_dns_servers - applied_dns_servers.Element = AAZStrType() - - dns_servers = _schema_network_interface_read.properties.dns_settings.dns_servers - dns_servers.Element = AAZStrType() - - hosted_workloads = _schema_network_interface_read.properties.hosted_workloads - hosted_workloads.Element = AAZStrType() - - ip_configurations = _schema_network_interface_read.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_ip_configuration_read(ip_configurations.Element) - - private_link_service = _schema_network_interface_read.properties.private_link_service - private_link_service.etag = AAZStrType( - flags={"read_only": True}, - ) - private_link_service.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(private_link_service.extended_location) - private_link_service.id = AAZStrType() - private_link_service.location = AAZStrType() - private_link_service.name = AAZStrType( - flags={"read_only": True}, - ) - private_link_service.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - private_link_service.tags = AAZDictType() - private_link_service.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties.private_link_service.properties - properties.alias = AAZStrType( - flags={"read_only": True}, - ) - properties.auto_approval = AAZObjectType( - serialized_name="autoApproval", - ) - properties.enable_proxy_protocol = AAZBoolType( - serialized_name="enableProxyProtocol", - ) - properties.fqdns = AAZListType() - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - ) - properties.load_balancer_frontend_ip_configurations = AAZListType( - serialized_name="loadBalancerFrontendIpConfigurations", - ) - properties.network_interfaces = AAZListType( - serialized_name="networkInterfaces", - flags={"read_only": True}, - ) - properties.private_endpoint_connections = AAZListType( - serialized_name="privateEndpointConnections", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.visibility = AAZObjectType() - - auto_approval = _schema_network_interface_read.properties.private_link_service.properties.auto_approval - auto_approval.subscriptions = AAZListType() - - subscriptions = _schema_network_interface_read.properties.private_link_service.properties.auto_approval.subscriptions - subscriptions.Element = AAZStrType() - - fqdns = _schema_network_interface_read.properties.private_link_service.properties.fqdns - fqdns.Element = AAZStrType() - - ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - - _element = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element.properties - properties.primary = AAZBoolType() - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_address_version = AAZStrType( - serialized_name="privateIPAddressVersion", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - load_balancer_frontend_ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.load_balancer_frontend_ip_configurations - load_balancer_frontend_ip_configurations.Element = AAZObjectType() - cls._build_schema_frontend_ip_configuration_read(load_balancer_frontend_ip_configurations.Element) - - network_interfaces = _schema_network_interface_read.properties.private_link_service.properties.network_interfaces - network_interfaces.Element = AAZObjectType() - cls._build_schema_network_interface_read(network_interfaces.Element) - - private_endpoint_connections = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections - private_endpoint_connections.Element = AAZObjectType() - - _element = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element.properties - properties.link_identifier = AAZStrType( - serialized_name="linkIdentifier", - flags={"read_only": True}, - ) - properties.private_endpoint = AAZObjectType( - serialized_name="privateEndpoint", - ) - cls._build_schema_private_endpoint_read(properties.private_endpoint) - properties.private_link_service_connection_state = AAZObjectType( - serialized_name="privateLinkServiceConnectionState", - ) - cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - visibility = _schema_network_interface_read.properties.private_link_service.properties.visibility - visibility.subscriptions = AAZListType() - - subscriptions = _schema_network_interface_read.properties.private_link_service.properties.visibility.subscriptions - subscriptions.Element = AAZStrType() - - tags = _schema_network_interface_read.properties.private_link_service.tags - tags.Element = AAZStrType() - - tap_configurations = _schema_network_interface_read.properties.tap_configurations - tap_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_tap_configuration_read(tap_configurations.Element) - - tags = _schema_network_interface_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_network_interface_read.etag - _schema.extended_location = cls._schema_network_interface_read.extended_location - _schema.id = cls._schema_network_interface_read.id - _schema.location = cls._schema_network_interface_read.location - _schema.name = cls._schema_network_interface_read.name - _schema.properties = cls._schema_network_interface_read.properties - _schema.tags = cls._schema_network_interface_read.tags - _schema.type = cls._schema_network_interface_read.type - - _schema_network_security_group_read = None - - @classmethod - def _build_schema_network_security_group_read(cls, _schema): - if cls._schema_network_security_group_read is not None: - _schema.etag = cls._schema_network_security_group_read.etag - _schema.id = cls._schema_network_security_group_read.id - _schema.location = cls._schema_network_security_group_read.location - _schema.name = cls._schema_network_security_group_read.name - _schema.properties = cls._schema_network_security_group_read.properties - _schema.tags = cls._schema_network_security_group_read.tags - _schema.type = cls._schema_network_security_group_read.type - return - - cls._schema_network_security_group_read = _schema_network_security_group_read = AAZObjectType() - - network_security_group_read = _schema_network_security_group_read - network_security_group_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_security_group_read.id = AAZStrType() - network_security_group_read.location = AAZStrType() - network_security_group_read.name = AAZStrType( - flags={"read_only": True}, - ) - network_security_group_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_security_group_read.tags = AAZDictType() - network_security_group_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_security_group_read.properties - properties.default_security_rules = AAZListType( - serialized_name="defaultSecurityRules", - flags={"read_only": True}, - ) - properties.flow_logs = AAZListType( - serialized_name="flowLogs", - flags={"read_only": True}, - ) - properties.flush_connection = AAZBoolType( - serialized_name="flushConnection", - ) - properties.network_interfaces = AAZListType( - serialized_name="networkInterfaces", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.security_rules = AAZListType( - serialized_name="securityRules", - ) - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - default_security_rules = _schema_network_security_group_read.properties.default_security_rules - default_security_rules.Element = AAZObjectType() - cls._build_schema_security_rule_read(default_security_rules.Element) - - flow_logs = _schema_network_security_group_read.properties.flow_logs - flow_logs.Element = AAZObjectType() - - _element = _schema_network_security_group_read.properties.flow_logs.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.location = AAZStrType() - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_security_group_read.properties.flow_logs.Element.properties - properties.enabled = AAZBoolType() - properties.flow_analytics_configuration = AAZObjectType( - serialized_name="flowAnalyticsConfiguration", - ) - properties.format = AAZObjectType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.retention_policy = AAZObjectType( - serialized_name="retentionPolicy", - ) - properties.storage_id = AAZStrType( - serialized_name="storageId", - flags={"required": True}, - ) - properties.target_resource_guid = AAZStrType( - serialized_name="targetResourceGuid", - flags={"read_only": True}, - ) - properties.target_resource_id = AAZStrType( - serialized_name="targetResourceId", - flags={"required": True}, - ) - - flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration - flow_analytics_configuration.network_watcher_flow_analytics_configuration = AAZObjectType( - serialized_name="networkWatcherFlowAnalyticsConfiguration", - ) - - network_watcher_flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration.network_watcher_flow_analytics_configuration - network_watcher_flow_analytics_configuration.enabled = AAZBoolType() - network_watcher_flow_analytics_configuration.traffic_analytics_interval = AAZIntType( - serialized_name="trafficAnalyticsInterval", - ) - network_watcher_flow_analytics_configuration.workspace_id = AAZStrType( - serialized_name="workspaceId", - ) - network_watcher_flow_analytics_configuration.workspace_region = AAZStrType( - serialized_name="workspaceRegion", - ) - network_watcher_flow_analytics_configuration.workspace_resource_id = AAZStrType( - serialized_name="workspaceResourceId", - ) - - format = _schema_network_security_group_read.properties.flow_logs.Element.properties.format - format.type = AAZStrType() - format.version = AAZIntType() - - retention_policy = _schema_network_security_group_read.properties.flow_logs.Element.properties.retention_policy - retention_policy.days = AAZIntType() - retention_policy.enabled = AAZBoolType() - - tags = _schema_network_security_group_read.properties.flow_logs.Element.tags - tags.Element = AAZStrType() - - network_interfaces = _schema_network_security_group_read.properties.network_interfaces - network_interfaces.Element = AAZObjectType() - cls._build_schema_network_interface_read(network_interfaces.Element) - - security_rules = _schema_network_security_group_read.properties.security_rules - security_rules.Element = AAZObjectType() - cls._build_schema_security_rule_read(security_rules.Element) - - subnets = _schema_network_security_group_read.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_subnet_read(subnets.Element) - - tags = _schema_network_security_group_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_network_security_group_read.etag - _schema.id = cls._schema_network_security_group_read.id - _schema.location = cls._schema_network_security_group_read.location - _schema.name = cls._schema_network_security_group_read.name - _schema.properties = cls._schema_network_security_group_read.properties - _schema.tags = cls._schema_network_security_group_read.tags - _schema.type = cls._schema_network_security_group_read.type - - _schema_private_endpoint_read = None - - @classmethod - def _build_schema_private_endpoint_read(cls, _schema): - if cls._schema_private_endpoint_read is not None: - _schema.etag = cls._schema_private_endpoint_read.etag - _schema.extended_location = cls._schema_private_endpoint_read.extended_location - _schema.id = cls._schema_private_endpoint_read.id - _schema.location = cls._schema_private_endpoint_read.location - _schema.name = cls._schema_private_endpoint_read.name - _schema.properties = cls._schema_private_endpoint_read.properties - _schema.tags = cls._schema_private_endpoint_read.tags - _schema.type = cls._schema_private_endpoint_read.type - return - - cls._schema_private_endpoint_read = _schema_private_endpoint_read = AAZObjectType() - - private_endpoint_read = _schema_private_endpoint_read - private_endpoint_read.etag = AAZStrType( - flags={"read_only": True}, - ) - private_endpoint_read.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(private_endpoint_read.extended_location) - private_endpoint_read.id = AAZStrType() - private_endpoint_read.location = AAZStrType() - private_endpoint_read.name = AAZStrType( - flags={"read_only": True}, - ) - private_endpoint_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - private_endpoint_read.tags = AAZDictType() - private_endpoint_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_private_endpoint_read.properties - properties.application_security_groups = AAZListType( - serialized_name="applicationSecurityGroups", - ) - properties.custom_dns_configs = AAZListType( - serialized_name="customDnsConfigs", - ) - properties.custom_network_interface_name = AAZStrType( - serialized_name="customNetworkInterfaceName", - ) - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - ) - properties.manual_private_link_service_connections = AAZListType( - serialized_name="manualPrivateLinkServiceConnections", - ) - properties.network_interfaces = AAZListType( - serialized_name="networkInterfaces", - flags={"read_only": True}, - ) - properties.private_link_service_connections = AAZListType( - serialized_name="privateLinkServiceConnections", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - application_security_groups = _schema_private_endpoint_read.properties.application_security_groups - application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(application_security_groups.Element) - - custom_dns_configs = _schema_private_endpoint_read.properties.custom_dns_configs - custom_dns_configs.Element = AAZObjectType() - - _element = _schema_private_endpoint_read.properties.custom_dns_configs.Element - _element.fqdn = AAZStrType() - _element.ip_addresses = AAZListType( - serialized_name="ipAddresses", - ) - - ip_addresses = _schema_private_endpoint_read.properties.custom_dns_configs.Element.ip_addresses - ip_addresses.Element = AAZStrType() - - ip_configurations = _schema_private_endpoint_read.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - - _element = _schema_private_endpoint_read.properties.ip_configurations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_private_endpoint_read.properties.ip_configurations.Element.properties - properties.group_id = AAZStrType( - serialized_name="groupId", - ) - properties.member_name = AAZStrType( - serialized_name="memberName", - ) - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - - manual_private_link_service_connections = _schema_private_endpoint_read.properties.manual_private_link_service_connections - manual_private_link_service_connections.Element = AAZObjectType() - cls._build_schema_private_link_service_connection_read(manual_private_link_service_connections.Element) - - network_interfaces = _schema_private_endpoint_read.properties.network_interfaces - network_interfaces.Element = AAZObjectType() - cls._build_schema_network_interface_read(network_interfaces.Element) - - private_link_service_connections = _schema_private_endpoint_read.properties.private_link_service_connections - private_link_service_connections.Element = AAZObjectType() - cls._build_schema_private_link_service_connection_read(private_link_service_connections.Element) - - tags = _schema_private_endpoint_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_private_endpoint_read.etag - _schema.extended_location = cls._schema_private_endpoint_read.extended_location - _schema.id = cls._schema_private_endpoint_read.id - _schema.location = cls._schema_private_endpoint_read.location - _schema.name = cls._schema_private_endpoint_read.name - _schema.properties = cls._schema_private_endpoint_read.properties - _schema.tags = cls._schema_private_endpoint_read.tags - _schema.type = cls._schema_private_endpoint_read.type - - _schema_private_link_service_connection_state_read = None - - @classmethod - def _build_schema_private_link_service_connection_state_read(cls, _schema): - if cls._schema_private_link_service_connection_state_read is not None: - _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required - _schema.description = cls._schema_private_link_service_connection_state_read.description - _schema.status = cls._schema_private_link_service_connection_state_read.status - return - - cls._schema_private_link_service_connection_state_read = _schema_private_link_service_connection_state_read = AAZObjectType() - - private_link_service_connection_state_read = _schema_private_link_service_connection_state_read - private_link_service_connection_state_read.actions_required = AAZStrType( - serialized_name="actionsRequired", - ) - private_link_service_connection_state_read.description = AAZStrType() - private_link_service_connection_state_read.status = AAZStrType() - - _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required - _schema.description = cls._schema_private_link_service_connection_state_read.description - _schema.status = cls._schema_private_link_service_connection_state_read.status - - _schema_private_link_service_connection_read = None - - @classmethod - def _build_schema_private_link_service_connection_read(cls, _schema): - if cls._schema_private_link_service_connection_read is not None: - _schema.etag = cls._schema_private_link_service_connection_read.etag - _schema.id = cls._schema_private_link_service_connection_read.id - _schema.name = cls._schema_private_link_service_connection_read.name - _schema.properties = cls._schema_private_link_service_connection_read.properties - _schema.type = cls._schema_private_link_service_connection_read.type - return - - cls._schema_private_link_service_connection_read = _schema_private_link_service_connection_read = AAZObjectType() - - private_link_service_connection_read = _schema_private_link_service_connection_read - private_link_service_connection_read.etag = AAZStrType( - flags={"read_only": True}, - ) - private_link_service_connection_read.id = AAZStrType() - private_link_service_connection_read.name = AAZStrType() - private_link_service_connection_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - private_link_service_connection_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_private_link_service_connection_read.properties - properties.group_ids = AAZListType( - serialized_name="groupIds", - ) - properties.private_link_service_connection_state = AAZObjectType( - serialized_name="privateLinkServiceConnectionState", - ) - cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) - properties.private_link_service_id = AAZStrType( - serialized_name="privateLinkServiceId", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.request_message = AAZStrType( - serialized_name="requestMessage", - ) - - group_ids = _schema_private_link_service_connection_read.properties.group_ids - group_ids.Element = AAZStrType() - - _schema.etag = cls._schema_private_link_service_connection_read.etag - _schema.id = cls._schema_private_link_service_connection_read.id - _schema.name = cls._schema_private_link_service_connection_read.name - _schema.properties = cls._schema_private_link_service_connection_read.properties - _schema.type = cls._schema_private_link_service_connection_read.type - - _schema_public_ip_address_read = None - - @classmethod - def _build_schema_public_ip_address_read(cls, _schema): - if cls._schema_public_ip_address_read is not None: - _schema.etag = cls._schema_public_ip_address_read.etag - _schema.extended_location = cls._schema_public_ip_address_read.extended_location - _schema.id = cls._schema_public_ip_address_read.id - _schema.location = cls._schema_public_ip_address_read.location - _schema.name = cls._schema_public_ip_address_read.name - _schema.properties = cls._schema_public_ip_address_read.properties - _schema.sku = cls._schema_public_ip_address_read.sku - _schema.tags = cls._schema_public_ip_address_read.tags - _schema.type = cls._schema_public_ip_address_read.type - _schema.zones = cls._schema_public_ip_address_read.zones - return - - cls._schema_public_ip_address_read = _schema_public_ip_address_read = AAZObjectType() - - public_ip_address_read = _schema_public_ip_address_read - public_ip_address_read.etag = AAZStrType( - flags={"read_only": True}, - ) - public_ip_address_read.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(public_ip_address_read.extended_location) - public_ip_address_read.id = AAZStrType() - public_ip_address_read.location = AAZStrType() - public_ip_address_read.name = AAZStrType( - flags={"read_only": True}, - ) - public_ip_address_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - public_ip_address_read.sku = AAZObjectType() - public_ip_address_read.tags = AAZDictType() - public_ip_address_read.type = AAZStrType( - flags={"read_only": True}, - ) - public_ip_address_read.zones = AAZListType() - - properties = _schema_public_ip_address_read.properties - properties.ddos_settings = AAZObjectType( - serialized_name="ddosSettings", - ) - properties.delete_option = AAZStrType( - serialized_name="deleteOption", - ) - properties.dns_settings = AAZObjectType( - serialized_name="dnsSettings", - ) - properties.idle_timeout_in_minutes = AAZIntType( - serialized_name="idleTimeoutInMinutes", - ) - properties.ip_address = AAZStrType( - serialized_name="ipAddress", - ) - properties.ip_configuration = AAZObjectType( - serialized_name="ipConfiguration", - ) - cls._build_schema_ip_configuration_read(properties.ip_configuration) - properties.ip_tags = AAZListType( - serialized_name="ipTags", - ) - properties.linked_public_ip_address = AAZObjectType( - serialized_name="linkedPublicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.linked_public_ip_address) - properties.migration_phase = AAZStrType( - serialized_name="migrationPhase", - ) - properties.nat_gateway = AAZObjectType( - serialized_name="natGateway", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address_version = AAZStrType( - serialized_name="publicIPAddressVersion", - ) - properties.public_ip_allocation_method = AAZStrType( - serialized_name="publicIPAllocationMethod", - ) - properties.public_ip_prefix = AAZObjectType( - serialized_name="publicIPPrefix", - ) - cls._build_schema_sub_resource_read(properties.public_ip_prefix) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.service_public_ip_address = AAZObjectType( - serialized_name="servicePublicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.service_public_ip_address) - - ddos_settings = _schema_public_ip_address_read.properties.ddos_settings - ddos_settings.ddos_custom_policy = AAZObjectType( - serialized_name="ddosCustomPolicy", - ) - cls._build_schema_sub_resource_read(ddos_settings.ddos_custom_policy) - ddos_settings.protected_ip = AAZBoolType( - serialized_name="protectedIP", - ) - ddos_settings.protection_coverage = AAZStrType( - serialized_name="protectionCoverage", - ) - - dns_settings = _schema_public_ip_address_read.properties.dns_settings - dns_settings.domain_name_label = AAZStrType( - serialized_name="domainNameLabel", - ) - dns_settings.fqdn = AAZStrType() - dns_settings.reverse_fqdn = AAZStrType( - serialized_name="reverseFqdn", - ) - - ip_tags = _schema_public_ip_address_read.properties.ip_tags - ip_tags.Element = AAZObjectType() - - _element = _schema_public_ip_address_read.properties.ip_tags.Element - _element.ip_tag_type = AAZStrType( - serialized_name="ipTagType", - ) - _element.tag = AAZStrType() - - nat_gateway = _schema_public_ip_address_read.properties.nat_gateway - nat_gateway.etag = AAZStrType( - flags={"read_only": True}, - ) - nat_gateway.id = AAZStrType() - nat_gateway.location = AAZStrType() - nat_gateway.name = AAZStrType( - flags={"read_only": True}, - ) - nat_gateway.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - nat_gateway.sku = AAZObjectType() - nat_gateway.tags = AAZDictType() - nat_gateway.type = AAZStrType( - flags={"read_only": True}, - ) - nat_gateway.zones = AAZListType() - - properties = _schema_public_ip_address_read.properties.nat_gateway.properties - properties.idle_timeout_in_minutes = AAZIntType( - serialized_name="idleTimeoutInMinutes", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_addresses = AAZListType( - serialized_name="publicIpAddresses", - ) - properties.public_ip_prefixes = AAZListType( - serialized_name="publicIpPrefixes", - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - public_ip_addresses = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses - public_ip_addresses.Element = AAZObjectType() - cls._build_schema_sub_resource_read(public_ip_addresses.Element) - - public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes - public_ip_prefixes.Element = AAZObjectType() - cls._build_schema_sub_resource_read(public_ip_prefixes.Element) - - subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_sub_resource_read(subnets.Element) - - sku = _schema_public_ip_address_read.properties.nat_gateway.sku - sku.name = AAZStrType() - - tags = _schema_public_ip_address_read.properties.nat_gateway.tags - tags.Element = AAZStrType() - - zones = _schema_public_ip_address_read.properties.nat_gateway.zones - zones.Element = AAZStrType() - - sku = _schema_public_ip_address_read.sku - sku.name = AAZStrType() - sku.tier = AAZStrType() - - tags = _schema_public_ip_address_read.tags - tags.Element = AAZStrType() - - zones = _schema_public_ip_address_read.zones - zones.Element = AAZStrType() - - _schema.etag = cls._schema_public_ip_address_read.etag - _schema.extended_location = cls._schema_public_ip_address_read.extended_location - _schema.id = cls._schema_public_ip_address_read.id - _schema.location = cls._schema_public_ip_address_read.location - _schema.name = cls._schema_public_ip_address_read.name - _schema.properties = cls._schema_public_ip_address_read.properties - _schema.sku = cls._schema_public_ip_address_read.sku - _schema.tags = cls._schema_public_ip_address_read.tags - _schema.type = cls._schema_public_ip_address_read.type - _schema.zones = cls._schema_public_ip_address_read.zones - - _schema_security_rule_read = None - - @classmethod - def _build_schema_security_rule_read(cls, _schema): - if cls._schema_security_rule_read is not None: - _schema.etag = cls._schema_security_rule_read.etag - _schema.id = cls._schema_security_rule_read.id - _schema.name = cls._schema_security_rule_read.name - _schema.properties = cls._schema_security_rule_read.properties - _schema.type = cls._schema_security_rule_read.type - return - - cls._schema_security_rule_read = _schema_security_rule_read = AAZObjectType() - - security_rule_read = _schema_security_rule_read - security_rule_read.etag = AAZStrType( - flags={"read_only": True}, - ) - security_rule_read.id = AAZStrType() - security_rule_read.name = AAZStrType() - security_rule_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - security_rule_read.type = AAZStrType() - - properties = _schema_security_rule_read.properties - properties.access = AAZStrType( - flags={"required": True}, - ) - properties.description = AAZStrType() - properties.destination_address_prefix = AAZStrType( - serialized_name="destinationAddressPrefix", - ) - properties.destination_address_prefixes = AAZListType( - serialized_name="destinationAddressPrefixes", - ) - properties.destination_application_security_groups = AAZListType( - serialized_name="destinationApplicationSecurityGroups", - ) - properties.destination_port_range = AAZStrType( - serialized_name="destinationPortRange", - ) - properties.destination_port_ranges = AAZListType( - serialized_name="destinationPortRanges", - ) - properties.direction = AAZStrType( - flags={"required": True}, - ) - properties.priority = AAZIntType() - properties.protocol = AAZStrType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.source_address_prefix = AAZStrType( - serialized_name="sourceAddressPrefix", - ) - properties.source_address_prefixes = AAZListType( - serialized_name="sourceAddressPrefixes", - ) - properties.source_application_security_groups = AAZListType( - serialized_name="sourceApplicationSecurityGroups", - ) - properties.source_port_range = AAZStrType( - serialized_name="sourcePortRange", - ) - properties.source_port_ranges = AAZListType( - serialized_name="sourcePortRanges", - ) - - destination_address_prefixes = _schema_security_rule_read.properties.destination_address_prefixes - destination_address_prefixes.Element = AAZStrType() - - destination_application_security_groups = _schema_security_rule_read.properties.destination_application_security_groups - destination_application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(destination_application_security_groups.Element) - - destination_port_ranges = _schema_security_rule_read.properties.destination_port_ranges - destination_port_ranges.Element = AAZStrType() - - source_address_prefixes = _schema_security_rule_read.properties.source_address_prefixes - source_address_prefixes.Element = AAZStrType() - - source_application_security_groups = _schema_security_rule_read.properties.source_application_security_groups - source_application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(source_application_security_groups.Element) - - source_port_ranges = _schema_security_rule_read.properties.source_port_ranges - source_port_ranges.Element = AAZStrType() - - _schema.etag = cls._schema_security_rule_read.etag - _schema.id = cls._schema_security_rule_read.id - _schema.name = cls._schema_security_rule_read.name - _schema.properties = cls._schema_security_rule_read.properties - _schema.type = cls._schema_security_rule_read.type - - _schema_sub_resource_read = None - - @classmethod - def _build_schema_sub_resource_read(cls, _schema): - if cls._schema_sub_resource_read is not None: - _schema.id = cls._schema_sub_resource_read.id - return - - cls._schema_sub_resource_read = _schema_sub_resource_read = AAZObjectType() - - sub_resource_read = _schema_sub_resource_read - sub_resource_read.id = AAZStrType() - - _schema.id = cls._schema_sub_resource_read.id - - _schema_subnet_read = None - - @classmethod - def _build_schema_subnet_read(cls, _schema): - if cls._schema_subnet_read is not None: - _schema.etag = cls._schema_subnet_read.etag - _schema.id = cls._schema_subnet_read.id - _schema.name = cls._schema_subnet_read.name - _schema.properties = cls._schema_subnet_read.properties - _schema.type = cls._schema_subnet_read.type - return - - cls._schema_subnet_read = _schema_subnet_read = AAZObjectType() - - subnet_read = _schema_subnet_read - subnet_read.etag = AAZStrType( - flags={"read_only": True}, - ) - subnet_read.id = AAZStrType() - subnet_read.name = AAZStrType() - subnet_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - subnet_read.type = AAZStrType() - - properties = _schema_subnet_read.properties - properties.address_prefix = AAZStrType( - serialized_name="addressPrefix", - ) - properties.address_prefixes = AAZListType( - serialized_name="addressPrefixes", - ) - properties.application_gateway_ip_configurations = AAZListType( - serialized_name="applicationGatewayIpConfigurations", - ) - properties.delegations = AAZListType() - properties.ip_allocations = AAZListType( - serialized_name="ipAllocations", - ) - properties.ip_configuration_profiles = AAZListType( - serialized_name="ipConfigurationProfiles", - flags={"read_only": True}, - ) - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - flags={"read_only": True}, - ) - properties.nat_gateway = AAZObjectType( - serialized_name="natGateway", - ) - cls._build_schema_sub_resource_read(properties.nat_gateway) - properties.network_security_group = AAZObjectType( - serialized_name="networkSecurityGroup", - ) - cls._build_schema_network_security_group_read(properties.network_security_group) - properties.private_endpoint_network_policies = AAZStrType( - serialized_name="privateEndpointNetworkPolicies", - ) - properties.private_endpoints = AAZListType( - serialized_name="privateEndpoints", - flags={"read_only": True}, - ) - properties.private_link_service_network_policies = AAZStrType( - serialized_name="privateLinkServiceNetworkPolicies", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.purpose = AAZStrType( - flags={"read_only": True}, - ) - properties.resource_navigation_links = AAZListType( - serialized_name="resourceNavigationLinks", - flags={"read_only": True}, - ) - properties.route_table = AAZObjectType( - serialized_name="routeTable", - ) - properties.service_association_links = AAZListType( - serialized_name="serviceAssociationLinks", - flags={"read_only": True}, - ) - properties.service_endpoint_policies = AAZListType( - serialized_name="serviceEndpointPolicies", - ) - properties.service_endpoints = AAZListType( - serialized_name="serviceEndpoints", - ) - - address_prefixes = _schema_subnet_read.properties.address_prefixes - address_prefixes.Element = AAZStrType() - - application_gateway_ip_configurations = _schema_subnet_read.properties.application_gateway_ip_configurations - application_gateway_ip_configurations.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.application_gateway_ip_configurations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.application_gateway_ip_configurations.Element.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_sub_resource_read(properties.subnet) - - delegations = _schema_subnet_read.properties.delegations - delegations.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.delegations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = _schema_subnet_read.properties.delegations.Element.properties - properties.actions = AAZListType( - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.service_name = AAZStrType( - serialized_name="serviceName", - ) - - actions = _schema_subnet_read.properties.delegations.Element.properties.actions - actions.Element = AAZStrType() - - ip_allocations = _schema_subnet_read.properties.ip_allocations - ip_allocations.Element = AAZObjectType() - cls._build_schema_sub_resource_read(ip_allocations.Element) - - ip_configuration_profiles = _schema_subnet_read.properties.ip_configuration_profiles - ip_configuration_profiles.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.ip_configuration_profiles.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.ip_configuration_profiles.Element.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - ip_configurations = _schema_subnet_read.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - cls._build_schema_ip_configuration_read(ip_configurations.Element) - - private_endpoints = _schema_subnet_read.properties.private_endpoints - private_endpoints.Element = AAZObjectType() - cls._build_schema_private_endpoint_read(private_endpoints.Element) - - resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links - resource_navigation_links.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.resource_navigation_links.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.resource_navigation_links.Element.properties - properties.link = AAZStrType() - properties.linked_resource_type = AAZStrType( - serialized_name="linkedResourceType", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - route_table = _schema_subnet_read.properties.route_table - route_table.etag = AAZStrType( - flags={"read_only": True}, - ) - route_table.id = AAZStrType() - route_table.location = AAZStrType() - route_table.name = AAZStrType( - flags={"read_only": True}, - ) - route_table.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - route_table.tags = AAZDictType() - route_table.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.route_table.properties - properties.disable_bgp_route_propagation = AAZBoolType( - serialized_name="disableBgpRoutePropagation", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.routes = AAZListType() - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - routes = _schema_subnet_read.properties.route_table.properties.routes - routes.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.route_table.properties.routes.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = _schema_subnet_read.properties.route_table.properties.routes.Element.properties - properties.address_prefix = AAZStrType( - serialized_name="addressPrefix", - ) - properties.has_bgp_override = AAZBoolType( - serialized_name="hasBgpOverride", - ) - properties.next_hop_ip_address = AAZStrType( - serialized_name="nextHopIpAddress", - ) - properties.next_hop_type = AAZStrType( - serialized_name="nextHopType", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - subnets = _schema_subnet_read.properties.route_table.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_subnet_read(subnets.Element) - - tags = _schema_subnet_read.properties.route_table.tags - tags.Element = AAZStrType() - - service_association_links = _schema_subnet_read.properties.service_association_links - service_association_links.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_association_links.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.service_association_links.Element.properties - properties.allow_delete = AAZBoolType( - serialized_name="allowDelete", - ) - properties.link = AAZStrType() - properties.linked_resource_type = AAZStrType( - serialized_name="linkedResourceType", - ) - properties.locations = AAZListType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - locations = _schema_subnet_read.properties.service_association_links.Element.properties.locations - locations.Element = AAZStrType() - - service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies - service_endpoint_policies.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_endpoint_policies.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.kind = AAZStrType( - flags={"read_only": True}, - ) - _element.location = AAZStrType() - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties - properties.contextual_service_endpoint_policies = AAZListType( - serialized_name="contextualServiceEndpointPolicies", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.service_alias = AAZStrType( - serialized_name="serviceAlias", - ) - properties.service_endpoint_policy_definitions = AAZListType( - serialized_name="serviceEndpointPolicyDefinitions", - ) - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - contextual_service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.contextual_service_endpoint_policies - contextual_service_endpoint_policies.Element = AAZStrType() - - service_endpoint_policy_definitions = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions - service_endpoint_policy_definitions.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties - properties.description = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.service = AAZStrType() - properties.service_resources = AAZListType( - serialized_name="serviceResources", - ) - - service_resources = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties.service_resources - service_resources.Element = AAZStrType() - - subnets = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_subnet_read(subnets.Element) - - tags = _schema_subnet_read.properties.service_endpoint_policies.Element.tags - tags.Element = AAZStrType() - - service_endpoints = _schema_subnet_read.properties.service_endpoints - service_endpoints.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_endpoints.Element - _element.locations = AAZListType() - _element.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - _element.service = AAZStrType() - - locations = _schema_subnet_read.properties.service_endpoints.Element.locations - locations.Element = AAZStrType() - - _schema.etag = cls._schema_subnet_read.etag - _schema.id = cls._schema_subnet_read.id - _schema.name = cls._schema_subnet_read.name - _schema.properties = cls._schema_subnet_read.properties - _schema.type = cls._schema_subnet_read.type - - _schema_virtual_network_tap_read = None - - @classmethod - def _build_schema_virtual_network_tap_read(cls, _schema): - if cls._schema_virtual_network_tap_read is not None: - _schema.etag = cls._schema_virtual_network_tap_read.etag - _schema.id = cls._schema_virtual_network_tap_read.id - _schema.location = cls._schema_virtual_network_tap_read.location - _schema.name = cls._schema_virtual_network_tap_read.name - _schema.properties = cls._schema_virtual_network_tap_read.properties - _schema.tags = cls._schema_virtual_network_tap_read.tags - _schema.type = cls._schema_virtual_network_tap_read.type - return - - cls._schema_virtual_network_tap_read = _schema_virtual_network_tap_read = AAZObjectType() - - virtual_network_tap_read = _schema_virtual_network_tap_read - virtual_network_tap_read.etag = AAZStrType( - flags={"read_only": True}, - ) - virtual_network_tap_read.id = AAZStrType() - virtual_network_tap_read.location = AAZStrType() - virtual_network_tap_read.name = AAZStrType( - flags={"read_only": True}, - ) - virtual_network_tap_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - virtual_network_tap_read.tags = AAZDictType() - virtual_network_tap_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_virtual_network_tap_read.properties - properties.destination_load_balancer_front_end_ip_configuration = AAZObjectType( - serialized_name="destinationLoadBalancerFrontEndIPConfiguration", - ) - cls._build_schema_frontend_ip_configuration_read(properties.destination_load_balancer_front_end_ip_configuration) - properties.destination_network_interface_ip_configuration = AAZObjectType( - serialized_name="destinationNetworkInterfaceIPConfiguration", - ) - cls._build_schema_network_interface_ip_configuration_read(properties.destination_network_interface_ip_configuration) - properties.destination_port = AAZIntType( - serialized_name="destinationPort", - ) - properties.network_interface_tap_configurations = AAZListType( - serialized_name="networkInterfaceTapConfigurations", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - - network_interface_tap_configurations = _schema_virtual_network_tap_read.properties.network_interface_tap_configurations - network_interface_tap_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_tap_configuration_read(network_interface_tap_configurations.Element) - - tags = _schema_virtual_network_tap_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_virtual_network_tap_read.etag - _schema.id = cls._schema_virtual_network_tap_read.id - _schema.location = cls._schema_virtual_network_tap_read.location - _schema.name = cls._schema_virtual_network_tap_read.name - _schema.properties = cls._schema_virtual_network_tap_read.properties - _schema.tags = cls._schema_virtual_network_tap_read.tags - _schema.type = cls._schema_virtual_network_tap_read.type - - -__all__ = ["Show"] diff --git a/src/spring/azext_spring/aaz/__init__.py b/src/spring/azext_spring/aaz/__init__.py deleted file mode 100644 index 5757aea3175..00000000000 --- a/src/spring/azext_spring/aaz/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- diff --git a/src/spring/azext_spring/aaz/latest/__init__.py b/src/spring/azext_spring/aaz/latest/__init__.py deleted file mode 100644 index 5757aea3175..00000000000 --- a/src/spring/azext_spring/aaz/latest/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- diff --git a/src/spring/azext_spring/aaz/latest/network/__cmd_group.py b/src/spring/azext_spring/aaz/latest/network/__cmd_group.py deleted file mode 100644 index 7582bb60b24..00000000000 --- a/src/spring/azext_spring/aaz/latest/network/__cmd_group.py +++ /dev/null @@ -1,20 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -class __CMDGroup(AAZCommandGroup): - """Manage Azure Network resources. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/spring/azext_spring/aaz/latest/network/__init__.py b/src/spring/azext_spring/aaz/latest/network/__init__.py deleted file mode 100644 index 5a9d61963d6..00000000000 --- a/src/spring/azext_spring/aaz/latest/network/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * diff --git a/src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py b/src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py deleted file mode 100644 index 4099513f8aa..00000000000 --- a/src/spring/azext_spring/aaz/latest/network/vnet/__cmd_group.py +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -class __CMDGroup(AAZCommandGroup): - """Check if a private IP address is available for use within a virtual network. - - To learn more about Virtual Networks visit https://docs.microsoft.com/azure/virtual-network/virtual-network-manage-network. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/spring/azext_spring/aaz/latest/network/vnet/__init__.py b/src/spring/azext_spring/aaz/latest/network/vnet/__init__.py deleted file mode 100644 index 28d5f355813..00000000000 --- a/src/spring/azext_spring/aaz/latest/network/vnet/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._show import * diff --git a/src/spring/azext_spring/aaz/latest/network/vnet/_show.py b/src/spring/azext_spring/aaz/latest/network/vnet/_show.py deleted file mode 100644 index cb097da9151..00000000000 --- a/src/spring/azext_spring/aaz/latest/network/vnet/_show.py +++ /dev/null @@ -1,2450 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -class Show(AAZCommand): - """Get the details of a virtual network. - - :example: Get details for MyVNet. - az network vnet show -g MyResourceGroup -n MyVNet - """ - - _aaz_info = { - "version": "2022-01-01", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}", "2022-01-01"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - _args_schema.name = AAZStrArg( - options=["-n", "--name"], - help="The virtual network (VNet) name.", - required=True, - id_part="name", - ) - _args_schema.expand = AAZStrArg( - options=["--expand"], - help="Expands referenced resources. Default value is None.", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.VirtualNetworksGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class VirtualNetworksGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "ODataV4Format" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - **self.serialize_url_param( - "virtualNetworkName", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "$expand", self.ctx.args.expand, - ), - **self.serialize_query_param( - "api-version", "2022-01-01", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.etag = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - _ShowHelper._build_schema_extended_location_read(_schema_on_200.extended_location) - _schema_on_200.id = AAZStrType() - _schema_on_200.location = AAZStrType() - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _schema_on_200.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.address_space = AAZObjectType( - serialized_name="addressSpace", - ) - _ShowHelper._build_schema_address_space_read(properties.address_space) - properties.bgp_communities = AAZObjectType( - serialized_name="bgpCommunities", - ) - properties.ddos_protection_plan = AAZObjectType( - serialized_name="ddosProtectionPlan", - ) - properties.dhcp_options = AAZObjectType( - serialized_name="dhcpOptions", - ) - properties.enable_ddos_protection = AAZBoolType( - serialized_name="enableDdosProtection", - ) - properties.enable_vm_protection = AAZBoolType( - serialized_name="enableVmProtection", - ) - properties.encryption = AAZObjectType() - properties.flow_timeout_in_minutes = AAZIntType( - serialized_name="flowTimeoutInMinutes", - ) - properties.ip_allocations = AAZListType( - serialized_name="ipAllocations", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.subnets = AAZListType() - properties.virtual_network_peerings = AAZListType( - serialized_name="virtualNetworkPeerings", - ) - - bgp_communities = cls._schema_on_200.properties.bgp_communities - bgp_communities.regional_community = AAZStrType( - serialized_name="regionalCommunity", - flags={"read_only": True}, - ) - bgp_communities.virtual_network_community = AAZStrType( - serialized_name="virtualNetworkCommunity", - flags={"required": True}, - ) - - ddos_protection_plan = cls._schema_on_200.properties.ddos_protection_plan - ddos_protection_plan.id = AAZStrType() - - dhcp_options = cls._schema_on_200.properties.dhcp_options - dhcp_options.dns_servers = AAZListType( - serialized_name="dnsServers", - ) - - dns_servers = cls._schema_on_200.properties.dhcp_options.dns_servers - dns_servers.Element = AAZStrType() - - encryption = cls._schema_on_200.properties.encryption - encryption.enabled = AAZBoolType( - flags={"required": True}, - ) - encryption.enforcement = AAZStrType() - - ip_allocations = cls._schema_on_200.properties.ip_allocations - ip_allocations.Element = AAZObjectType() - _ShowHelper._build_schema_sub_resource_read(ip_allocations.Element) - - subnets = cls._schema_on_200.properties.subnets - subnets.Element = AAZObjectType() - _ShowHelper._build_schema_subnet_read(subnets.Element) - - virtual_network_peerings = cls._schema_on_200.properties.virtual_network_peerings - virtual_network_peerings.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.virtual_network_peerings.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = cls._schema_on_200.properties.virtual_network_peerings.Element.properties - properties.allow_forwarded_traffic = AAZBoolType( - serialized_name="allowForwardedTraffic", - ) - properties.allow_gateway_transit = AAZBoolType( - serialized_name="allowGatewayTransit", - ) - properties.allow_virtual_network_access = AAZBoolType( - serialized_name="allowVirtualNetworkAccess", - ) - properties.do_not_verify_remote_gateways = AAZBoolType( - serialized_name="doNotVerifyRemoteGateways", - ) - properties.peering_state = AAZStrType( - serialized_name="peeringState", - ) - properties.peering_sync_level = AAZStrType( - serialized_name="peeringSyncLevel", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.remote_address_space = AAZObjectType( - serialized_name="remoteAddressSpace", - ) - _ShowHelper._build_schema_address_space_read(properties.remote_address_space) - properties.remote_bgp_communities = AAZObjectType( - serialized_name="remoteBgpCommunities", - ) - properties.remote_virtual_network = AAZObjectType( - serialized_name="remoteVirtualNetwork", - ) - _ShowHelper._build_schema_sub_resource_read(properties.remote_virtual_network) - properties.remote_virtual_network_address_space = AAZObjectType( - serialized_name="remoteVirtualNetworkAddressSpace", - ) - _ShowHelper._build_schema_address_space_read(properties.remote_virtual_network_address_space) - properties.remote_virtual_network_encryption = AAZObjectType( - serialized_name="remoteVirtualNetworkEncryption", - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.use_remote_gateways = AAZBoolType( - serialized_name="useRemoteGateways", - ) - - remote_bgp_communities = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_bgp_communities - remote_bgp_communities.regional_community = AAZStrType( - serialized_name="regionalCommunity", - flags={"read_only": True}, - ) - remote_bgp_communities.virtual_network_community = AAZStrType( - serialized_name="virtualNetworkCommunity", - flags={"required": True}, - ) - - remote_virtual_network_encryption = cls._schema_on_200.properties.virtual_network_peerings.Element.properties.remote_virtual_network_encryption - remote_virtual_network_encryption.enabled = AAZBoolType( - flags={"required": True}, - ) - remote_virtual_network_encryption.enforcement = AAZStrType() - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - _schema_address_space_read = None - - @classmethod - def _build_schema_address_space_read(cls, _schema): - if cls._schema_address_space_read is not None: - _schema.address_prefixes = cls._schema_address_space_read.address_prefixes - return - - cls._schema_address_space_read = _schema_address_space_read = AAZObjectType() - - address_space_read = _schema_address_space_read - address_space_read.address_prefixes = AAZListType( - serialized_name="addressPrefixes", - ) - - address_prefixes = _schema_address_space_read.address_prefixes - address_prefixes.Element = AAZStrType() - - _schema.address_prefixes = cls._schema_address_space_read.address_prefixes - - _schema_application_security_group_read = None - - @classmethod - def _build_schema_application_security_group_read(cls, _schema): - if cls._schema_application_security_group_read is not None: - _schema.etag = cls._schema_application_security_group_read.etag - _schema.id = cls._schema_application_security_group_read.id - _schema.location = cls._schema_application_security_group_read.location - _schema.name = cls._schema_application_security_group_read.name - _schema.properties = cls._schema_application_security_group_read.properties - _schema.tags = cls._schema_application_security_group_read.tags - _schema.type = cls._schema_application_security_group_read.type - return - - cls._schema_application_security_group_read = _schema_application_security_group_read = AAZObjectType() - - application_security_group_read = _schema_application_security_group_read - application_security_group_read.etag = AAZStrType( - flags={"read_only": True}, - ) - application_security_group_read.id = AAZStrType() - application_security_group_read.location = AAZStrType() - application_security_group_read.name = AAZStrType( - flags={"read_only": True}, - ) - application_security_group_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - application_security_group_read.tags = AAZDictType() - application_security_group_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_application_security_group_read.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - - tags = _schema_application_security_group_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_application_security_group_read.etag - _schema.id = cls._schema_application_security_group_read.id - _schema.location = cls._schema_application_security_group_read.location - _schema.name = cls._schema_application_security_group_read.name - _schema.properties = cls._schema_application_security_group_read.properties - _schema.tags = cls._schema_application_security_group_read.tags - _schema.type = cls._schema_application_security_group_read.type - - _schema_extended_location_read = None - - @classmethod - def _build_schema_extended_location_read(cls, _schema): - if cls._schema_extended_location_read is not None: - _schema.name = cls._schema_extended_location_read.name - _schema.type = cls._schema_extended_location_read.type - return - - cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType() - - extended_location_read = _schema_extended_location_read - extended_location_read.name = AAZStrType() - extended_location_read.type = AAZStrType() - - _schema.name = cls._schema_extended_location_read.name - _schema.type = cls._schema_extended_location_read.type - - _schema_frontend_ip_configuration_read = None - - @classmethod - def _build_schema_frontend_ip_configuration_read(cls, _schema): - if cls._schema_frontend_ip_configuration_read is not None: - _schema.etag = cls._schema_frontend_ip_configuration_read.etag - _schema.id = cls._schema_frontend_ip_configuration_read.id - _schema.name = cls._schema_frontend_ip_configuration_read.name - _schema.properties = cls._schema_frontend_ip_configuration_read.properties - _schema.type = cls._schema_frontend_ip_configuration_read.type - _schema.zones = cls._schema_frontend_ip_configuration_read.zones - return - - cls._schema_frontend_ip_configuration_read = _schema_frontend_ip_configuration_read = AAZObjectType() - - frontend_ip_configuration_read = _schema_frontend_ip_configuration_read - frontend_ip_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - frontend_ip_configuration_read.id = AAZStrType() - frontend_ip_configuration_read.name = AAZStrType() - frontend_ip_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - frontend_ip_configuration_read.type = AAZStrType( - flags={"read_only": True}, - ) - frontend_ip_configuration_read.zones = AAZListType() - - properties = _schema_frontend_ip_configuration_read.properties - properties.gateway_load_balancer = AAZObjectType( - serialized_name="gatewayLoadBalancer", - ) - cls._build_schema_sub_resource_read(properties.gateway_load_balancer) - properties.inbound_nat_pools = AAZListType( - serialized_name="inboundNatPools", - flags={"read_only": True}, - ) - properties.inbound_nat_rules = AAZListType( - serialized_name="inboundNatRules", - flags={"read_only": True}, - ) - properties.load_balancing_rules = AAZListType( - serialized_name="loadBalancingRules", - flags={"read_only": True}, - ) - properties.outbound_rules = AAZListType( - serialized_name="outboundRules", - flags={"read_only": True}, - ) - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_address_version = AAZStrType( - serialized_name="privateIPAddressVersion", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address = AAZObjectType( - serialized_name="publicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.public_ip_address) - properties.public_ip_prefix = AAZObjectType( - serialized_name="publicIPPrefix", - ) - cls._build_schema_sub_resource_read(properties.public_ip_prefix) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - inbound_nat_pools = _schema_frontend_ip_configuration_read.properties.inbound_nat_pools - inbound_nat_pools.Element = AAZObjectType() - cls._build_schema_sub_resource_read(inbound_nat_pools.Element) - - inbound_nat_rules = _schema_frontend_ip_configuration_read.properties.inbound_nat_rules - inbound_nat_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(inbound_nat_rules.Element) - - load_balancing_rules = _schema_frontend_ip_configuration_read.properties.load_balancing_rules - load_balancing_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(load_balancing_rules.Element) - - outbound_rules = _schema_frontend_ip_configuration_read.properties.outbound_rules - outbound_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(outbound_rules.Element) - - zones = _schema_frontend_ip_configuration_read.zones - zones.Element = AAZStrType() - - _schema.etag = cls._schema_frontend_ip_configuration_read.etag - _schema.id = cls._schema_frontend_ip_configuration_read.id - _schema.name = cls._schema_frontend_ip_configuration_read.name - _schema.properties = cls._schema_frontend_ip_configuration_read.properties - _schema.type = cls._schema_frontend_ip_configuration_read.type - _schema.zones = cls._schema_frontend_ip_configuration_read.zones - - _schema_ip_configuration_read = None - - @classmethod - def _build_schema_ip_configuration_read(cls, _schema): - if cls._schema_ip_configuration_read is not None: - _schema.etag = cls._schema_ip_configuration_read.etag - _schema.id = cls._schema_ip_configuration_read.id - _schema.name = cls._schema_ip_configuration_read.name - _schema.properties = cls._schema_ip_configuration_read.properties - return - - cls._schema_ip_configuration_read = _schema_ip_configuration_read = AAZObjectType() - - ip_configuration_read = _schema_ip_configuration_read - ip_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - ip_configuration_read.id = AAZStrType() - ip_configuration_read.name = AAZStrType() - ip_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - - properties = _schema_ip_configuration_read.properties - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address = AAZObjectType( - serialized_name="publicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.public_ip_address) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - _schema.etag = cls._schema_ip_configuration_read.etag - _schema.id = cls._schema_ip_configuration_read.id - _schema.name = cls._schema_ip_configuration_read.name - _schema.properties = cls._schema_ip_configuration_read.properties - - _schema_network_interface_ip_configuration_read = None - - @classmethod - def _build_schema_network_interface_ip_configuration_read(cls, _schema): - if cls._schema_network_interface_ip_configuration_read is not None: - _schema.etag = cls._schema_network_interface_ip_configuration_read.etag - _schema.id = cls._schema_network_interface_ip_configuration_read.id - _schema.name = cls._schema_network_interface_ip_configuration_read.name - _schema.properties = cls._schema_network_interface_ip_configuration_read.properties - _schema.type = cls._schema_network_interface_ip_configuration_read.type - return - - cls._schema_network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read = AAZObjectType() - - network_interface_ip_configuration_read = _schema_network_interface_ip_configuration_read - network_interface_ip_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_interface_ip_configuration_read.id = AAZStrType() - network_interface_ip_configuration_read.name = AAZStrType() - network_interface_ip_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_interface_ip_configuration_read.type = AAZStrType() - - properties = _schema_network_interface_ip_configuration_read.properties - properties.application_gateway_backend_address_pools = AAZListType( - serialized_name="applicationGatewayBackendAddressPools", - ) - properties.application_security_groups = AAZListType( - serialized_name="applicationSecurityGroups", - ) - properties.gateway_load_balancer = AAZObjectType( - serialized_name="gatewayLoadBalancer", - ) - cls._build_schema_sub_resource_read(properties.gateway_load_balancer) - properties.load_balancer_backend_address_pools = AAZListType( - serialized_name="loadBalancerBackendAddressPools", - ) - properties.load_balancer_inbound_nat_rules = AAZListType( - serialized_name="loadBalancerInboundNatRules", - ) - properties.primary = AAZBoolType() - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_address_version = AAZStrType( - serialized_name="privateIPAddressVersion", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.private_link_connection_properties = AAZObjectType( - serialized_name="privateLinkConnectionProperties", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address = AAZObjectType( - serialized_name="publicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.public_ip_address) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - properties.virtual_network_taps = AAZListType( - serialized_name="virtualNetworkTaps", - ) - - application_gateway_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools - application_gateway_backend_address_pools.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties - properties.backend_addresses = AAZListType( - serialized_name="backendAddresses", - ) - properties.backend_ip_configurations = AAZListType( - serialized_name="backendIPConfigurations", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - backend_addresses = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses - backend_addresses.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_addresses.Element - _element.fqdn = AAZStrType() - _element.ip_address = AAZStrType( - serialized_name="ipAddress", - ) - - backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.application_gateway_backend_address_pools.Element.properties.backend_ip_configurations - backend_ip_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) - - application_security_groups = _schema_network_interface_ip_configuration_read.properties.application_security_groups - application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(application_security_groups.Element) - - load_balancer_backend_address_pools = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools - load_balancer_backend_address_pools.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties - properties.backend_ip_configurations = AAZListType( - serialized_name="backendIPConfigurations", - flags={"read_only": True}, - ) - properties.drain_period_in_seconds = AAZIntType( - serialized_name="drainPeriodInSeconds", - ) - properties.inbound_nat_rules = AAZListType( - serialized_name="inboundNatRules", - flags={"read_only": True}, - ) - properties.load_balancer_backend_addresses = AAZListType( - serialized_name="loadBalancerBackendAddresses", - ) - properties.load_balancing_rules = AAZListType( - serialized_name="loadBalancingRules", - flags={"read_only": True}, - ) - properties.location = AAZStrType() - properties.outbound_rule = AAZObjectType( - serialized_name="outboundRule", - ) - cls._build_schema_sub_resource_read(properties.outbound_rule) - properties.outbound_rules = AAZListType( - serialized_name="outboundRules", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.tunnel_interfaces = AAZListType( - serialized_name="tunnelInterfaces", - ) - - backend_ip_configurations = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.backend_ip_configurations - backend_ip_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_ip_configuration_read(backend_ip_configurations.Element) - - inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.inbound_nat_rules - inbound_nat_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(inbound_nat_rules.Element) - - load_balancer_backend_addresses = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses - load_balancer_backend_addresses.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties - properties.admin_state = AAZStrType( - serialized_name="adminState", - ) - properties.inbound_nat_rules_port_mapping = AAZListType( - serialized_name="inboundNatRulesPortMapping", - flags={"read_only": True}, - ) - properties.ip_address = AAZStrType( - serialized_name="ipAddress", - ) - properties.load_balancer_frontend_ip_configuration = AAZObjectType( - serialized_name="loadBalancerFrontendIPConfiguration", - ) - cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration) - properties.network_interface_ip_configuration = AAZObjectType( - serialized_name="networkInterfaceIPConfiguration", - ) - cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration) - properties.subnet = AAZObjectType() - cls._build_schema_sub_resource_read(properties.subnet) - properties.virtual_network = AAZObjectType( - serialized_name="virtualNetwork", - ) - cls._build_schema_sub_resource_read(properties.virtual_network) - - inbound_nat_rules_port_mapping = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping - inbound_nat_rules_port_mapping.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancer_backend_addresses.Element.properties.inbound_nat_rules_port_mapping.Element - _element.backend_port = AAZIntType( - serialized_name="backendPort", - ) - _element.frontend_port = AAZIntType( - serialized_name="frontendPort", - ) - _element.inbound_nat_rule_name = AAZStrType( - serialized_name="inboundNatRuleName", - ) - - load_balancing_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.load_balancing_rules - load_balancing_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(load_balancing_rules.Element) - - outbound_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.outbound_rules - outbound_rules.Element = AAZObjectType() - cls._build_schema_sub_resource_read(outbound_rules.Element) - - tunnel_interfaces = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces - tunnel_interfaces.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_backend_address_pools.Element.properties.tunnel_interfaces.Element - _element.identifier = AAZIntType() - _element.port = AAZIntType() - _element.protocol = AAZStrType() - _element.type = AAZStrType() - - load_balancer_inbound_nat_rules = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules - load_balancer_inbound_nat_rules.Element = AAZObjectType() - - _element = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_ip_configuration_read.properties.load_balancer_inbound_nat_rules.Element.properties - properties.backend_address_pool = AAZObjectType( - serialized_name="backendAddressPool", - ) - cls._build_schema_sub_resource_read(properties.backend_address_pool) - properties.backend_ip_configuration = AAZObjectType( - serialized_name="backendIPConfiguration", - ) - cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration) - properties.backend_port = AAZIntType( - serialized_name="backendPort", - ) - properties.enable_floating_ip = AAZBoolType( - serialized_name="enableFloatingIP", - ) - properties.enable_tcp_reset = AAZBoolType( - serialized_name="enableTcpReset", - ) - properties.frontend_ip_configuration = AAZObjectType( - serialized_name="frontendIPConfiguration", - ) - cls._build_schema_sub_resource_read(properties.frontend_ip_configuration) - properties.frontend_port = AAZIntType( - serialized_name="frontendPort", - ) - properties.frontend_port_range_end = AAZIntType( - serialized_name="frontendPortRangeEnd", - ) - properties.frontend_port_range_start = AAZIntType( - serialized_name="frontendPortRangeStart", - ) - properties.idle_timeout_in_minutes = AAZIntType( - serialized_name="idleTimeoutInMinutes", - ) - properties.protocol = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - private_link_connection_properties = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties - private_link_connection_properties.fqdns = AAZListType( - flags={"read_only": True}, - ) - private_link_connection_properties.group_id = AAZStrType( - serialized_name="groupId", - flags={"read_only": True}, - ) - private_link_connection_properties.required_member_name = AAZStrType( - serialized_name="requiredMemberName", - flags={"read_only": True}, - ) - - fqdns = _schema_network_interface_ip_configuration_read.properties.private_link_connection_properties.fqdns - fqdns.Element = AAZStrType() - - virtual_network_taps = _schema_network_interface_ip_configuration_read.properties.virtual_network_taps - virtual_network_taps.Element = AAZObjectType() - cls._build_schema_virtual_network_tap_read(virtual_network_taps.Element) - - _schema.etag = cls._schema_network_interface_ip_configuration_read.etag - _schema.id = cls._schema_network_interface_ip_configuration_read.id - _schema.name = cls._schema_network_interface_ip_configuration_read.name - _schema.properties = cls._schema_network_interface_ip_configuration_read.properties - _schema.type = cls._schema_network_interface_ip_configuration_read.type - - _schema_network_interface_tap_configuration_read = None - - @classmethod - def _build_schema_network_interface_tap_configuration_read(cls, _schema): - if cls._schema_network_interface_tap_configuration_read is not None: - _schema.etag = cls._schema_network_interface_tap_configuration_read.etag - _schema.id = cls._schema_network_interface_tap_configuration_read.id - _schema.name = cls._schema_network_interface_tap_configuration_read.name - _schema.properties = cls._schema_network_interface_tap_configuration_read.properties - _schema.type = cls._schema_network_interface_tap_configuration_read.type - return - - cls._schema_network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read = AAZObjectType() - - network_interface_tap_configuration_read = _schema_network_interface_tap_configuration_read - network_interface_tap_configuration_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_interface_tap_configuration_read.id = AAZStrType() - network_interface_tap_configuration_read.name = AAZStrType() - network_interface_tap_configuration_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_interface_tap_configuration_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_tap_configuration_read.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.virtual_network_tap = AAZObjectType( - serialized_name="virtualNetworkTap", - ) - cls._build_schema_virtual_network_tap_read(properties.virtual_network_tap) - - _schema.etag = cls._schema_network_interface_tap_configuration_read.etag - _schema.id = cls._schema_network_interface_tap_configuration_read.id - _schema.name = cls._schema_network_interface_tap_configuration_read.name - _schema.properties = cls._schema_network_interface_tap_configuration_read.properties - _schema.type = cls._schema_network_interface_tap_configuration_read.type - - _schema_network_interface_read = None - - @classmethod - def _build_schema_network_interface_read(cls, _schema): - if cls._schema_network_interface_read is not None: - _schema.etag = cls._schema_network_interface_read.etag - _schema.extended_location = cls._schema_network_interface_read.extended_location - _schema.id = cls._schema_network_interface_read.id - _schema.location = cls._schema_network_interface_read.location - _schema.name = cls._schema_network_interface_read.name - _schema.properties = cls._schema_network_interface_read.properties - _schema.tags = cls._schema_network_interface_read.tags - _schema.type = cls._schema_network_interface_read.type - return - - cls._schema_network_interface_read = _schema_network_interface_read = AAZObjectType() - - network_interface_read = _schema_network_interface_read - network_interface_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_interface_read.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(network_interface_read.extended_location) - network_interface_read.id = AAZStrType() - network_interface_read.location = AAZStrType() - network_interface_read.name = AAZStrType( - flags={"read_only": True}, - ) - network_interface_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_interface_read.tags = AAZDictType() - network_interface_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties - properties.auxiliary_mode = AAZStrType( - serialized_name="auxiliaryMode", - ) - properties.dns_settings = AAZObjectType( - serialized_name="dnsSettings", - ) - properties.dscp_configuration = AAZObjectType( - serialized_name="dscpConfiguration", - ) - cls._build_schema_sub_resource_read(properties.dscp_configuration) - properties.enable_accelerated_networking = AAZBoolType( - serialized_name="enableAcceleratedNetworking", - ) - properties.enable_ip_forwarding = AAZBoolType( - serialized_name="enableIPForwarding", - ) - properties.hosted_workloads = AAZListType( - serialized_name="hostedWorkloads", - flags={"read_only": True}, - ) - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - ) - properties.mac_address = AAZStrType( - serialized_name="macAddress", - flags={"read_only": True}, - ) - properties.migration_phase = AAZStrType( - serialized_name="migrationPhase", - ) - properties.network_security_group = AAZObjectType( - serialized_name="networkSecurityGroup", - ) - cls._build_schema_network_security_group_read(properties.network_security_group) - properties.nic_type = AAZStrType( - serialized_name="nicType", - ) - properties.primary = AAZBoolType( - flags={"read_only": True}, - ) - properties.private_endpoint = AAZObjectType( - serialized_name="privateEndpoint", - ) - cls._build_schema_private_endpoint_read(properties.private_endpoint) - properties.private_link_service = AAZObjectType( - serialized_name="privateLinkService", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.tap_configurations = AAZListType( - serialized_name="tapConfigurations", - flags={"read_only": True}, - ) - properties.virtual_machine = AAZObjectType( - serialized_name="virtualMachine", - ) - cls._build_schema_sub_resource_read(properties.virtual_machine) - properties.vnet_encryption_supported = AAZBoolType( - serialized_name="vnetEncryptionSupported", - flags={"read_only": True}, - ) - properties.workload_type = AAZStrType( - serialized_name="workloadType", - ) - - dns_settings = _schema_network_interface_read.properties.dns_settings - dns_settings.applied_dns_servers = AAZListType( - serialized_name="appliedDnsServers", - flags={"read_only": True}, - ) - dns_settings.dns_servers = AAZListType( - serialized_name="dnsServers", - ) - dns_settings.internal_dns_name_label = AAZStrType( - serialized_name="internalDnsNameLabel", - ) - dns_settings.internal_domain_name_suffix = AAZStrType( - serialized_name="internalDomainNameSuffix", - flags={"read_only": True}, - ) - dns_settings.internal_fqdn = AAZStrType( - serialized_name="internalFqdn", - flags={"read_only": True}, - ) - - applied_dns_servers = _schema_network_interface_read.properties.dns_settings.applied_dns_servers - applied_dns_servers.Element = AAZStrType() - - dns_servers = _schema_network_interface_read.properties.dns_settings.dns_servers - dns_servers.Element = AAZStrType() - - hosted_workloads = _schema_network_interface_read.properties.hosted_workloads - hosted_workloads.Element = AAZStrType() - - ip_configurations = _schema_network_interface_read.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_ip_configuration_read(ip_configurations.Element) - - private_link_service = _schema_network_interface_read.properties.private_link_service - private_link_service.etag = AAZStrType( - flags={"read_only": True}, - ) - private_link_service.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(private_link_service.extended_location) - private_link_service.id = AAZStrType() - private_link_service.location = AAZStrType() - private_link_service.name = AAZStrType( - flags={"read_only": True}, - ) - private_link_service.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - private_link_service.tags = AAZDictType() - private_link_service.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties.private_link_service.properties - properties.alias = AAZStrType( - flags={"read_only": True}, - ) - properties.auto_approval = AAZObjectType( - serialized_name="autoApproval", - ) - properties.enable_proxy_protocol = AAZBoolType( - serialized_name="enableProxyProtocol", - ) - properties.fqdns = AAZListType() - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - ) - properties.load_balancer_frontend_ip_configurations = AAZListType( - serialized_name="loadBalancerFrontendIpConfigurations", - ) - properties.network_interfaces = AAZListType( - serialized_name="networkInterfaces", - flags={"read_only": True}, - ) - properties.private_endpoint_connections = AAZListType( - serialized_name="privateEndpointConnections", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.visibility = AAZObjectType() - - auto_approval = _schema_network_interface_read.properties.private_link_service.properties.auto_approval - auto_approval.subscriptions = AAZListType() - - subscriptions = _schema_network_interface_read.properties.private_link_service.properties.auto_approval.subscriptions - subscriptions.Element = AAZStrType() - - fqdns = _schema_network_interface_read.properties.private_link_service.properties.fqdns - fqdns.Element = AAZStrType() - - ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - - _element = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties.private_link_service.properties.ip_configurations.Element.properties - properties.primary = AAZBoolType() - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - properties.private_ip_address_version = AAZStrType( - serialized_name="privateIPAddressVersion", - ) - properties.private_ip_allocation_method = AAZStrType( - serialized_name="privateIPAllocationMethod", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - load_balancer_frontend_ip_configurations = _schema_network_interface_read.properties.private_link_service.properties.load_balancer_frontend_ip_configurations - load_balancer_frontend_ip_configurations.Element = AAZObjectType() - cls._build_schema_frontend_ip_configuration_read(load_balancer_frontend_ip_configurations.Element) - - network_interfaces = _schema_network_interface_read.properties.private_link_service.properties.network_interfaces - network_interfaces.Element = AAZObjectType() - cls._build_schema_network_interface_read(network_interfaces.Element) - - private_endpoint_connections = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections - private_endpoint_connections.Element = AAZObjectType() - - _element = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_interface_read.properties.private_link_service.properties.private_endpoint_connections.Element.properties - properties.link_identifier = AAZStrType( - serialized_name="linkIdentifier", - flags={"read_only": True}, - ) - properties.private_endpoint = AAZObjectType( - serialized_name="privateEndpoint", - ) - cls._build_schema_private_endpoint_read(properties.private_endpoint) - properties.private_link_service_connection_state = AAZObjectType( - serialized_name="privateLinkServiceConnectionState", - ) - cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - visibility = _schema_network_interface_read.properties.private_link_service.properties.visibility - visibility.subscriptions = AAZListType() - - subscriptions = _schema_network_interface_read.properties.private_link_service.properties.visibility.subscriptions - subscriptions.Element = AAZStrType() - - tags = _schema_network_interface_read.properties.private_link_service.tags - tags.Element = AAZStrType() - - tap_configurations = _schema_network_interface_read.properties.tap_configurations - tap_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_tap_configuration_read(tap_configurations.Element) - - tags = _schema_network_interface_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_network_interface_read.etag - _schema.extended_location = cls._schema_network_interface_read.extended_location - _schema.id = cls._schema_network_interface_read.id - _schema.location = cls._schema_network_interface_read.location - _schema.name = cls._schema_network_interface_read.name - _schema.properties = cls._schema_network_interface_read.properties - _schema.tags = cls._schema_network_interface_read.tags - _schema.type = cls._schema_network_interface_read.type - - _schema_network_security_group_read = None - - @classmethod - def _build_schema_network_security_group_read(cls, _schema): - if cls._schema_network_security_group_read is not None: - _schema.etag = cls._schema_network_security_group_read.etag - _schema.id = cls._schema_network_security_group_read.id - _schema.location = cls._schema_network_security_group_read.location - _schema.name = cls._schema_network_security_group_read.name - _schema.properties = cls._schema_network_security_group_read.properties - _schema.tags = cls._schema_network_security_group_read.tags - _schema.type = cls._schema_network_security_group_read.type - return - - cls._schema_network_security_group_read = _schema_network_security_group_read = AAZObjectType() - - network_security_group_read = _schema_network_security_group_read - network_security_group_read.etag = AAZStrType( - flags={"read_only": True}, - ) - network_security_group_read.id = AAZStrType() - network_security_group_read.location = AAZStrType() - network_security_group_read.name = AAZStrType( - flags={"read_only": True}, - ) - network_security_group_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - network_security_group_read.tags = AAZDictType() - network_security_group_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_security_group_read.properties - properties.default_security_rules = AAZListType( - serialized_name="defaultSecurityRules", - flags={"read_only": True}, - ) - properties.flow_logs = AAZListType( - serialized_name="flowLogs", - flags={"read_only": True}, - ) - properties.flush_connection = AAZBoolType( - serialized_name="flushConnection", - ) - properties.network_interfaces = AAZListType( - serialized_name="networkInterfaces", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.security_rules = AAZListType( - serialized_name="securityRules", - ) - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - default_security_rules = _schema_network_security_group_read.properties.default_security_rules - default_security_rules.Element = AAZObjectType() - cls._build_schema_security_rule_read(default_security_rules.Element) - - flow_logs = _schema_network_security_group_read.properties.flow_logs - flow_logs.Element = AAZObjectType() - - _element = _schema_network_security_group_read.properties.flow_logs.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.location = AAZStrType() - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_network_security_group_read.properties.flow_logs.Element.properties - properties.enabled = AAZBoolType() - properties.flow_analytics_configuration = AAZObjectType( - serialized_name="flowAnalyticsConfiguration", - ) - properties.format = AAZObjectType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.retention_policy = AAZObjectType( - serialized_name="retentionPolicy", - ) - properties.storage_id = AAZStrType( - serialized_name="storageId", - flags={"required": True}, - ) - properties.target_resource_guid = AAZStrType( - serialized_name="targetResourceGuid", - flags={"read_only": True}, - ) - properties.target_resource_id = AAZStrType( - serialized_name="targetResourceId", - flags={"required": True}, - ) - - flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration - flow_analytics_configuration.network_watcher_flow_analytics_configuration = AAZObjectType( - serialized_name="networkWatcherFlowAnalyticsConfiguration", - ) - - network_watcher_flow_analytics_configuration = _schema_network_security_group_read.properties.flow_logs.Element.properties.flow_analytics_configuration.network_watcher_flow_analytics_configuration - network_watcher_flow_analytics_configuration.enabled = AAZBoolType() - network_watcher_flow_analytics_configuration.traffic_analytics_interval = AAZIntType( - serialized_name="trafficAnalyticsInterval", - ) - network_watcher_flow_analytics_configuration.workspace_id = AAZStrType( - serialized_name="workspaceId", - ) - network_watcher_flow_analytics_configuration.workspace_region = AAZStrType( - serialized_name="workspaceRegion", - ) - network_watcher_flow_analytics_configuration.workspace_resource_id = AAZStrType( - serialized_name="workspaceResourceId", - ) - - format = _schema_network_security_group_read.properties.flow_logs.Element.properties.format - format.type = AAZStrType() - format.version = AAZIntType() - - retention_policy = _schema_network_security_group_read.properties.flow_logs.Element.properties.retention_policy - retention_policy.days = AAZIntType() - retention_policy.enabled = AAZBoolType() - - tags = _schema_network_security_group_read.properties.flow_logs.Element.tags - tags.Element = AAZStrType() - - network_interfaces = _schema_network_security_group_read.properties.network_interfaces - network_interfaces.Element = AAZObjectType() - cls._build_schema_network_interface_read(network_interfaces.Element) - - security_rules = _schema_network_security_group_read.properties.security_rules - security_rules.Element = AAZObjectType() - cls._build_schema_security_rule_read(security_rules.Element) - - subnets = _schema_network_security_group_read.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_subnet_read(subnets.Element) - - tags = _schema_network_security_group_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_network_security_group_read.etag - _schema.id = cls._schema_network_security_group_read.id - _schema.location = cls._schema_network_security_group_read.location - _schema.name = cls._schema_network_security_group_read.name - _schema.properties = cls._schema_network_security_group_read.properties - _schema.tags = cls._schema_network_security_group_read.tags - _schema.type = cls._schema_network_security_group_read.type - - _schema_private_endpoint_read = None - - @classmethod - def _build_schema_private_endpoint_read(cls, _schema): - if cls._schema_private_endpoint_read is not None: - _schema.etag = cls._schema_private_endpoint_read.etag - _schema.extended_location = cls._schema_private_endpoint_read.extended_location - _schema.id = cls._schema_private_endpoint_read.id - _schema.location = cls._schema_private_endpoint_read.location - _schema.name = cls._schema_private_endpoint_read.name - _schema.properties = cls._schema_private_endpoint_read.properties - _schema.tags = cls._schema_private_endpoint_read.tags - _schema.type = cls._schema_private_endpoint_read.type - return - - cls._schema_private_endpoint_read = _schema_private_endpoint_read = AAZObjectType() - - private_endpoint_read = _schema_private_endpoint_read - private_endpoint_read.etag = AAZStrType( - flags={"read_only": True}, - ) - private_endpoint_read.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(private_endpoint_read.extended_location) - private_endpoint_read.id = AAZStrType() - private_endpoint_read.location = AAZStrType() - private_endpoint_read.name = AAZStrType( - flags={"read_only": True}, - ) - private_endpoint_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - private_endpoint_read.tags = AAZDictType() - private_endpoint_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_private_endpoint_read.properties - properties.application_security_groups = AAZListType( - serialized_name="applicationSecurityGroups", - ) - properties.custom_dns_configs = AAZListType( - serialized_name="customDnsConfigs", - ) - properties.custom_network_interface_name = AAZStrType( - serialized_name="customNetworkInterfaceName", - ) - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - ) - properties.manual_private_link_service_connections = AAZListType( - serialized_name="manualPrivateLinkServiceConnections", - ) - properties.network_interfaces = AAZListType( - serialized_name="networkInterfaces", - flags={"read_only": True}, - ) - properties.private_link_service_connections = AAZListType( - serialized_name="privateLinkServiceConnections", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - application_security_groups = _schema_private_endpoint_read.properties.application_security_groups - application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(application_security_groups.Element) - - custom_dns_configs = _schema_private_endpoint_read.properties.custom_dns_configs - custom_dns_configs.Element = AAZObjectType() - - _element = _schema_private_endpoint_read.properties.custom_dns_configs.Element - _element.fqdn = AAZStrType() - _element.ip_addresses = AAZListType( - serialized_name="ipAddresses", - ) - - ip_addresses = _schema_private_endpoint_read.properties.custom_dns_configs.Element.ip_addresses - ip_addresses.Element = AAZStrType() - - ip_configurations = _schema_private_endpoint_read.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - - _element = _schema_private_endpoint_read.properties.ip_configurations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_private_endpoint_read.properties.ip_configurations.Element.properties - properties.group_id = AAZStrType( - serialized_name="groupId", - ) - properties.member_name = AAZStrType( - serialized_name="memberName", - ) - properties.private_ip_address = AAZStrType( - serialized_name="privateIPAddress", - ) - - manual_private_link_service_connections = _schema_private_endpoint_read.properties.manual_private_link_service_connections - manual_private_link_service_connections.Element = AAZObjectType() - cls._build_schema_private_link_service_connection_read(manual_private_link_service_connections.Element) - - network_interfaces = _schema_private_endpoint_read.properties.network_interfaces - network_interfaces.Element = AAZObjectType() - cls._build_schema_network_interface_read(network_interfaces.Element) - - private_link_service_connections = _schema_private_endpoint_read.properties.private_link_service_connections - private_link_service_connections.Element = AAZObjectType() - cls._build_schema_private_link_service_connection_read(private_link_service_connections.Element) - - tags = _schema_private_endpoint_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_private_endpoint_read.etag - _schema.extended_location = cls._schema_private_endpoint_read.extended_location - _schema.id = cls._schema_private_endpoint_read.id - _schema.location = cls._schema_private_endpoint_read.location - _schema.name = cls._schema_private_endpoint_read.name - _schema.properties = cls._schema_private_endpoint_read.properties - _schema.tags = cls._schema_private_endpoint_read.tags - _schema.type = cls._schema_private_endpoint_read.type - - _schema_private_link_service_connection_state_read = None - - @classmethod - def _build_schema_private_link_service_connection_state_read(cls, _schema): - if cls._schema_private_link_service_connection_state_read is not None: - _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required - _schema.description = cls._schema_private_link_service_connection_state_read.description - _schema.status = cls._schema_private_link_service_connection_state_read.status - return - - cls._schema_private_link_service_connection_state_read = _schema_private_link_service_connection_state_read = AAZObjectType() - - private_link_service_connection_state_read = _schema_private_link_service_connection_state_read - private_link_service_connection_state_read.actions_required = AAZStrType( - serialized_name="actionsRequired", - ) - private_link_service_connection_state_read.description = AAZStrType() - private_link_service_connection_state_read.status = AAZStrType() - - _schema.actions_required = cls._schema_private_link_service_connection_state_read.actions_required - _schema.description = cls._schema_private_link_service_connection_state_read.description - _schema.status = cls._schema_private_link_service_connection_state_read.status - - _schema_private_link_service_connection_read = None - - @classmethod - def _build_schema_private_link_service_connection_read(cls, _schema): - if cls._schema_private_link_service_connection_read is not None: - _schema.etag = cls._schema_private_link_service_connection_read.etag - _schema.id = cls._schema_private_link_service_connection_read.id - _schema.name = cls._schema_private_link_service_connection_read.name - _schema.properties = cls._schema_private_link_service_connection_read.properties - _schema.type = cls._schema_private_link_service_connection_read.type - return - - cls._schema_private_link_service_connection_read = _schema_private_link_service_connection_read = AAZObjectType() - - private_link_service_connection_read = _schema_private_link_service_connection_read - private_link_service_connection_read.etag = AAZStrType( - flags={"read_only": True}, - ) - private_link_service_connection_read.id = AAZStrType() - private_link_service_connection_read.name = AAZStrType() - private_link_service_connection_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - private_link_service_connection_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_private_link_service_connection_read.properties - properties.group_ids = AAZListType( - serialized_name="groupIds", - ) - properties.private_link_service_connection_state = AAZObjectType( - serialized_name="privateLinkServiceConnectionState", - ) - cls._build_schema_private_link_service_connection_state_read(properties.private_link_service_connection_state) - properties.private_link_service_id = AAZStrType( - serialized_name="privateLinkServiceId", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.request_message = AAZStrType( - serialized_name="requestMessage", - ) - - group_ids = _schema_private_link_service_connection_read.properties.group_ids - group_ids.Element = AAZStrType() - - _schema.etag = cls._schema_private_link_service_connection_read.etag - _schema.id = cls._schema_private_link_service_connection_read.id - _schema.name = cls._schema_private_link_service_connection_read.name - _schema.properties = cls._schema_private_link_service_connection_read.properties - _schema.type = cls._schema_private_link_service_connection_read.type - - _schema_public_ip_address_read = None - - @classmethod - def _build_schema_public_ip_address_read(cls, _schema): - if cls._schema_public_ip_address_read is not None: - _schema.etag = cls._schema_public_ip_address_read.etag - _schema.extended_location = cls._schema_public_ip_address_read.extended_location - _schema.id = cls._schema_public_ip_address_read.id - _schema.location = cls._schema_public_ip_address_read.location - _schema.name = cls._schema_public_ip_address_read.name - _schema.properties = cls._schema_public_ip_address_read.properties - _schema.sku = cls._schema_public_ip_address_read.sku - _schema.tags = cls._schema_public_ip_address_read.tags - _schema.type = cls._schema_public_ip_address_read.type - _schema.zones = cls._schema_public_ip_address_read.zones - return - - cls._schema_public_ip_address_read = _schema_public_ip_address_read = AAZObjectType() - - public_ip_address_read = _schema_public_ip_address_read - public_ip_address_read.etag = AAZStrType( - flags={"read_only": True}, - ) - public_ip_address_read.extended_location = AAZObjectType( - serialized_name="extendedLocation", - ) - cls._build_schema_extended_location_read(public_ip_address_read.extended_location) - public_ip_address_read.id = AAZStrType() - public_ip_address_read.location = AAZStrType() - public_ip_address_read.name = AAZStrType( - flags={"read_only": True}, - ) - public_ip_address_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - public_ip_address_read.sku = AAZObjectType() - public_ip_address_read.tags = AAZDictType() - public_ip_address_read.type = AAZStrType( - flags={"read_only": True}, - ) - public_ip_address_read.zones = AAZListType() - - properties = _schema_public_ip_address_read.properties - properties.ddos_settings = AAZObjectType( - serialized_name="ddosSettings", - ) - properties.delete_option = AAZStrType( - serialized_name="deleteOption", - ) - properties.dns_settings = AAZObjectType( - serialized_name="dnsSettings", - ) - properties.idle_timeout_in_minutes = AAZIntType( - serialized_name="idleTimeoutInMinutes", - ) - properties.ip_address = AAZStrType( - serialized_name="ipAddress", - ) - properties.ip_configuration = AAZObjectType( - serialized_name="ipConfiguration", - ) - cls._build_schema_ip_configuration_read(properties.ip_configuration) - properties.ip_tags = AAZListType( - serialized_name="ipTags", - ) - properties.linked_public_ip_address = AAZObjectType( - serialized_name="linkedPublicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.linked_public_ip_address) - properties.migration_phase = AAZStrType( - serialized_name="migrationPhase", - ) - properties.nat_gateway = AAZObjectType( - serialized_name="natGateway", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_address_version = AAZStrType( - serialized_name="publicIPAddressVersion", - ) - properties.public_ip_allocation_method = AAZStrType( - serialized_name="publicIPAllocationMethod", - ) - properties.public_ip_prefix = AAZObjectType( - serialized_name="publicIPPrefix", - ) - cls._build_schema_sub_resource_read(properties.public_ip_prefix) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.service_public_ip_address = AAZObjectType( - serialized_name="servicePublicIPAddress", - ) - cls._build_schema_public_ip_address_read(properties.service_public_ip_address) - - ddos_settings = _schema_public_ip_address_read.properties.ddos_settings - ddos_settings.ddos_custom_policy = AAZObjectType( - serialized_name="ddosCustomPolicy", - ) - cls._build_schema_sub_resource_read(ddos_settings.ddos_custom_policy) - ddos_settings.protected_ip = AAZBoolType( - serialized_name="protectedIP", - ) - ddos_settings.protection_coverage = AAZStrType( - serialized_name="protectionCoverage", - ) - - dns_settings = _schema_public_ip_address_read.properties.dns_settings - dns_settings.domain_name_label = AAZStrType( - serialized_name="domainNameLabel", - ) - dns_settings.fqdn = AAZStrType() - dns_settings.reverse_fqdn = AAZStrType( - serialized_name="reverseFqdn", - ) - - ip_tags = _schema_public_ip_address_read.properties.ip_tags - ip_tags.Element = AAZObjectType() - - _element = _schema_public_ip_address_read.properties.ip_tags.Element - _element.ip_tag_type = AAZStrType( - serialized_name="ipTagType", - ) - _element.tag = AAZStrType() - - nat_gateway = _schema_public_ip_address_read.properties.nat_gateway - nat_gateway.etag = AAZStrType( - flags={"read_only": True}, - ) - nat_gateway.id = AAZStrType() - nat_gateway.location = AAZStrType() - nat_gateway.name = AAZStrType( - flags={"read_only": True}, - ) - nat_gateway.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - nat_gateway.sku = AAZObjectType() - nat_gateway.tags = AAZDictType() - nat_gateway.type = AAZStrType( - flags={"read_only": True}, - ) - nat_gateway.zones = AAZListType() - - properties = _schema_public_ip_address_read.properties.nat_gateway.properties - properties.idle_timeout_in_minutes = AAZIntType( - serialized_name="idleTimeoutInMinutes", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.public_ip_addresses = AAZListType( - serialized_name="publicIpAddresses", - ) - properties.public_ip_prefixes = AAZListType( - serialized_name="publicIpPrefixes", - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - public_ip_addresses = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses - public_ip_addresses.Element = AAZObjectType() - cls._build_schema_sub_resource_read(public_ip_addresses.Element) - - public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes - public_ip_prefixes.Element = AAZObjectType() - cls._build_schema_sub_resource_read(public_ip_prefixes.Element) - - subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_sub_resource_read(subnets.Element) - - sku = _schema_public_ip_address_read.properties.nat_gateway.sku - sku.name = AAZStrType() - - tags = _schema_public_ip_address_read.properties.nat_gateway.tags - tags.Element = AAZStrType() - - zones = _schema_public_ip_address_read.properties.nat_gateway.zones - zones.Element = AAZStrType() - - sku = _schema_public_ip_address_read.sku - sku.name = AAZStrType() - sku.tier = AAZStrType() - - tags = _schema_public_ip_address_read.tags - tags.Element = AAZStrType() - - zones = _schema_public_ip_address_read.zones - zones.Element = AAZStrType() - - _schema.etag = cls._schema_public_ip_address_read.etag - _schema.extended_location = cls._schema_public_ip_address_read.extended_location - _schema.id = cls._schema_public_ip_address_read.id - _schema.location = cls._schema_public_ip_address_read.location - _schema.name = cls._schema_public_ip_address_read.name - _schema.properties = cls._schema_public_ip_address_read.properties - _schema.sku = cls._schema_public_ip_address_read.sku - _schema.tags = cls._schema_public_ip_address_read.tags - _schema.type = cls._schema_public_ip_address_read.type - _schema.zones = cls._schema_public_ip_address_read.zones - - _schema_security_rule_read = None - - @classmethod - def _build_schema_security_rule_read(cls, _schema): - if cls._schema_security_rule_read is not None: - _schema.etag = cls._schema_security_rule_read.etag - _schema.id = cls._schema_security_rule_read.id - _schema.name = cls._schema_security_rule_read.name - _schema.properties = cls._schema_security_rule_read.properties - _schema.type = cls._schema_security_rule_read.type - return - - cls._schema_security_rule_read = _schema_security_rule_read = AAZObjectType() - - security_rule_read = _schema_security_rule_read - security_rule_read.etag = AAZStrType( - flags={"read_only": True}, - ) - security_rule_read.id = AAZStrType() - security_rule_read.name = AAZStrType() - security_rule_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - security_rule_read.type = AAZStrType() - - properties = _schema_security_rule_read.properties - properties.access = AAZStrType( - flags={"required": True}, - ) - properties.description = AAZStrType() - properties.destination_address_prefix = AAZStrType( - serialized_name="destinationAddressPrefix", - ) - properties.destination_address_prefixes = AAZListType( - serialized_name="destinationAddressPrefixes", - ) - properties.destination_application_security_groups = AAZListType( - serialized_name="destinationApplicationSecurityGroups", - ) - properties.destination_port_range = AAZStrType( - serialized_name="destinationPortRange", - ) - properties.destination_port_ranges = AAZListType( - serialized_name="destinationPortRanges", - ) - properties.direction = AAZStrType( - flags={"required": True}, - ) - properties.priority = AAZIntType() - properties.protocol = AAZStrType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.source_address_prefix = AAZStrType( - serialized_name="sourceAddressPrefix", - ) - properties.source_address_prefixes = AAZListType( - serialized_name="sourceAddressPrefixes", - ) - properties.source_application_security_groups = AAZListType( - serialized_name="sourceApplicationSecurityGroups", - ) - properties.source_port_range = AAZStrType( - serialized_name="sourcePortRange", - ) - properties.source_port_ranges = AAZListType( - serialized_name="sourcePortRanges", - ) - - destination_address_prefixes = _schema_security_rule_read.properties.destination_address_prefixes - destination_address_prefixes.Element = AAZStrType() - - destination_application_security_groups = _schema_security_rule_read.properties.destination_application_security_groups - destination_application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(destination_application_security_groups.Element) - - destination_port_ranges = _schema_security_rule_read.properties.destination_port_ranges - destination_port_ranges.Element = AAZStrType() - - source_address_prefixes = _schema_security_rule_read.properties.source_address_prefixes - source_address_prefixes.Element = AAZStrType() - - source_application_security_groups = _schema_security_rule_read.properties.source_application_security_groups - source_application_security_groups.Element = AAZObjectType() - cls._build_schema_application_security_group_read(source_application_security_groups.Element) - - source_port_ranges = _schema_security_rule_read.properties.source_port_ranges - source_port_ranges.Element = AAZStrType() - - _schema.etag = cls._schema_security_rule_read.etag - _schema.id = cls._schema_security_rule_read.id - _schema.name = cls._schema_security_rule_read.name - _schema.properties = cls._schema_security_rule_read.properties - _schema.type = cls._schema_security_rule_read.type - - _schema_sub_resource_read = None - - @classmethod - def _build_schema_sub_resource_read(cls, _schema): - if cls._schema_sub_resource_read is not None: - _schema.id = cls._schema_sub_resource_read.id - return - - cls._schema_sub_resource_read = _schema_sub_resource_read = AAZObjectType() - - sub_resource_read = _schema_sub_resource_read - sub_resource_read.id = AAZStrType() - - _schema.id = cls._schema_sub_resource_read.id - - _schema_subnet_read = None - - @classmethod - def _build_schema_subnet_read(cls, _schema): - if cls._schema_subnet_read is not None: - _schema.etag = cls._schema_subnet_read.etag - _schema.id = cls._schema_subnet_read.id - _schema.name = cls._schema_subnet_read.name - _schema.properties = cls._schema_subnet_read.properties - _schema.type = cls._schema_subnet_read.type - return - - cls._schema_subnet_read = _schema_subnet_read = AAZObjectType() - - subnet_read = _schema_subnet_read - subnet_read.etag = AAZStrType( - flags={"read_only": True}, - ) - subnet_read.id = AAZStrType() - subnet_read.name = AAZStrType() - subnet_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - subnet_read.type = AAZStrType() - - properties = _schema_subnet_read.properties - properties.address_prefix = AAZStrType( - serialized_name="addressPrefix", - ) - properties.address_prefixes = AAZListType( - serialized_name="addressPrefixes", - ) - properties.application_gateway_ip_configurations = AAZListType( - serialized_name="applicationGatewayIpConfigurations", - ) - properties.delegations = AAZListType() - properties.ip_allocations = AAZListType( - serialized_name="ipAllocations", - ) - properties.ip_configuration_profiles = AAZListType( - serialized_name="ipConfigurationProfiles", - flags={"read_only": True}, - ) - properties.ip_configurations = AAZListType( - serialized_name="ipConfigurations", - flags={"read_only": True}, - ) - properties.nat_gateway = AAZObjectType( - serialized_name="natGateway", - ) - cls._build_schema_sub_resource_read(properties.nat_gateway) - properties.network_security_group = AAZObjectType( - serialized_name="networkSecurityGroup", - ) - cls._build_schema_network_security_group_read(properties.network_security_group) - properties.private_endpoint_network_policies = AAZStrType( - serialized_name="privateEndpointNetworkPolicies", - ) - properties.private_endpoints = AAZListType( - serialized_name="privateEndpoints", - flags={"read_only": True}, - ) - properties.private_link_service_network_policies = AAZStrType( - serialized_name="privateLinkServiceNetworkPolicies", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.purpose = AAZStrType( - flags={"read_only": True}, - ) - properties.resource_navigation_links = AAZListType( - serialized_name="resourceNavigationLinks", - flags={"read_only": True}, - ) - properties.route_table = AAZObjectType( - serialized_name="routeTable", - ) - properties.service_association_links = AAZListType( - serialized_name="serviceAssociationLinks", - flags={"read_only": True}, - ) - properties.service_endpoint_policies = AAZListType( - serialized_name="serviceEndpointPolicies", - ) - properties.service_endpoints = AAZListType( - serialized_name="serviceEndpoints", - ) - - address_prefixes = _schema_subnet_read.properties.address_prefixes - address_prefixes.Element = AAZStrType() - - application_gateway_ip_configurations = _schema_subnet_read.properties.application_gateway_ip_configurations - application_gateway_ip_configurations.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.application_gateway_ip_configurations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.application_gateway_ip_configurations.Element.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_sub_resource_read(properties.subnet) - - delegations = _schema_subnet_read.properties.delegations - delegations.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.delegations.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = _schema_subnet_read.properties.delegations.Element.properties - properties.actions = AAZListType( - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.service_name = AAZStrType( - serialized_name="serviceName", - ) - - actions = _schema_subnet_read.properties.delegations.Element.properties.actions - actions.Element = AAZStrType() - - ip_allocations = _schema_subnet_read.properties.ip_allocations - ip_allocations.Element = AAZObjectType() - cls._build_schema_sub_resource_read(ip_allocations.Element) - - ip_configuration_profiles = _schema_subnet_read.properties.ip_configuration_profiles - ip_configuration_profiles.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.ip_configuration_profiles.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.ip_configuration_profiles.Element.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.subnet = AAZObjectType() - cls._build_schema_subnet_read(properties.subnet) - - ip_configurations = _schema_subnet_read.properties.ip_configurations - ip_configurations.Element = AAZObjectType() - cls._build_schema_ip_configuration_read(ip_configurations.Element) - - private_endpoints = _schema_subnet_read.properties.private_endpoints - private_endpoints.Element = AAZObjectType() - cls._build_schema_private_endpoint_read(private_endpoints.Element) - - resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links - resource_navigation_links.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.resource_navigation_links.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.resource_navigation_links.Element.properties - properties.link = AAZStrType() - properties.linked_resource_type = AAZStrType( - serialized_name="linkedResourceType", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - route_table = _schema_subnet_read.properties.route_table - route_table.etag = AAZStrType( - flags={"read_only": True}, - ) - route_table.id = AAZStrType() - route_table.location = AAZStrType() - route_table.name = AAZStrType( - flags={"read_only": True}, - ) - route_table.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - route_table.tags = AAZDictType() - route_table.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.route_table.properties - properties.disable_bgp_route_propagation = AAZBoolType( - serialized_name="disableBgpRoutePropagation", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.routes = AAZListType() - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - routes = _schema_subnet_read.properties.route_table.properties.routes - routes.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.route_table.properties.routes.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = _schema_subnet_read.properties.route_table.properties.routes.Element.properties - properties.address_prefix = AAZStrType( - serialized_name="addressPrefix", - ) - properties.has_bgp_override = AAZBoolType( - serialized_name="hasBgpOverride", - ) - properties.next_hop_ip_address = AAZStrType( - serialized_name="nextHopIpAddress", - ) - properties.next_hop_type = AAZStrType( - serialized_name="nextHopType", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - subnets = _schema_subnet_read.properties.route_table.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_subnet_read(subnets.Element) - - tags = _schema_subnet_read.properties.route_table.tags - tags.Element = AAZStrType() - - service_association_links = _schema_subnet_read.properties.service_association_links - service_association_links.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_association_links.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.service_association_links.Element.properties - properties.allow_delete = AAZBoolType( - serialized_name="allowDelete", - ) - properties.link = AAZStrType() - properties.linked_resource_type = AAZStrType( - serialized_name="linkedResourceType", - ) - properties.locations = AAZListType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - locations = _schema_subnet_read.properties.service_association_links.Element.properties.locations - locations.Element = AAZStrType() - - service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies - service_endpoint_policies.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_endpoint_policies.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.kind = AAZStrType( - flags={"read_only": True}, - ) - _element.location = AAZStrType() - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties - properties.contextual_service_endpoint_policies = AAZListType( - serialized_name="contextualServiceEndpointPolicies", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - properties.service_alias = AAZStrType( - serialized_name="serviceAlias", - ) - properties.service_endpoint_policy_definitions = AAZListType( - serialized_name="serviceEndpointPolicyDefinitions", - ) - properties.subnets = AAZListType( - flags={"read_only": True}, - ) - - contextual_service_endpoint_policies = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.contextual_service_endpoint_policies - contextual_service_endpoint_policies.Element = AAZStrType() - - service_endpoint_policy_definitions = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions - service_endpoint_policy_definitions.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element - _element.etag = AAZStrType( - flags={"read_only": True}, - ) - _element.id = AAZStrType() - _element.name = AAZStrType() - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _element.type = AAZStrType() - - properties = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties - properties.description = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.service = AAZStrType() - properties.service_resources = AAZListType( - serialized_name="serviceResources", - ) - - service_resources = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.service_endpoint_policy_definitions.Element.properties.service_resources - service_resources.Element = AAZStrType() - - subnets = _schema_subnet_read.properties.service_endpoint_policies.Element.properties.subnets - subnets.Element = AAZObjectType() - cls._build_schema_subnet_read(subnets.Element) - - tags = _schema_subnet_read.properties.service_endpoint_policies.Element.tags - tags.Element = AAZStrType() - - service_endpoints = _schema_subnet_read.properties.service_endpoints - service_endpoints.Element = AAZObjectType() - - _element = _schema_subnet_read.properties.service_endpoints.Element - _element.locations = AAZListType() - _element.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - _element.service = AAZStrType() - - locations = _schema_subnet_read.properties.service_endpoints.Element.locations - locations.Element = AAZStrType() - - _schema.etag = cls._schema_subnet_read.etag - _schema.id = cls._schema_subnet_read.id - _schema.name = cls._schema_subnet_read.name - _schema.properties = cls._schema_subnet_read.properties - _schema.type = cls._schema_subnet_read.type - - _schema_virtual_network_tap_read = None - - @classmethod - def _build_schema_virtual_network_tap_read(cls, _schema): - if cls._schema_virtual_network_tap_read is not None: - _schema.etag = cls._schema_virtual_network_tap_read.etag - _schema.id = cls._schema_virtual_network_tap_read.id - _schema.location = cls._schema_virtual_network_tap_read.location - _schema.name = cls._schema_virtual_network_tap_read.name - _schema.properties = cls._schema_virtual_network_tap_read.properties - _schema.tags = cls._schema_virtual_network_tap_read.tags - _schema.type = cls._schema_virtual_network_tap_read.type - return - - cls._schema_virtual_network_tap_read = _schema_virtual_network_tap_read = AAZObjectType() - - virtual_network_tap_read = _schema_virtual_network_tap_read - virtual_network_tap_read.etag = AAZStrType( - flags={"read_only": True}, - ) - virtual_network_tap_read.id = AAZStrType() - virtual_network_tap_read.location = AAZStrType() - virtual_network_tap_read.name = AAZStrType( - flags={"read_only": True}, - ) - virtual_network_tap_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - virtual_network_tap_read.tags = AAZDictType() - virtual_network_tap_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_virtual_network_tap_read.properties - properties.destination_load_balancer_front_end_ip_configuration = AAZObjectType( - serialized_name="destinationLoadBalancerFrontEndIPConfiguration", - ) - cls._build_schema_frontend_ip_configuration_read(properties.destination_load_balancer_front_end_ip_configuration) - properties.destination_network_interface_ip_configuration = AAZObjectType( - serialized_name="destinationNetworkInterfaceIPConfiguration", - ) - cls._build_schema_network_interface_ip_configuration_read(properties.destination_network_interface_ip_configuration) - properties.destination_port = AAZIntType( - serialized_name="destinationPort", - ) - properties.network_interface_tap_configurations = AAZListType( - serialized_name="networkInterfaceTapConfigurations", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.resource_guid = AAZStrType( - serialized_name="resourceGuid", - flags={"read_only": True}, - ) - - network_interface_tap_configurations = _schema_virtual_network_tap_read.properties.network_interface_tap_configurations - network_interface_tap_configurations.Element = AAZObjectType() - cls._build_schema_network_interface_tap_configuration_read(network_interface_tap_configurations.Element) - - tags = _schema_virtual_network_tap_read.tags - tags.Element = AAZStrType() - - _schema.etag = cls._schema_virtual_network_tap_read.etag - _schema.id = cls._schema_virtual_network_tap_read.id - _schema.location = cls._schema_virtual_network_tap_read.location - _schema.name = cls._schema_virtual_network_tap_read.name - _schema.properties = cls._schema_virtual_network_tap_read.properties - _schema.tags = cls._schema_virtual_network_tap_read.tags - _schema.type = cls._schema_virtual_network_tap_read.type - - -__all__ = ["Show"] From a10e565030cf8a6187cc547c6612fa9f6f42dc81 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Mon, 13 Mar 2023 16:30:25 +0800 Subject: [PATCH 6/7] fix property name --- src/ssh/azext_ssh/ip_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ssh/azext_ssh/ip_utils.py b/src/ssh/azext_ssh/ip_utils.py index 15cf5fae8ae..80c4ece0a1f 100644 --- a/src/ssh/azext_ssh/ip_utils.py +++ b/src/ssh/azext_ssh/ip_utils.py @@ -34,9 +34,9 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): } nic = InterfaceShow(cli_ctx=cmd.cli_ctx)(command_args=get_args) for ip_config in nic["ipConfigurations"]: - if use_private_ip and ip_config.get("privateIpAddress", None): - return ip_config["privateIpAddress"] - public_ip_ref = ip_config["privateIpAddress"] + if use_private_ip and ip_config.get("privateIPAddress", None): + return ip_config["privateIPAddress"] + public_ip_ref = ip_config["privateIPAddress"] if public_ip_ref and public_ip_ref.get("id", None): parsed_ip_id = tools.parse_resource_id(public_ip_ref["id"]) # public_ip = ip_client.get(parsed_ip_id['resource_group'], parsed_ip_id['name']) @@ -47,8 +47,8 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): public_ip = PublicIpShow(cli_ctx=cmd.cli_ctx)(command_args=api_args) if public_ip and public_ip.get("ipAddress", None): return public_ip["ipAddress"] - if ip_config.get("privateIpAddress", None): - private_ips.append(ip_config["privateIpAddress"]) + if ip_config.get("privateIPAddress", None): + private_ips.append(ip_config["privateIPAddress"]) if len(private_ips) > 0: logger.warning("No public IP detected, attempting private IP (you must bring your own connectivity).") From 841115ad5a85392b37c4a3e47694c5de1d214493 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Tue, 14 Mar 2023 13:50:15 +0800 Subject: [PATCH 7/7] remove old codes --- src/ssh/azext_ssh/ip_utils.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/ssh/azext_ssh/ip_utils.py b/src/ssh/azext_ssh/ip_utils.py index 80c4ece0a1f..eb08bf5cf19 100644 --- a/src/ssh/azext_ssh/ip_utils.py +++ b/src/ssh/azext_ssh/ip_utils.py @@ -14,10 +14,7 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): compute_client = client_factory.get_mgmt_service_client(cmd.cli_ctx, profiles.ResourceType.MGMT_COMPUTE) - # network_client = client_factory.get_mgmt_service_client(cmd.cli_ctx, profiles.ResourceType.MGMT_NETWORK) vm_client = compute_client.virtual_machines - # nic_client = network_client.network_interfaces - # ip_client = network_client.public_ip_addresses from .aaz.latest.network.public_ip import Show as PublicIpShow from .aaz.latest.network.nic import Show as InterfaceShow @@ -27,7 +24,6 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): for nic_ref in vm.network_profile.network_interfaces: parsed_id = tools.parse_resource_id(nic_ref.id) - # nic = nic_client.get(parsed_id['resource_group'], parsed_id['name']) get_args = { 'name': parsed_id['name'], 'resource_group': parsed_id['resource_group'] @@ -39,7 +35,6 @@ def get_ssh_ip(cmd, resource_group, vm_name, use_private_ip): public_ip_ref = ip_config["privateIPAddress"] if public_ip_ref and public_ip_ref.get("id", None): parsed_ip_id = tools.parse_resource_id(public_ip_ref["id"]) - # public_ip = ip_client.get(parsed_ip_id['resource_group'], parsed_ip_id['name']) api_args = { 'name': parsed_ip_id['name'], 'resource_group': parsed_ip_id['resource_group']