# --------------------------------------------------------------------------------------------
# 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 *


@register_command(
    "network vnet create",
)
class Create(AAZCommand):
    """Create a virtual network in the specified resource group.

    You may also create a subnet at the same time by specifying a subnet name and (optionally) an address prefix. To learn about how to create a virtual network visit https://docs.microsoft.com/azure/virtual-network/manage-virtual-network#create-a-virtual-network.

    :example: Create a virtual network.
        az network vnet create -g MyResourceGroup -n MyVnet

    :example: Create a virtual network with a specific address prefix and one subnet.
        az network vnet create -g MyResourceGroup -n MyVnet --address-prefix 10.0.0.0/16 --subnet-name MySubnet --subnet-prefix 10.0.0.0/24

    :example: Create a virtual network. (autogenerated)
        az network vnet create --address-prefixes 10.0.0.0/16 --name MyVirtualNetwork --resource-group MyResourceGroup --subnet-name MyAseSubnet --subnet-prefixes 10.0.0.0/24
    """

    _aaz_info = {
        "version": "2022-01-01",
        "resources": [
            ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}", "2022-01-01"],
        ]
    }

    AZ_SUPPORT_NO_WAIT = True

    def _handler(self, command_args):
        super()._handler(command_args)
        return self.build_lro_poller(self._execute_operations, 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",
        )

        # define Arg Group "Parameters"

        _args_schema = cls._args_schema
        _args_schema.extended_location = AAZObjectArg(
            options=["--extended-location"],
            arg_group="Parameters",
            help="The extended location of the virtual network.",
        )
        _args_schema.location = AAZResourceLocationArg(
            arg_group="Parameters",
            help="Resource location.",
            fmt=AAZResourceLocationArgFormat(
                resource_group_arg="resource_group",
            ),
        )
        _args_schema.tags = AAZDictArg(
            options=["--tags"],
            arg_group="Parameters",
            help="Resource tags.",
        )

        extended_location = cls._args_schema.extended_location
        extended_location.name = AAZStrArg(
            options=["name"],
            help="The name of the extended location.",
        )
        extended_location.type = AAZStrArg(
            options=["type"],
            help="The type of the extended location.",
            enum={"EdgeZone": "EdgeZone"},
        )

        tags = cls._args_schema.tags
        tags.Element = AAZStrArg()

        # define Arg Group "Properties"

        _args_schema = cls._args_schema
        _args_schema.address_space = AAZObjectArg(
            options=["--address-space"],
            arg_group="Properties",
            help="The AddressSpace that contains an array of IP address ranges that can be used by subnets.",
        )
        cls._build_args_address_space_create(_args_schema.address_space)
        _args_schema.bgp_communities = AAZObjectArg(
            options=["--bgp-communities"],
            arg_group="Properties",
            help="Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.",
        )
        _args_schema.ddos_protection_plan = AAZObjectArg(
            options=["--ddos-protection-plan"],
            arg_group="Properties",
            help="The DDoS protection plan associated with the virtual network.",
        )
        _args_schema.dhcp_options = AAZObjectArg(
            options=["--dhcp-options"],
            arg_group="Properties",
            help="The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.",
        )
        _args_schema.enable_ddos_protection = AAZBoolArg(
            options=["--enable-ddos-protection"],
            arg_group="Properties",
            help="Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.",
            default=False,
        )
        _args_schema.enable_vm_protection = AAZBoolArg(
            options=["--enable-vm-protection"],
            arg_group="Properties",
            help="Indicates if VM protection is enabled for all the subnets in the virtual network.",
            default=False,
        )
        _args_schema.encryption = AAZObjectArg(
            options=["--encryption"],
            arg_group="Properties",
            help="Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet.",
        )
        _args_schema.flow_timeout_in_minutes = AAZIntArg(
            options=["--flow-timeout-in-minutes"],
            arg_group="Properties",
            help="The FlowTimeout value (in minutes) for the Virtual Network",
        )
        _args_schema.ip_allocations = AAZListArg(
            options=["--ip-allocations"],
            arg_group="Properties",
            help="Array of IpAllocation which reference this VNET.",
        )
        _args_schema.subnets = AAZListArg(
            options=["--subnets"],
            arg_group="Properties",
            help="A list of subnets in a Virtual Network.",
        )
        _args_schema.virtual_network_peerings = AAZListArg(
            options=["--virtual-network-peerings"],
            arg_group="Properties",
            help="A list of peerings in a Virtual Network.",
        )

        bgp_communities = cls._args_schema.bgp_communities
        bgp_communities.virtual_network_community = AAZStrArg(
            options=["virtual-network-community"],
            help="The BGP community associated with the virtual network.",
            required=True,
        )

        ddos_protection_plan = cls._args_schema.ddos_protection_plan
        ddos_protection_plan.id = AAZStrArg(
            options=["id"],
            help="Resource ID.",
        )

        dhcp_options = cls._args_schema.dhcp_options
        dhcp_options.dns_servers = AAZListArg(
            options=["dns-servers"],
            help="The list of DNS servers IP addresses.",
        )

        dns_servers = cls._args_schema.dhcp_options.dns_servers
        dns_servers.Element = AAZStrArg()

        encryption = cls._args_schema.encryption
        encryption.enabled = AAZBoolArg(
            options=["enabled"],
            help="Indicates if encryption is enabled on the virtual network.",
            required=True,
        )
        encryption.enforcement = AAZStrArg(
            options=["enforcement"],
            help="If the encrypted VNet allows VM that does not support encryption",
            enum={"AllowUnencrypted": "AllowUnencrypted", "DropUnencrypted": "DropUnencrypted"},
        )

        ip_allocations = cls._args_schema.ip_allocations
        ip_allocations.Element = AAZObjectArg()
        cls._build_args_sub_resource_create(ip_allocations.Element)

        subnets = cls._args_schema.subnets
        subnets.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element
        _element.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
            fmt=AAZResourceIdArgFormat(
                template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/virtualNetworks/{}/subnets/{}",
            ),
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="The name of the resource that is unique within a resource group. This name can be used to access the resource.",
        )
        _element.address_prefix = AAZStrArg(
            options=["address-prefix"],
            help="The address prefix for the subnet.",
        )
        _element.address_prefixes = AAZListArg(
            options=["address-prefixes"],
            help="List of address prefixes for the subnet.",
        )
        _element.application_gateway_ip_configurations = AAZListArg(
            options=["application-gateway-ip-configurations"],
            help="Application gateway IP configurations of virtual network resource.",
        )
        _element.delegations = AAZListArg(
            options=["delegations"],
            help="An array of references to the delegations on the subnet.",
        )
        _element.ip_allocations = AAZListArg(
            options=["ip-allocations"],
            help="Array of IpAllocation which reference this subnet.",
        )
        _element.nat_gateway = AAZObjectArg(
            options=["nat-gateway"],
            help="Nat gateway associated with this subnet.",
        )
        cls._build_args_sub_resource_create(_element.nat_gateway)
        _element.network_security_group = AAZObjectArg(
            options=["network-security-group"],
            help="The reference to the NetworkSecurityGroup resource.",
        )
        _element.private_endpoint_network_policies = AAZStrArg(
            options=["private-endpoint-network-policies"],
            help="Enable or Disable apply network policies on private end point in the subnet.",
            default="Disabled",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )
        _element.private_link_service_network_policies = AAZStrArg(
            options=["private-link-service-network-policies"],
            help="Enable or Disable apply network policies on private link service in the subnet.",
            default="Enabled",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )
        _element.route_table = AAZObjectArg(
            options=["route-table"],
            help="The reference to the RouteTable resource.",
        )
        _element.service_endpoint_policies = AAZListArg(
            options=["service-endpoint-policies"],
            help="An array of service endpoint policies.",
        )
        _element.service_endpoints = AAZListArg(
            options=["service-endpoints"],
            help="An array of service endpoints.",
        )
        _element.type = AAZStrArg(
            options=["type"],
            help="Resource type.",
        )

        address_prefixes = cls._args_schema.subnets.Element.address_prefixes
        address_prefixes.Element = AAZStrArg()

        application_gateway_ip_configurations = cls._args_schema.subnets.Element.application_gateway_ip_configurations
        application_gateway_ip_configurations.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element.application_gateway_ip_configurations.Element
        _element.id = AAZStrArg(
            options=["id"],
            help="Resource ID.",
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="Name of the IP configuration that is unique within an Application Gateway.",
        )
        _element.subnet = AAZObjectArg(
            options=["subnet"],
            help="Reference to the subnet resource. A subnet from where application gateway gets its private address.",
        )
        cls._build_args_sub_resource_create(_element.subnet)

        delegations = cls._args_schema.subnets.Element.delegations
        delegations.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element.delegations.Element
        _element.id = AAZStrArg(
            options=["id"],
            help="Resource ID.",
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="The name of the resource that is unique within a subnet. This name can be used to access the resource.",
        )
        _element.service_name = AAZStrArg(
            options=["service-name"],
            help="The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).",
        )
        _element.type = AAZStrArg(
            options=["type"],
            help="Resource type.",
        )

        ip_allocations = cls._args_schema.subnets.Element.ip_allocations
        ip_allocations.Element = AAZObjectArg()
        cls._build_args_sub_resource_create(ip_allocations.Element)

        network_security_group = cls._args_schema.subnets.Element.network_security_group
        network_security_group.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
            fmt=AAZResourceIdArgFormat(
                template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/networkSecurityGroups/{}",
            ),
        )
        network_security_group.location = AAZResourceLocationArg(
            options=["l", "location"],
            help="Resource location.",
            fmt=AAZResourceLocationArgFormat(
                resource_group_arg="resource_group",
            ),
        )
        network_security_group.flush_connection = AAZBoolArg(
            options=["flush-connection"],
            help="When enabled, flows created from Network Security Group connections will be re-evaluated when rules are updates. Initial enablement will trigger re-evaluation.",
        )
        network_security_group.security_rules = AAZListArg(
            options=["security-rules"],
            help="A collection of security rules of the network security group.",
        )
        network_security_group.tags = AAZDictArg(
            options=["tags"],
            help="Resource tags.",
        )

        security_rules = cls._args_schema.subnets.Element.network_security_group.security_rules
        security_rules.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element.network_security_group.security_rules.Element
        _element.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="The name of the resource that is unique within a resource group. This name can be used to access the resource.",
        )
        _element.access = AAZStrArg(
            options=["access"],
            help="The network traffic is allowed or denied.",
            enum={"Allow": "Allow", "Deny": "Deny"},
        )
        _element.description = AAZStrArg(
            options=["description"],
            help="A description for this rule. Restricted to 140 chars.",
        )
        _element.destination_address_prefix = AAZStrArg(
            options=["destination-address-prefix"],
            help="The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.",
        )
        _element.destination_address_prefixes = AAZListArg(
            options=["destination-address-prefixes"],
            help="The destination address prefixes. CIDR or destination IP ranges.",
        )
        _element.destination_application_security_groups = AAZListArg(
            options=["destination-application-security-groups"],
            help="The application security group specified as destination.",
        )
        _element.destination_port_range = AAZStrArg(
            options=["destination-port-range"],
            help="The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.",
        )
        _element.destination_port_ranges = AAZListArg(
            options=["destination-port-ranges"],
            help="The destination port ranges.",
        )
        _element.direction = AAZStrArg(
            options=["direction"],
            help="The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.",
            enum={"Inbound": "Inbound", "Outbound": "Outbound"},
        )
        _element.priority = AAZIntArg(
            options=["priority"],
            help="The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.",
        )
        _element.protocol = AAZStrArg(
            options=["protocol"],
            help="Network protocol this rule applies to.",
            enum={"*": "*", "Ah": "Ah", "Esp": "Esp", "Icmp": "Icmp", "Tcp": "Tcp", "Udp": "Udp"},
        )
        _element.source_address_prefix = AAZStrArg(
            options=["source-address-prefix"],
            help="The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.",
        )
        _element.source_address_prefixes = AAZListArg(
            options=["source-address-prefixes"],
            help="The CIDR or source IP ranges.",
        )
        _element.source_application_security_groups = AAZListArg(
            options=["source-application-security-groups"],
            help="The application security group specified as source.",
        )
        _element.source_port_range = AAZStrArg(
            options=["source-port-range"],
            help="The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.",
        )
        _element.source_port_ranges = AAZListArg(
            options=["source-port-ranges"],
            help="The source port ranges.",
        )
        _element.type = AAZStrArg(
            options=["type"],
            help="The type of the resource.",
        )

        destination_address_prefixes = cls._args_schema.subnets.Element.network_security_group.security_rules.Element.destination_address_prefixes
        destination_address_prefixes.Element = AAZStrArg()

        destination_application_security_groups = cls._args_schema.subnets.Element.network_security_group.security_rules.Element.destination_application_security_groups
        destination_application_security_groups.Element = AAZObjectArg()
        cls._build_args_application_security_group_create(destination_application_security_groups.Element)

        destination_port_ranges = cls._args_schema.subnets.Element.network_security_group.security_rules.Element.destination_port_ranges
        destination_port_ranges.Element = AAZStrArg()

        source_address_prefixes = cls._args_schema.subnets.Element.network_security_group.security_rules.Element.source_address_prefixes
        source_address_prefixes.Element = AAZStrArg()

        source_application_security_groups = cls._args_schema.subnets.Element.network_security_group.security_rules.Element.source_application_security_groups
        source_application_security_groups.Element = AAZObjectArg()
        cls._build_args_application_security_group_create(source_application_security_groups.Element)

        source_port_ranges = cls._args_schema.subnets.Element.network_security_group.security_rules.Element.source_port_ranges
        source_port_ranges.Element = AAZStrArg()

        tags = cls._args_schema.subnets.Element.network_security_group.tags
        tags.Element = AAZStrArg()

        route_table = cls._args_schema.subnets.Element.route_table
        route_table.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
            fmt=AAZResourceIdArgFormat(
                template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/routeTables/{}",
            ),
        )
        route_table.location = AAZResourceLocationArg(
            options=["l", "location"],
            help="Resource location.",
            fmt=AAZResourceLocationArgFormat(
                resource_group_arg="resource_group",
            ),
        )
        route_table.disable_bgp_route_propagation = AAZBoolArg(
            options=["disable-bgp-route-propagation"],
            help="Whether to disable the routes learned by BGP on that route table. True means disable.",
        )
        route_table.routes = AAZListArg(
            options=["routes"],
            help="Collection of routes contained within a route table.",
        )
        route_table.tags = AAZDictArg(
            options=["tags"],
            help="Resource tags.",
        )

        routes = cls._args_schema.subnets.Element.route_table.routes
        routes.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element.route_table.routes.Element
        _element.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
            fmt=AAZResourceIdArgFormat(
                template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/routeTables/{}/routes/{}",
            ),
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="The name of the resource that is unique within a resource group. This name can be used to access the resource.",
        )
        _element.address_prefix = AAZStrArg(
            options=["address-prefix"],
            help="The destination CIDR to which the route applies.",
        )
        _element.has_bgp_override = AAZBoolArg(
            options=["has-bgp-override"],
            help="A value indicating whether this route overrides overlapping BGP routes regardless of LPM.",
        )
        _element.next_hop_ip_address = AAZStrArg(
            options=["next-hop-ip-address"],
            help="The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.",
        )
        _element.next_hop_type = AAZStrArg(
            options=["next-hop-type"],
            help="The type of Azure hop the packet should be sent to.",
            enum={"Internet": "Internet", "None": "None", "VirtualAppliance": "VirtualAppliance", "VirtualNetworkGateway": "VirtualNetworkGateway", "VnetLocal": "VnetLocal"},
        )
        _element.type = AAZStrArg(
            options=["type"],
            help="The type of the resource.",
        )

        tags = cls._args_schema.subnets.Element.route_table.tags
        tags.Element = AAZStrArg()

        service_endpoint_policies = cls._args_schema.subnets.Element.service_endpoint_policies
        service_endpoint_policies.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element.service_endpoint_policies.Element
        _element.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
            fmt=AAZResourceIdArgFormat(
                template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/serviceEndpointPolicies/{}",
            ),
        )
        _element.location = AAZResourceLocationArg(
            options=["l", "location"],
            help="Resource location.",
            fmt=AAZResourceLocationArgFormat(
                resource_group_arg="resource_group",
            ),
        )
        _element.contextual_service_endpoint_policies = AAZListArg(
            options=["contextual-service-endpoint-policies"],
            help="A collection of contextual service endpoint policy.",
        )
        _element.service_alias = AAZStrArg(
            options=["service-alias"],
            help="The alias indicating if the policy belongs to a service",
        )
        _element.service_endpoint_policy_definitions = AAZListArg(
            options=["service-endpoint-policy-definitions"],
            help="A collection of service endpoint policy definitions of the service endpoint policy.",
        )
        _element.tags = AAZDictArg(
            options=["tags"],
            help="Resource tags.",
        )

        contextual_service_endpoint_policies = cls._args_schema.subnets.Element.service_endpoint_policies.Element.contextual_service_endpoint_policies
        contextual_service_endpoint_policies.Element = AAZStrArg()

        service_endpoint_policy_definitions = cls._args_schema.subnets.Element.service_endpoint_policies.Element.service_endpoint_policy_definitions
        service_endpoint_policy_definitions.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element.service_endpoint_policies.Element.service_endpoint_policy_definitions.Element
        _element.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
            fmt=AAZResourceIdArgFormat(
                template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/serviceEndpointPolicies/{}/serviceEndpointPolicyDefinitions/{}",
            ),
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="The name of the resource that is unique within a resource group. This name can be used to access the resource.",
        )
        _element.description = AAZStrArg(
            options=["description"],
            help="A description for this rule. Restricted to 140 chars.",
        )
        _element.service = AAZStrArg(
            options=["service"],
            help="Service endpoint name.",
        )
        _element.service_resources = AAZListArg(
            options=["service-resources"],
            help="A list of service resources.",
        )
        _element.type = AAZStrArg(
            options=["type"],
            help="The type of the resource.",
        )

        service_resources = cls._args_schema.subnets.Element.service_endpoint_policies.Element.service_endpoint_policy_definitions.Element.service_resources
        service_resources.Element = AAZStrArg()

        tags = cls._args_schema.subnets.Element.service_endpoint_policies.Element.tags
        tags.Element = AAZStrArg()

        service_endpoints = cls._args_schema.subnets.Element.service_endpoints
        service_endpoints.Element = AAZObjectArg()

        _element = cls._args_schema.subnets.Element.service_endpoints.Element
        _element.locations = AAZListArg(
            options=["locations"],
            help="A list of locations.",
        )
        _element.service = AAZStrArg(
            options=["service"],
            help="The type of the endpoint service.",
        )

        locations = cls._args_schema.subnets.Element.service_endpoints.Element.locations
        locations.Element = AAZStrArg()

        virtual_network_peerings = cls._args_schema.virtual_network_peerings
        virtual_network_peerings.Element = AAZObjectArg()

        _element = cls._args_schema.virtual_network_peerings.Element
        _element.id = AAZResourceIdArg(
            options=["id"],
            help="Resource ID.",
            fmt=AAZResourceIdArgFormat(
                template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/virtualNetworks/{}/virtualNetworkPeerings/{}",
            ),
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="The name of the resource that is unique within a resource group. This name can be used to access the resource.",
        )
        _element.allow_forwarded_traffic = AAZBoolArg(
            options=["allow-forwarded-traffic"],
            help="Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.",
        )
        _element.allow_gateway_transit = AAZBoolArg(
            options=["allow-gateway-transit"],
            help="If gateway links can be used in remote virtual networking to link to this virtual network.",
        )
        _element.allow_virtual_network_access = AAZBoolArg(
            options=["allow-virtual-network-access"],
            help="Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.",
        )
        _element.do_not_verify_remote_gateways = AAZBoolArg(
            options=["do-not-verify-remote-gateways"],
            help="If we need to verify the provisioning state of the remote gateway.",
        )
        _element.peering_state = AAZStrArg(
            options=["peering-state"],
            help="The status of the virtual network peering.",
            enum={"Connected": "Connected", "Disconnected": "Disconnected", "Initiated": "Initiated"},
        )
        _element.peering_sync_level = AAZStrArg(
            options=["peering-sync-level"],
            help="The peering sync status of the virtual network peering.",
            enum={"FullyInSync": "FullyInSync", "LocalAndRemoteNotInSync": "LocalAndRemoteNotInSync", "LocalNotInSync": "LocalNotInSync", "RemoteNotInSync": "RemoteNotInSync"},
        )
        _element.remote_address_space = AAZObjectArg(
            options=["remote-address-space"],
            help="The reference to the address space peered with the remote virtual network.",
        )
        cls._build_args_address_space_create(_element.remote_address_space)
        _element.remote_bgp_communities = AAZObjectArg(
            options=["remote-bgp-communities"],
            help="The reference to the remote virtual network's Bgp Communities.",
        )
        _element.remote_virtual_network = AAZObjectArg(
            options=["remote-virtual-network"],
            help="The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).",
        )
        cls._build_args_sub_resource_create(_element.remote_virtual_network)
        _element.remote_virtual_network_address_space = AAZObjectArg(
            options=["remote-virtual-network-address-space"],
            help="The reference to the current address space of the remote virtual network.",
        )
        cls._build_args_address_space_create(_element.remote_virtual_network_address_space)
        _element.use_remote_gateways = AAZBoolArg(
            options=["use-remote-gateways"],
            help="If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.",
        )
        _element.type = AAZStrArg(
            options=["type"],
            help="Resource type.",
        )

        remote_bgp_communities = cls._args_schema.virtual_network_peerings.Element.remote_bgp_communities
        remote_bgp_communities.virtual_network_community = AAZStrArg(
            options=["virtual-network-community"],
            help="The BGP community associated with the virtual network.",
            required=True,
        )
        return cls._args_schema

    _args_address_space_create = None

    @classmethod
    def _build_args_address_space_create(cls, _schema):
        if cls._args_address_space_create is not None:
            _schema.address_prefixes = cls._args_address_space_create.address_prefixes
            return

        cls._args_address_space_create = AAZObjectArg()

        address_space_create = cls._args_address_space_create
        address_space_create.address_prefixes = AAZListArg(
            options=["address-prefixes"],
            help="A list of address blocks reserved for this virtual network in CIDR notation.",
        )

        address_prefixes = cls._args_address_space_create.address_prefixes
        address_prefixes.Element = AAZStrArg()

        _schema.address_prefixes = cls._args_address_space_create.address_prefixes

    _args_application_security_group_create = None

    @classmethod
    def _build_args_application_security_group_create(cls, _schema):
        if cls._args_application_security_group_create is not None:
            _schema.location = cls._args_application_security_group_create.location
            _schema.tags = cls._args_application_security_group_create.tags
            return

        cls._args_application_security_group_create = AAZObjectArg()

        application_security_group_create = cls._args_application_security_group_create
        application_security_group_create.location = AAZResourceLocationArg(
            options=["l", "location"],
            help="Resource location.",
            fmt=AAZResourceLocationArgFormat(
                resource_group_arg="resource_group",
            ),
        )
        application_security_group_create.tags = AAZDictArg(
            options=["tags"],
            help="Resource tags.",
        )

        tags = cls._args_application_security_group_create.tags
        tags.Element = AAZStrArg()

        _schema.location = cls._args_application_security_group_create.location
        _schema.tags = cls._args_application_security_group_create.tags

    _args_sub_resource_create = None

    @classmethod
    def _build_args_sub_resource_create(cls, _schema):
        if cls._args_sub_resource_create is not None:
            _schema.id = cls._args_sub_resource_create.id
            return

        cls._args_sub_resource_create = AAZObjectArg()

        sub_resource_create = cls._args_sub_resource_create
        sub_resource_create.id = AAZStrArg(
            options=["id"],
            help="Resource ID.",
        )

        _schema.id = cls._args_sub_resource_create.id

    def _execute_operations(self):
        self.pre_operations()
        yield self.VirtualNetworksCreateOrUpdate(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 VirtualNetworksCreateOrUpdate(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 [202]:
                return self.client.build_lro_polling(
                    self.ctx.args.no_wait,
                    session,
                    self.on_200_201,
                    self.on_error,
                    lro_options={"final-state-via": "azure-async-operation"},
                    path_format_arguments=self.url_parameters,
                )
            if session.http_response.status_code in [200, 201]:
                return self.client.build_lro_polling(
                    self.ctx.args.no_wait,
                    session,
                    self.on_200_201,
                    self.on_error,
                    lro_options={"final-state-via": "azure-async-operation"},
                    path_format_arguments=self.url_parameters,
                )

            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 "PUT"

        @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(
                    "api-version", "2022-01-01",
                    required=True,
                ),
            }
            return parameters

        @property
        def header_parameters(self):
            parameters = {
                **self.serialize_header_param(
                    "Content-Type", "application/json",
                ),
                **self.serialize_header_param(
                    "Accept", "application/json",
                ),
            }
            return parameters

        @property
        def content(self):
            _content_value, _builder = self.new_content_builder(
                self.ctx.args,
                typ=AAZObjectType,
                typ_kwargs={"flags": {"required": True, "client_flatten": True}}
            )
            _builder.set_prop("extendedLocation", AAZObjectType, ".extended_location")
            _builder.set_prop("location", AAZStrType, ".location")
            _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
            _builder.set_prop("tags", AAZDictType, ".tags")

            extended_location = _builder.get(".extendedLocation")
            if extended_location is not None:
                extended_location.set_prop("name", AAZStrType, ".name")
                extended_location.set_prop("type", AAZStrType, ".type")

            properties = _builder.get(".properties")
            if properties is not None:
                _build_schema_address_space_create(properties.set_prop("addressSpace", AAZObjectType, ".address_space"))
                properties.set_prop("bgpCommunities", AAZObjectType, ".bgp_communities")
                properties.set_prop("ddosProtectionPlan", AAZObjectType, ".ddos_protection_plan")
                properties.set_prop("dhcpOptions", AAZObjectType, ".dhcp_options")
                properties.set_prop("enableDdosProtection", AAZBoolType, ".enable_ddos_protection")
                properties.set_prop("enableVmProtection", AAZBoolType, ".enable_vm_protection")
                properties.set_prop("encryption", AAZObjectType, ".encryption")
                properties.set_prop("flowTimeoutInMinutes", AAZIntType, ".flow_timeout_in_minutes")
                properties.set_prop("ipAllocations", AAZListType, ".ip_allocations")
                properties.set_prop("subnets", AAZListType, ".subnets")
                properties.set_prop("virtualNetworkPeerings", AAZListType, ".virtual_network_peerings")

            bgp_communities = _builder.get(".properties.bgpCommunities")
            if bgp_communities is not None:
                bgp_communities.set_prop("virtualNetworkCommunity", AAZStrType, ".virtual_network_community", typ_kwargs={"flags": {"required": True}})

            ddos_protection_plan = _builder.get(".properties.ddosProtectionPlan")
            if ddos_protection_plan is not None:
                ddos_protection_plan.set_prop("id", AAZStrType, ".id")

            dhcp_options = _builder.get(".properties.dhcpOptions")
            if dhcp_options is not None:
                dhcp_options.set_prop("dnsServers", AAZListType, ".dns_servers")

            dns_servers = _builder.get(".properties.dhcpOptions.dnsServers")
            if dns_servers is not None:
                dns_servers.set_elements(AAZStrType, ".")

            encryption = _builder.get(".properties.encryption")
            if encryption is not None:
                encryption.set_prop("enabled", AAZBoolType, ".enabled", typ_kwargs={"flags": {"required": True}})
                encryption.set_prop("enforcement", AAZStrType, ".enforcement")

            ip_allocations = _builder.get(".properties.ipAllocations")
            if ip_allocations is not None:
                _build_schema_sub_resource_create(ip_allocations.set_elements(AAZObjectType, "."))

            subnets = _builder.get(".properties.subnets")
            if subnets is not None:
                subnets.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("name", AAZStrType, ".name")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                _elements.set_prop("type", AAZStrType, ".type")

            properties = _builder.get(".properties.subnets[].properties")
            if properties is not None:
                properties.set_prop("addressPrefix", AAZStrType, ".address_prefix")
                properties.set_prop("addressPrefixes", AAZListType, ".address_prefixes")
                properties.set_prop("applicationGatewayIpConfigurations", AAZListType, ".application_gateway_ip_configurations")
                properties.set_prop("delegations", AAZListType, ".delegations")
                properties.set_prop("ipAllocations", AAZListType, ".ip_allocations")
                _build_schema_sub_resource_create(properties.set_prop("natGateway", AAZObjectType, ".nat_gateway"))
                properties.set_prop("networkSecurityGroup", AAZObjectType, ".network_security_group")
                properties.set_prop("privateEndpointNetworkPolicies", AAZStrType, ".private_endpoint_network_policies")
                properties.set_prop("privateLinkServiceNetworkPolicies", AAZStrType, ".private_link_service_network_policies")
                properties.set_prop("routeTable", AAZObjectType, ".route_table")
                properties.set_prop("serviceEndpointPolicies", AAZListType, ".service_endpoint_policies")
                properties.set_prop("serviceEndpoints", AAZListType, ".service_endpoints")

            address_prefixes = _builder.get(".properties.subnets[].properties.addressPrefixes")
            if address_prefixes is not None:
                address_prefixes.set_elements(AAZStrType, ".")

            application_gateway_ip_configurations = _builder.get(".properties.subnets[].properties.applicationGatewayIpConfigurations")
            if application_gateway_ip_configurations is not None:
                application_gateway_ip_configurations.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[].properties.applicationGatewayIpConfigurations[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("name", AAZStrType, ".name")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get(".properties.subnets[].properties.applicationGatewayIpConfigurations[].properties")
            if properties is not None:
                _build_schema_sub_resource_create(properties.set_prop("subnet", AAZObjectType, ".subnet"))

            delegations = _builder.get(".properties.subnets[].properties.delegations")
            if delegations is not None:
                delegations.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[].properties.delegations[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("name", AAZStrType, ".name")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                _elements.set_prop("type", AAZStrType, ".type")

            properties = _builder.get(".properties.subnets[].properties.delegations[].properties")
            if properties is not None:
                properties.set_prop("serviceName", AAZStrType, ".service_name")

            ip_allocations = _builder.get(".properties.subnets[].properties.ipAllocations")
            if ip_allocations is not None:
                _build_schema_sub_resource_create(ip_allocations.set_elements(AAZObjectType, "."))

            network_security_group = _builder.get(".properties.subnets[].properties.networkSecurityGroup")
            if network_security_group is not None:
                network_security_group.set_prop("id", AAZStrType, ".id")
                network_security_group.set_prop("location", AAZStrType, ".location")
                network_security_group.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                network_security_group.set_prop("tags", AAZDictType, ".tags")

            properties = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties")
            if properties is not None:
                properties.set_prop("flushConnection", AAZBoolType, ".flush_connection")
                properties.set_prop("securityRules", AAZListType, ".security_rules")

            security_rules = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules")
            if security_rules is not None:
                security_rules.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("name", AAZStrType, ".name")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                _elements.set_prop("type", AAZStrType, ".type")

            properties = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[].properties")
            if properties is not None:
                properties.set_prop("access", AAZStrType, ".access", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("description", AAZStrType, ".description")
                properties.set_prop("destinationAddressPrefix", AAZStrType, ".destination_address_prefix")
                properties.set_prop("destinationAddressPrefixes", AAZListType, ".destination_address_prefixes")
                properties.set_prop("destinationApplicationSecurityGroups", AAZListType, ".destination_application_security_groups")
                properties.set_prop("destinationPortRange", AAZStrType, ".destination_port_range")
                properties.set_prop("destinationPortRanges", AAZListType, ".destination_port_ranges")
                properties.set_prop("direction", AAZStrType, ".direction", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("priority", AAZIntType, ".priority")
                properties.set_prop("protocol", AAZStrType, ".protocol", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("sourceAddressPrefix", AAZStrType, ".source_address_prefix")
                properties.set_prop("sourceAddressPrefixes", AAZListType, ".source_address_prefixes")
                properties.set_prop("sourceApplicationSecurityGroups", AAZListType, ".source_application_security_groups")
                properties.set_prop("sourcePortRange", AAZStrType, ".source_port_range")
                properties.set_prop("sourcePortRanges", AAZListType, ".source_port_ranges")

            destination_address_prefixes = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[].properties.destinationAddressPrefixes")
            if destination_address_prefixes is not None:
                destination_address_prefixes.set_elements(AAZStrType, ".")

            destination_application_security_groups = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[].properties.destinationApplicationSecurityGroups")
            if destination_application_security_groups is not None:
                _build_schema_application_security_group_create(destination_application_security_groups.set_elements(AAZObjectType, "."))

            destination_port_ranges = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[].properties.destinationPortRanges")
            if destination_port_ranges is not None:
                destination_port_ranges.set_elements(AAZStrType, ".")

            source_address_prefixes = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[].properties.sourceAddressPrefixes")
            if source_address_prefixes is not None:
                source_address_prefixes.set_elements(AAZStrType, ".")

            source_application_security_groups = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[].properties.sourceApplicationSecurityGroups")
            if source_application_security_groups is not None:
                _build_schema_application_security_group_create(source_application_security_groups.set_elements(AAZObjectType, "."))

            source_port_ranges = _builder.get(".properties.subnets[].properties.networkSecurityGroup.properties.securityRules[].properties.sourcePortRanges")
            if source_port_ranges is not None:
                source_port_ranges.set_elements(AAZStrType, ".")

            tags = _builder.get(".properties.subnets[].properties.networkSecurityGroup.tags")
            if tags is not None:
                tags.set_elements(AAZStrType, ".")

            route_table = _builder.get(".properties.subnets[].properties.routeTable")
            if route_table is not None:
                route_table.set_prop("id", AAZStrType, ".id")
                route_table.set_prop("location", AAZStrType, ".location")
                route_table.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                route_table.set_prop("tags", AAZDictType, ".tags")

            properties = _builder.get(".properties.subnets[].properties.routeTable.properties")
            if properties is not None:
                properties.set_prop("disableBgpRoutePropagation", AAZBoolType, ".disable_bgp_route_propagation")
                properties.set_prop("routes", AAZListType, ".routes")

            routes = _builder.get(".properties.subnets[].properties.routeTable.properties.routes")
            if routes is not None:
                routes.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[].properties.routeTable.properties.routes[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("name", AAZStrType, ".name")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                _elements.set_prop("type", AAZStrType, ".type")

            properties = _builder.get(".properties.subnets[].properties.routeTable.properties.routes[].properties")
            if properties is not None:
                properties.set_prop("addressPrefix", AAZStrType, ".address_prefix")
                properties.set_prop("hasBgpOverride", AAZBoolType, ".has_bgp_override")
                properties.set_prop("nextHopIpAddress", AAZStrType, ".next_hop_ip_address")
                properties.set_prop("nextHopType", AAZStrType, ".next_hop_type", typ_kwargs={"flags": {"required": True}})

            tags = _builder.get(".properties.subnets[].properties.routeTable.tags")
            if tags is not None:
                tags.set_elements(AAZStrType, ".")

            service_endpoint_policies = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies")
            if service_endpoint_policies is not None:
                service_endpoint_policies.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("location", AAZStrType, ".location")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                _elements.set_prop("tags", AAZDictType, ".tags")

            properties = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[].properties")
            if properties is not None:
                properties.set_prop("contextualServiceEndpointPolicies", AAZListType, ".contextual_service_endpoint_policies")
                properties.set_prop("serviceAlias", AAZStrType, ".service_alias")
                properties.set_prop("serviceEndpointPolicyDefinitions", AAZListType, ".service_endpoint_policy_definitions")

            contextual_service_endpoint_policies = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[].properties.contextualServiceEndpointPolicies")
            if contextual_service_endpoint_policies is not None:
                contextual_service_endpoint_policies.set_elements(AAZStrType, ".")

            service_endpoint_policy_definitions = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions")
            if service_endpoint_policy_definitions is not None:
                service_endpoint_policy_definitions.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("name", AAZStrType, ".name")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                _elements.set_prop("type", AAZStrType, ".type")

            properties = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[].properties")
            if properties is not None:
                properties.set_prop("description", AAZStrType, ".description")
                properties.set_prop("service", AAZStrType, ".service")
                properties.set_prop("serviceResources", AAZListType, ".service_resources")

            service_resources = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[].properties.serviceResources")
            if service_resources is not None:
                service_resources.set_elements(AAZStrType, ".")

            tags = _builder.get(".properties.subnets[].properties.serviceEndpointPolicies[].tags")
            if tags is not None:
                tags.set_elements(AAZStrType, ".")

            service_endpoints = _builder.get(".properties.subnets[].properties.serviceEndpoints")
            if service_endpoints is not None:
                service_endpoints.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.subnets[].properties.serviceEndpoints[]")
            if _elements is not None:
                _elements.set_prop("locations", AAZListType, ".locations")
                _elements.set_prop("service", AAZStrType, ".service")

            locations = _builder.get(".properties.subnets[].properties.serviceEndpoints[].locations")
            if locations is not None:
                locations.set_elements(AAZStrType, ".")

            virtual_network_peerings = _builder.get(".properties.virtualNetworkPeerings")
            if virtual_network_peerings is not None:
                virtual_network_peerings.set_elements(AAZObjectType, ".")

            _elements = _builder.get(".properties.virtualNetworkPeerings[]")
            if _elements is not None:
                _elements.set_prop("id", AAZStrType, ".id")
                _elements.set_prop("name", AAZStrType, ".name")
                _elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
                _elements.set_prop("type", AAZStrType, ".type")

            properties = _builder.get(".properties.virtualNetworkPeerings[].properties")
            if properties is not None:
                properties.set_prop("allowForwardedTraffic", AAZBoolType, ".allow_forwarded_traffic")
                properties.set_prop("allowGatewayTransit", AAZBoolType, ".allow_gateway_transit")
                properties.set_prop("allowVirtualNetworkAccess", AAZBoolType, ".allow_virtual_network_access")
                properties.set_prop("doNotVerifyRemoteGateways", AAZBoolType, ".do_not_verify_remote_gateways")
                properties.set_prop("peeringState", AAZStrType, ".peering_state")
                properties.set_prop("peeringSyncLevel", AAZStrType, ".peering_sync_level")
                _build_schema_address_space_create(properties.set_prop("remoteAddressSpace", AAZObjectType, ".remote_address_space"))
                properties.set_prop("remoteBgpCommunities", AAZObjectType, ".remote_bgp_communities")
                _build_schema_sub_resource_create(properties.set_prop("remoteVirtualNetwork", AAZObjectType, ".remote_virtual_network"))
                _build_schema_address_space_create(properties.set_prop("remoteVirtualNetworkAddressSpace", AAZObjectType, ".remote_virtual_network_address_space"))
                properties.set_prop("useRemoteGateways", AAZBoolType, ".use_remote_gateways")

            remote_bgp_communities = _builder.get(".properties.virtualNetworkPeerings[].properties.remoteBgpCommunities")
            if remote_bgp_communities is not None:
                remote_bgp_communities.set_prop("virtualNetworkCommunity", AAZStrType, ".virtual_network_community", typ_kwargs={"flags": {"required": True}})

            tags = _builder.get(".tags")
            if tags is not None:
                tags.set_elements(AAZStrType, ".")

            return self.serialize_content(_content_value)

        def on_200_201(self, session):
            data = self.deserialize_http_content(session)
            self.ctx.set_var(
                "instance",
                data,
                schema_builder=self._build_schema_on_200_201
            )

        _schema_on_200_201 = None

        @classmethod
        def _build_schema_on_200_201(cls):
            if cls._schema_on_200_201 is not None:
                return cls._schema_on_200_201

            cls._schema_on_200_201 = AAZObjectType()

            _schema_on_200_201 = cls._schema_on_200_201
            _schema_on_200_201.etag = AAZStrType(
                flags={"read_only": True},
            )
            _schema_on_200_201.extended_location = AAZObjectType(
                serialized_name="extendedLocation",
            )
            _build_schema_extended_location_read(_schema_on_200_201.extended_location)
            _schema_on_200_201.id = AAZStrType()
            _schema_on_200_201.location = AAZStrType()
            _schema_on_200_201.name = AAZStrType(
                flags={"read_only": True},
            )
            _schema_on_200_201.properties = AAZObjectType(
                flags={"client_flatten": True},
            )
            _schema_on_200_201.tags = AAZDictType()
            _schema_on_200_201.type = AAZStrType(
                flags={"read_only": True},
            )

            properties = cls._schema_on_200_201.properties
            properties.address_space = AAZObjectType(
                serialized_name="addressSpace",
            )
            _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_201.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_201.properties.ddos_protection_plan
            ddos_protection_plan.id = AAZStrType()

            dhcp_options = cls._schema_on_200_201.properties.dhcp_options
            dhcp_options.dns_servers = AAZListType(
                serialized_name="dnsServers",
            )

            dns_servers = cls._schema_on_200_201.properties.dhcp_options.dns_servers
            dns_servers.Element = AAZStrType()

            encryption = cls._schema_on_200_201.properties.encryption
            encryption.enabled = AAZBoolType(
                flags={"required": True},
            )
            encryption.enforcement = AAZStrType()

            ip_allocations = cls._schema_on_200_201.properties.ip_allocations
            ip_allocations.Element = AAZObjectType(
                flags={"read_only": True},
            )
            _build_schema_sub_resource_read(ip_allocations.Element)

            subnets = cls._schema_on_200_201.properties.subnets
            subnets.Element = AAZObjectType()
            _build_schema_subnet_read(subnets.Element)

            virtual_network_peerings = cls._schema_on_200_201.properties.virtual_network_peerings
            virtual_network_peerings.Element = AAZObjectType()

            _element = cls._schema_on_200_201.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_201.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",
            )
            _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",
                flags={"read_only": True},
            )
            _build_schema_sub_resource_read(properties.remote_virtual_network)
            properties.remote_virtual_network_address_space = AAZObjectType(
                serialized_name="remoteVirtualNetworkAddressSpace",
            )
            _build_schema_address_space_read(properties.remote_virtual_network_address_space)
            properties.remote_virtual_network_encryption = AAZObjectType(
                serialized_name="remoteVirtualNetworkEncryption",
                flags={"read_only": True},
            )
            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_201.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_201.properties.virtual_network_peerings.Element.properties.remote_virtual_network_encryption
            remote_virtual_network_encryption.enabled = AAZBoolType(
                flags={"required": True, "read_only": True},
            )
            remote_virtual_network_encryption.enforcement = AAZStrType(
                flags={"read_only": True},
            )

            tags = cls._schema_on_200_201.tags
            tags.Element = AAZStrType()

            return cls._schema_on_200_201


def _build_schema_address_space_create(_builder):
    if _builder is None:
        return
    _builder.set_prop("addressPrefixes", AAZListType, ".address_prefixes")

    address_prefixes = _builder.get(".addressPrefixes")
    if address_prefixes is not None:
        address_prefixes.set_elements(AAZStrType, ".")


def _build_schema_application_security_group_create(_builder):
    if _builder is None:
        return
    _builder.set_prop("location", AAZStrType, ".location")
    _builder.set_prop("tags", AAZDictType, ".tags")

    tags = _builder.get(".tags")
    if tags is not None:
        tags.set_elements(AAZStrType, ".")


def _build_schema_sub_resource_create(_builder):
    if _builder is None:
        return
    _builder.set_prop("id", AAZStrType, ".id")


_schema_address_space_read = None


def _build_schema_address_space_read(_schema):
    global _schema_address_space_read
    if _schema_address_space_read is not None:
        _schema.address_prefixes = _schema_address_space_read.address_prefixes
        return

    _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 = _schema_address_space_read.address_prefixes


_schema_application_security_group_read = None


def _build_schema_application_security_group_read(_schema):
    global _schema_application_security_group_read
    if _schema_application_security_group_read is not None:
        _schema.etag = _schema_application_security_group_read.etag
        _schema.id = _schema_application_security_group_read.id
        _schema.location = _schema_application_security_group_read.location
        _schema.name = _schema_application_security_group_read.name
        _schema.properties = _schema_application_security_group_read.properties
        _schema.tags = _schema_application_security_group_read.tags
        _schema.type = _schema_application_security_group_read.type
        return

    _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 = _schema_application_security_group_read.etag
    _schema.id = _schema_application_security_group_read.id
    _schema.location = _schema_application_security_group_read.location
    _schema.name = _schema_application_security_group_read.name
    _schema.properties = _schema_application_security_group_read.properties
    _schema.tags = _schema_application_security_group_read.tags
    _schema.type = _schema_application_security_group_read.type


_schema_extended_location_read = None


def _build_schema_extended_location_read(_schema):
    global _schema_extended_location_read
    if _schema_extended_location_read is not None:
        _schema.name = _schema_extended_location_read.name
        _schema.type = _schema_extended_location_read.type
        return

    _schema_extended_location_read = AAZObjectType()

    extended_location_read = _schema_extended_location_read
    extended_location_read.name = AAZStrType()
    extended_location_read.type = AAZStrType()

    _schema.name = _schema_extended_location_read.name
    _schema.type = _schema_extended_location_read.type


_schema_frontend_ip_configuration_read = None


def _build_schema_frontend_ip_configuration_read(_schema):
    global _schema_frontend_ip_configuration_read
    if _schema_frontend_ip_configuration_read is not None:
        _schema.etag = _schema_frontend_ip_configuration_read.etag
        _schema.id = _schema_frontend_ip_configuration_read.id
        _schema.name = _schema_frontend_ip_configuration_read.name
        _schema.properties = _schema_frontend_ip_configuration_read.properties
        _schema.type = _schema_frontend_ip_configuration_read.type
        _schema.zones = _schema_frontend_ip_configuration_read.zones
        return

    _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},
    )
    _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",
        flags={"read_only": True},
    )
    _build_schema_public_ip_address_read(properties.public_ip_address)
    properties.public_ip_prefix = AAZObjectType(
        serialized_name="publicIPPrefix",
        flags={"read_only": True},
    )
    _build_schema_sub_resource_read(properties.public_ip_prefix)
    properties.subnet = AAZObjectType()
    _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},
    )
    _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},
    )
    _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},
    )
    _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},
    )
    _build_schema_sub_resource_read(outbound_rules.Element)

    zones = _schema_frontend_ip_configuration_read.zones
    zones.Element = AAZStrType(
        flags={"read_only": True},
    )

    _schema.etag = _schema_frontend_ip_configuration_read.etag
    _schema.id = _schema_frontend_ip_configuration_read.id
    _schema.name = _schema_frontend_ip_configuration_read.name
    _schema.properties = _schema_frontend_ip_configuration_read.properties
    _schema.type = _schema_frontend_ip_configuration_read.type
    _schema.zones = _schema_frontend_ip_configuration_read.zones


_schema_ip_configuration_read = None


def _build_schema_ip_configuration_read(_schema):
    global _schema_ip_configuration_read
    if _schema_ip_configuration_read is not None:
        _schema.etag = _schema_ip_configuration_read.etag
        _schema.id = _schema_ip_configuration_read.id
        _schema.name = _schema_ip_configuration_read.name
        _schema.properties = _schema_ip_configuration_read.properties
        return

    _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",
        flags={"read_only": True},
    )
    _build_schema_public_ip_address_read(properties.public_ip_address)
    properties.subnet = AAZObjectType()
    _build_schema_subnet_read(properties.subnet)

    _schema.etag = _schema_ip_configuration_read.etag
    _schema.id = _schema_ip_configuration_read.id
    _schema.name = _schema_ip_configuration_read.name
    _schema.properties = _schema_ip_configuration_read.properties


_schema_network_interface_ip_configuration_read = None


def _build_schema_network_interface_ip_configuration_read(_schema):
    global _schema_network_interface_ip_configuration_read
    if _schema_network_interface_ip_configuration_read is not None:
        _schema.etag = _schema_network_interface_ip_configuration_read.etag
        _schema.id = _schema_network_interface_ip_configuration_read.id
        _schema.name = _schema_network_interface_ip_configuration_read.name
        _schema.properties = _schema_network_interface_ip_configuration_read.properties
        _schema.type = _schema_network_interface_ip_configuration_read.type
        return

    _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},
    )
    _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",
        flags={"read_only": True},
    )
    _build_schema_public_ip_address_read(properties.public_ip_address)
    properties.subnet = AAZObjectType()
    _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},
    )
    _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()
    _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},
    )
    _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},
    )
    _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},
    )
    _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},
    )
    _build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration)
    properties.network_interface_ip_configuration = AAZObjectType(
        serialized_name="networkInterfaceIPConfiguration",
        flags={"read_only": True},
    )
    _build_schema_sub_resource_read(properties.network_interface_ip_configuration)
    properties.subnet = AAZObjectType(
        flags={"read_only": True},
    )
    _build_schema_sub_resource_read(properties.subnet)
    properties.virtual_network = AAZObjectType(
        serialized_name="virtualNetwork",
        flags={"read_only": True},
    )
    _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},
    )
    _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},
    )
    _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},
    )
    _build_schema_sub_resource_read(properties.backend_address_pool)
    properties.backend_ip_configuration = AAZObjectType(
        serialized_name="backendIPConfiguration",
        flags={"read_only": True},
    )
    _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},
    )
    _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},
    )
    _build_schema_virtual_network_tap_read(virtual_network_taps.Element)

    _schema.etag = _schema_network_interface_ip_configuration_read.etag
    _schema.id = _schema_network_interface_ip_configuration_read.id
    _schema.name = _schema_network_interface_ip_configuration_read.name
    _schema.properties = _schema_network_interface_ip_configuration_read.properties
    _schema.type = _schema_network_interface_ip_configuration_read.type


_schema_network_interface_tap_configuration_read = None


def _build_schema_network_interface_tap_configuration_read(_schema):
    global _schema_network_interface_tap_configuration_read
    if _schema_network_interface_tap_configuration_read is not None:
        _schema.etag = _schema_network_interface_tap_configuration_read.etag
        _schema.id = _schema_network_interface_tap_configuration_read.id
        _schema.name = _schema_network_interface_tap_configuration_read.name
        _schema.properties = _schema_network_interface_tap_configuration_read.properties
        _schema.type = _schema_network_interface_tap_configuration_read.type
        return

    _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},
    )
    _build_schema_virtual_network_tap_read(properties.virtual_network_tap)

    _schema.etag = _schema_network_interface_tap_configuration_read.etag
    _schema.id = _schema_network_interface_tap_configuration_read.id
    _schema.name = _schema_network_interface_tap_configuration_read.name
    _schema.properties = _schema_network_interface_tap_configuration_read.properties
    _schema.type = _schema_network_interface_tap_configuration_read.type


_schema_network_interface_read = None


def _build_schema_network_interface_read(_schema):
    global _schema_network_interface_read
    if _schema_network_interface_read is not None:
        _schema.etag = _schema_network_interface_read.etag
        _schema.extended_location = _schema_network_interface_read.extended_location
        _schema.id = _schema_network_interface_read.id
        _schema.location = _schema_network_interface_read.location
        _schema.name = _schema_network_interface_read.name
        _schema.properties = _schema_network_interface_read.properties
        _schema.tags = _schema_network_interface_read.tags
        _schema.type = _schema_network_interface_read.type
        return

    _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",
    )
    _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.dns_settings = AAZObjectType(
        serialized_name="dnsSettings",
        flags={"read_only": True},
    )
    properties.dscp_configuration = AAZObjectType(
        serialized_name="dscpConfiguration",
        flags={"read_only": True},
    )
    _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",
    )
    _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},
    )
    _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},
    )
    _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},
    )
    _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",
    )
    _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()
    _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},
    )
    _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},
    )
    _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},
    )
    _build_schema_private_endpoint_read(properties.private_endpoint)
    properties.private_link_service_connection_state = AAZObjectType(
        serialized_name="privateLinkServiceConnectionState",
        flags={"read_only": True},
    )
    _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},
    )
    _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 = _schema_network_interface_read.etag
    _schema.extended_location = _schema_network_interface_read.extended_location
    _schema.id = _schema_network_interface_read.id
    _schema.location = _schema_network_interface_read.location
    _schema.name = _schema_network_interface_read.name
    _schema.properties = _schema_network_interface_read.properties
    _schema.tags = _schema_network_interface_read.tags
    _schema.type = _schema_network_interface_read.type


_schema_network_security_group_read = None


def _build_schema_network_security_group_read(_schema):
    global _schema_network_security_group_read
    if _schema_network_security_group_read is not None:
        _schema.etag = _schema_network_security_group_read.etag
        _schema.id = _schema_network_security_group_read.id
        _schema.location = _schema_network_security_group_read.location
        _schema.name = _schema_network_security_group_read.name
        _schema.properties = _schema_network_security_group_read.properties
        _schema.tags = _schema_network_security_group_read.tags
        _schema.type = _schema_network_security_group_read.type
        return

    _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()
    _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},
    )
    _build_schema_network_interface_read(network_interfaces.Element)

    security_rules = _schema_network_security_group_read.properties.security_rules
    security_rules.Element = AAZObjectType()
    _build_schema_security_rule_read(security_rules.Element)

    subnets = _schema_network_security_group_read.properties.subnets
    subnets.Element = AAZObjectType()
    _build_schema_subnet_read(subnets.Element)

    tags = _schema_network_security_group_read.tags
    tags.Element = AAZStrType()

    _schema.etag = _schema_network_security_group_read.etag
    _schema.id = _schema_network_security_group_read.id
    _schema.location = _schema_network_security_group_read.location
    _schema.name = _schema_network_security_group_read.name
    _schema.properties = _schema_network_security_group_read.properties
    _schema.tags = _schema_network_security_group_read.tags
    _schema.type = _schema_network_security_group_read.type


_schema_private_endpoint_read = None


def _build_schema_private_endpoint_read(_schema):
    global _schema_private_endpoint_read
    if _schema_private_endpoint_read is not None:
        _schema.etag = _schema_private_endpoint_read.etag
        _schema.extended_location = _schema_private_endpoint_read.extended_location
        _schema.id = _schema_private_endpoint_read.id
        _schema.location = _schema_private_endpoint_read.location
        _schema.name = _schema_private_endpoint_read.name
        _schema.properties = _schema_private_endpoint_read.properties
        _schema.tags = _schema_private_endpoint_read.tags
        _schema.type = _schema_private_endpoint_read.type
        return

    _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",
    )
    _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()
    _build_schema_subnet_read(properties.subnet)

    application_security_groups = _schema_private_endpoint_read.properties.application_security_groups
    application_security_groups.Element = AAZObjectType()
    _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},
    )
    _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},
    )
    _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},
    )
    _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 = _schema_private_endpoint_read.etag
    _schema.extended_location = _schema_private_endpoint_read.extended_location
    _schema.id = _schema_private_endpoint_read.id
    _schema.location = _schema_private_endpoint_read.location
    _schema.name = _schema_private_endpoint_read.name
    _schema.properties = _schema_private_endpoint_read.properties
    _schema.tags = _schema_private_endpoint_read.tags
    _schema.type = _schema_private_endpoint_read.type


_schema_private_link_service_connection_state_read = None


def _build_schema_private_link_service_connection_state_read(_schema):
    global _schema_private_link_service_connection_state_read
    if _schema_private_link_service_connection_state_read is not None:
        _schema.actions_required = _schema_private_link_service_connection_state_read.actions_required
        _schema.description = _schema_private_link_service_connection_state_read.description
        _schema.status = _schema_private_link_service_connection_state_read.status
        return

    _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 = _schema_private_link_service_connection_state_read.actions_required
    _schema.description = _schema_private_link_service_connection_state_read.description
    _schema.status = _schema_private_link_service_connection_state_read.status


_schema_private_link_service_connection_read = None


def _build_schema_private_link_service_connection_read(_schema):
    global _schema_private_link_service_connection_read
    if _schema_private_link_service_connection_read is not None:
        _schema.etag = _schema_private_link_service_connection_read.etag
        _schema.id = _schema_private_link_service_connection_read.id
        _schema.name = _schema_private_link_service_connection_read.name
        _schema.properties = _schema_private_link_service_connection_read.properties
        _schema.type = _schema_private_link_service_connection_read.type
        return

    _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},
    )
    _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 = _schema_private_link_service_connection_read.etag
    _schema.id = _schema_private_link_service_connection_read.id
    _schema.name = _schema_private_link_service_connection_read.name
    _schema.properties = _schema_private_link_service_connection_read.properties
    _schema.type = _schema_private_link_service_connection_read.type


_schema_public_ip_address_read = None


def _build_schema_public_ip_address_read(_schema):
    global _schema_public_ip_address_read
    if _schema_public_ip_address_read is not None:
        _schema.etag = _schema_public_ip_address_read.etag
        _schema.extended_location = _schema_public_ip_address_read.extended_location
        _schema.id = _schema_public_ip_address_read.id
        _schema.location = _schema_public_ip_address_read.location
        _schema.name = _schema_public_ip_address_read.name
        _schema.properties = _schema_public_ip_address_read.properties
        _schema.sku = _schema_public_ip_address_read.sku
        _schema.tags = _schema_public_ip_address_read.tags
        _schema.type = _schema_public_ip_address_read.type
        _schema.zones = _schema_public_ip_address_read.zones
        return

    _schema_public_ip_address_read = AAZObjectType(
        flags={"read_only": True}
    )

    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",
    )
    _build_schema_extended_location_read(public_ip_address_read.extended_location)
    public_ip_address_read.id = AAZStrType(
        flags={"read_only": True},
    )
    public_ip_address_read.location = AAZStrType(
        flags={"read_only": True},
    )
    public_ip_address_read.name = AAZStrType(
        flags={"read_only": True},
    )
    public_ip_address_read.properties = AAZObjectType(
        flags={"client_flatten": True, "read_only": True},
    )
    public_ip_address_read.sku = AAZObjectType(
        flags={"read_only": True},
    )
    public_ip_address_read.tags = AAZDictType(
        flags={"read_only": True},
    )
    public_ip_address_read.type = AAZStrType(
        flags={"read_only": True},
    )
    public_ip_address_read.zones = AAZListType(
        flags={"read_only": True},
    )

    properties = _schema_public_ip_address_read.properties
    properties.ddos_settings = AAZObjectType(
        serialized_name="ddosSettings",
        flags={"read_only": True},
    )
    properties.delete_option = AAZStrType(
        serialized_name="deleteOption",
        flags={"read_only": True},
    )
    properties.dns_settings = AAZObjectType(
        serialized_name="dnsSettings",
        flags={"read_only": True},
    )
    properties.idle_timeout_in_minutes = AAZIntType(
        serialized_name="idleTimeoutInMinutes",
        flags={"read_only": True},
    )
    properties.ip_address = AAZStrType(
        serialized_name="ipAddress",
        flags={"read_only": True},
    )
    properties.ip_configuration = AAZObjectType(
        serialized_name="ipConfiguration",
        flags={"read_only": True},
    )
    _build_schema_ip_configuration_read(properties.ip_configuration)
    properties.ip_tags = AAZListType(
        serialized_name="ipTags",
        flags={"read_only": True},
    )
    properties.linked_public_ip_address = AAZObjectType(
        serialized_name="linkedPublicIPAddress",
        flags={"read_only": True},
    )
    _build_schema_public_ip_address_read(properties.linked_public_ip_address)
    properties.migration_phase = AAZStrType(
        serialized_name="migrationPhase",
        flags={"read_only": True},
    )
    properties.nat_gateway = AAZObjectType(
        serialized_name="natGateway",
        flags={"read_only": True},
    )
    properties.provisioning_state = AAZStrType(
        serialized_name="provisioningState",
        flags={"read_only": True},
    )
    properties.public_ip_address_version = AAZStrType(
        serialized_name="publicIPAddressVersion",
        flags={"read_only": True},
    )
    properties.public_ip_allocation_method = AAZStrType(
        serialized_name="publicIPAllocationMethod",
        flags={"read_only": True},
    )
    properties.public_ip_prefix = AAZObjectType(
        serialized_name="publicIPPrefix",
        flags={"read_only": True},
    )
    _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",
        flags={"read_only": True},
    )
    _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",
        flags={"read_only": True},
    )
    _build_schema_sub_resource_read(ddos_settings.ddos_custom_policy)
    ddos_settings.protected_ip = AAZBoolType(
        serialized_name="protectedIP",
        flags={"read_only": True},
    )
    ddos_settings.protection_coverage = AAZStrType(
        serialized_name="protectionCoverage",
        flags={"read_only": True},
    )

    dns_settings = _schema_public_ip_address_read.properties.dns_settings
    dns_settings.domain_name_label = AAZStrType(
        serialized_name="domainNameLabel",
        flags={"read_only": True},
    )
    dns_settings.fqdn = AAZStrType(
        flags={"read_only": True},
    )
    dns_settings.reverse_fqdn = AAZStrType(
        serialized_name="reverseFqdn",
        flags={"read_only": True},
    )

    ip_tags = _schema_public_ip_address_read.properties.ip_tags
    ip_tags.Element = AAZObjectType(
        flags={"read_only": True},
    )

    _element = _schema_public_ip_address_read.properties.ip_tags.Element
    _element.ip_tag_type = AAZStrType(
        serialized_name="ipTagType",
        flags={"read_only": True},
    )
    _element.tag = AAZStrType(
        flags={"read_only": True},
    )

    nat_gateway = _schema_public_ip_address_read.properties.nat_gateway
    nat_gateway.etag = AAZStrType(
        flags={"read_only": True},
    )
    nat_gateway.id = AAZStrType(
        flags={"read_only": True},
    )
    nat_gateway.location = AAZStrType(
        flags={"read_only": True},
    )
    nat_gateway.name = AAZStrType(
        flags={"read_only": True},
    )
    nat_gateway.properties = AAZObjectType(
        flags={"client_flatten": True, "read_only": True},
    )
    nat_gateway.sku = AAZObjectType(
        flags={"read_only": True},
    )
    nat_gateway.tags = AAZDictType(
        flags={"read_only": True},
    )
    nat_gateway.type = AAZStrType(
        flags={"read_only": True},
    )
    nat_gateway.zones = AAZListType(
        flags={"read_only": True},
    )

    properties = _schema_public_ip_address_read.properties.nat_gateway.properties
    properties.idle_timeout_in_minutes = AAZIntType(
        serialized_name="idleTimeoutInMinutes",
        flags={"read_only": True},
    )
    properties.provisioning_state = AAZStrType(
        serialized_name="provisioningState",
        flags={"read_only": True},
    )
    properties.public_ip_addresses = AAZListType(
        serialized_name="publicIpAddresses",
        flags={"read_only": True},
    )
    properties.public_ip_prefixes = AAZListType(
        serialized_name="publicIpPrefixes",
        flags={"read_only": True},
    )
    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},
    )
    _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},
    )
    _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},
    )
    _build_schema_sub_resource_read(subnets.Element)

    sku = _schema_public_ip_address_read.properties.nat_gateway.sku
    sku.name = AAZStrType(
        flags={"read_only": True},
    )

    tags = _schema_public_ip_address_read.properties.nat_gateway.tags
    tags.Element = AAZStrType(
        flags={"read_only": True},
    )

    zones = _schema_public_ip_address_read.properties.nat_gateway.zones
    zones.Element = AAZStrType(
        flags={"read_only": True},
    )

    sku = _schema_public_ip_address_read.sku
    sku.name = AAZStrType(
        flags={"read_only": True},
    )
    sku.tier = AAZStrType(
        flags={"read_only": True},
    )

    tags = _schema_public_ip_address_read.tags
    tags.Element = AAZStrType(
        flags={"read_only": True},
    )

    zones = _schema_public_ip_address_read.zones
    zones.Element = AAZStrType(
        flags={"read_only": True},
    )

    _schema.etag = _schema_public_ip_address_read.etag
    _schema.extended_location = _schema_public_ip_address_read.extended_location
    _schema.id = _schema_public_ip_address_read.id
    _schema.location = _schema_public_ip_address_read.location
    _schema.name = _schema_public_ip_address_read.name
    _schema.properties = _schema_public_ip_address_read.properties
    _schema.sku = _schema_public_ip_address_read.sku
    _schema.tags = _schema_public_ip_address_read.tags
    _schema.type = _schema_public_ip_address_read.type
    _schema.zones = _schema_public_ip_address_read.zones


_schema_security_rule_read = None


def _build_schema_security_rule_read(_schema):
    global _schema_security_rule_read
    if _schema_security_rule_read is not None:
        _schema.etag = _schema_security_rule_read.etag
        _schema.id = _schema_security_rule_read.id
        _schema.name = _schema_security_rule_read.name
        _schema.properties = _schema_security_rule_read.properties
        _schema.type = _schema_security_rule_read.type
        return

    _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()
    _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()
    _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 = _schema_security_rule_read.etag
    _schema.id = _schema_security_rule_read.id
    _schema.name = _schema_security_rule_read.name
    _schema.properties = _schema_security_rule_read.properties
    _schema.type = _schema_security_rule_read.type


_schema_sub_resource_read = None


def _build_schema_sub_resource_read(_schema):
    global _schema_sub_resource_read
    if _schema_sub_resource_read is not None:
        _schema.id = _schema_sub_resource_read.id
        return

    _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 = _schema_sub_resource_read.id


_schema_subnet_read = None


def _build_schema_subnet_read(_schema):
    global _schema_subnet_read
    if _schema_subnet_read is not None:
        _schema.etag = _schema_subnet_read.etag
        _schema.id = _schema_subnet_read.id
        _schema.name = _schema_subnet_read.name
        _schema.properties = _schema_subnet_read.properties
        _schema.type = _schema_subnet_read.type
        return

    _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",
        flags={"read_only": True},
    )
    _build_schema_sub_resource_read(properties.nat_gateway)
    properties.network_security_group = AAZObjectType(
        serialized_name="networkSecurityGroup",
    )
    _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(
        flags={"read_only": True},
    )
    _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(
        flags={"read_only": True},
    )

    ip_allocations = _schema_subnet_read.properties.ip_allocations
    ip_allocations.Element = AAZObjectType(
        flags={"read_only": True},
    )
    _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()
    _build_schema_subnet_read(properties.subnet)

    ip_configurations = _schema_subnet_read.properties.ip_configurations
    ip_configurations.Element = AAZObjectType(
        flags={"read_only": True},
    )
    _build_schema_ip_configuration_read(ip_configurations.Element)

    private_endpoints = _schema_subnet_read.properties.private_endpoints
    private_endpoints.Element = AAZObjectType(
        flags={"read_only": True},
    )
    _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()
    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()
    _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(
        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()

    _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()
    _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 = _schema_subnet_read.etag
    _schema.id = _schema_subnet_read.id
    _schema.name = _schema_subnet_read.name
    _schema.properties = _schema_subnet_read.properties
    _schema.type = _schema_subnet_read.type


_schema_virtual_network_tap_read = None


def _build_schema_virtual_network_tap_read(_schema):
    global _schema_virtual_network_tap_read
    if _schema_virtual_network_tap_read is not None:
        _schema.etag = _schema_virtual_network_tap_read.etag
        _schema.id = _schema_virtual_network_tap_read.id
        _schema.location = _schema_virtual_network_tap_read.location
        _schema.name = _schema_virtual_network_tap_read.name
        _schema.properties = _schema_virtual_network_tap_read.properties
        _schema.tags = _schema_virtual_network_tap_read.tags
        _schema.type = _schema_virtual_network_tap_read.type
        return

    _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},
    )
    _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},
    )
    _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},
    )
    _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 = _schema_virtual_network_tap_read.etag
    _schema.id = _schema_virtual_network_tap_read.id
    _schema.location = _schema_virtual_network_tap_read.location
    _schema.name = _schema_virtual_network_tap_read.name
    _schema.properties = _schema_virtual_network_tap_read.properties
    _schema.tags = _schema_virtual_network_tap_read.tags
    _schema.type = _schema_virtual_network_tap_read.type


__all__ = ["Create"]
