From 43d695a7b19abe7582be36f5530eae807e8ced07 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 7 Feb 2021 07:22:11 +0000 Subject: [PATCH] CodeGen from PR 12832 in Azure/azure-rest-api-specs Merge 64b2e0f8247a9b5ea20c6252032ba64a43434eb7 into 78b67802dfdcf0e8f2e0d05900c15f6b3b9ff073 --- .../azure/mgmt/privatedns/__init__.py | 7 +- .../azure/mgmt/privatedns/_configuration.py | 50 ++ ...t.py => _private_dns_management_client.py} | 44 +- .../azure/mgmt/privatedns/models/__init__.py | 84 +-- .../azure/mgmt/privatedns/models/_models.py | 617 ++++++++++++++++++ .../mgmt/privatedns/models/_models_py3.py | 617 ++++++++++++++++++ ...network_link_paged.py => _paged_models.py} | 26 + ...> _private_dns_management_client_enums.py} | 0 .../mgmt/privatedns/models/aaaa_record.py | 28 - .../mgmt/privatedns/models/aaaa_record_py3.py | 28 - .../azure/mgmt/privatedns/models/arecord.py | 28 - .../mgmt/privatedns/models/arecord_py3.py | 28 - .../mgmt/privatedns/models/cname_record.py | 28 - .../privatedns/models/cname_record_py3.py | 28 - .../azure/mgmt/privatedns/models/mx_record.py | 32 - .../mgmt/privatedns/models/mx_record_py3.py | 32 - .../mgmt/privatedns/models/private_zone.py | 107 --- .../privatedns/models/private_zone_paged.py | 27 - .../privatedns/models/private_zone_py3.py | 107 --- .../mgmt/privatedns/models/proxy_resource.py | 44 -- .../privatedns/models/proxy_resource_py3.py | 44 -- .../mgmt/privatedns/models/ptr_record.py | 28 - .../mgmt/privatedns/models/ptr_record_py3.py | 28 - .../mgmt/privatedns/models/record_set.py | 100 --- .../privatedns/models/record_set_paged.py | 27 - .../mgmt/privatedns/models/record_set_py3.py | 100 --- .../azure/mgmt/privatedns/models/resource.py | 47 -- .../mgmt/privatedns/models/resource_py3.py | 47 -- .../mgmt/privatedns/models/soa_record.py | 54 -- .../mgmt/privatedns/models/soa_record_py3.py | 54 -- .../mgmt/privatedns/models/srv_record.py | 40 -- .../mgmt/privatedns/models/srv_record_py3.py | 40 -- .../mgmt/privatedns/models/sub_resource.py | 28 - .../privatedns/models/sub_resource_py3.py | 28 - .../privatedns/models/tracked_resource.py | 52 -- .../privatedns/models/tracked_resource_py3.py | 52 -- .../mgmt/privatedns/models/txt_record.py | 28 - .../mgmt/privatedns/models/txt_record_py3.py | 28 - .../privatedns/models/virtual_network_link.py | 81 --- .../models/virtual_network_link_py3.py | 81 --- .../mgmt/privatedns/operations/__init__.py | 6 +- ...ations.py => _private_zones_operations.py} | 31 +- ...erations.py => _record_sets_operations.py} | 33 +- ...y => _virtual_network_links_operations.py} | 17 +- 44 files changed, 1410 insertions(+), 1626 deletions(-) create mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_configuration.py rename sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/{private_dns_management_client.py => _private_dns_management_client.py} (61%) create mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models.py create mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models_py3.py rename sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/{virtual_network_link_paged.py => _paged_models.py} (53%) rename sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/{private_dns_management_client_enums.py => _private_dns_management_client_enums.py} (100%) delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_paged.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_paged.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record_py3.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link.py delete mode 100644 sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link_py3.py rename sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/{private_zones_operations.py => _private_zones_operations.py} (97%) rename sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/{record_sets_operations.py => _record_sets_operations.py} (97%) rename sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/{virtual_network_links_operations.py => _virtual_network_links_operations.py} (98%) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/__init__.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/__init__.py index d0aa64885b3f..2d5078228714 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/__init__.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .private_dns_management_client import PrivateDnsManagementClient -from .version import VERSION +from ._configuration import PrivateDnsManagementClientConfiguration +from ._private_dns_management_client import PrivateDnsManagementClient +__all__ = ['PrivateDnsManagementClient', 'PrivateDnsManagementClientConfiguration'] -__all__ = ['PrivateDnsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_configuration.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_configuration.py new file mode 100644 index 000000000000..3d08cc714999 --- /dev/null +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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 Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class PrivateDnsManagementClientConfiguration(AzureConfiguration): + """Configuration for PrivateDnsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(PrivateDnsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-privatedns/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/private_dns_management_client.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_private_dns_management_client.py similarity index 61% rename from sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/private_dns_management_client.py rename to sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_private_dns_management_client.py index a53a017f030a..c6e212f96239 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/private_dns_management_client.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_private_dns_management_client.py @@ -11,46 +11,12 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.private_zones_operations import PrivateZonesOperations -from .operations.virtual_network_links_operations import VirtualNetworkLinksOperations -from .operations.record_sets_operations import RecordSetsOperations -from . import models - - -class PrivateDnsManagementClientConfiguration(AzureConfiguration): - """Configuration for PrivateDnsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(PrivateDnsManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('azure-mgmt-privatedns/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import PrivateDnsManagementClientConfiguration +from .operations import PrivateZonesOperations +from .operations import VirtualNetworkLinksOperations +from .operations import RecordSetsOperations +from . import models class PrivateDnsManagementClient(SDKClient): diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/__init__.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/__init__.py index b4b8674ba773..e492a956c35e 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/__init__.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/__init__.py @@ -10,62 +10,62 @@ # -------------------------------------------------------------------------- try: - from .private_zone_py3 import PrivateZone - from .sub_resource_py3 import SubResource - from .virtual_network_link_py3 import VirtualNetworkLink - from .arecord_py3 import ARecord - from .aaaa_record_py3 import AaaaRecord - from .cname_record_py3 import CnameRecord - from .mx_record_py3 import MxRecord - from .ptr_record_py3 import PtrRecord - from .soa_record_py3 import SoaRecord - from .srv_record_py3 import SrvRecord - from .txt_record_py3 import TxtRecord - from .record_set_py3 import RecordSet - from .resource_py3 import Resource - from .tracked_resource_py3 import TrackedResource - from .proxy_resource_py3 import ProxyResource + from ._models_py3 import AaaaRecord + from ._models_py3 import ARecord + from ._models_py3 import CnameRecord + from ._models_py3 import MxRecord + from ._models_py3 import PrivateZone + from ._models_py3 import ProxyResource + from ._models_py3 import PtrRecord + from ._models_py3 import RecordSet + from ._models_py3 import Resource + from ._models_py3 import SoaRecord + from ._models_py3 import SrvRecord + from ._models_py3 import SubResource + from ._models_py3 import TrackedResource + from ._models_py3 import TxtRecord + from ._models_py3 import VirtualNetworkLink except (SyntaxError, ImportError): - from .private_zone import PrivateZone - from .sub_resource import SubResource - from .virtual_network_link import VirtualNetworkLink - from .arecord import ARecord - from .aaaa_record import AaaaRecord - from .cname_record import CnameRecord - from .mx_record import MxRecord - from .ptr_record import PtrRecord - from .soa_record import SoaRecord - from .srv_record import SrvRecord - from .txt_record import TxtRecord - from .record_set import RecordSet - from .resource import Resource - from .tracked_resource import TrackedResource - from .proxy_resource import ProxyResource -from .private_zone_paged import PrivateZonePaged -from .virtual_network_link_paged import VirtualNetworkLinkPaged -from .record_set_paged import RecordSetPaged -from .private_dns_management_client_enums import ( + from ._models import AaaaRecord + from ._models import ARecord + from ._models import CnameRecord + from ._models import MxRecord + from ._models import PrivateZone + from ._models import ProxyResource + from ._models import PtrRecord + from ._models import RecordSet + from ._models import Resource + from ._models import SoaRecord + from ._models import SrvRecord + from ._models import SubResource + from ._models import TrackedResource + from ._models import TxtRecord + from ._models import VirtualNetworkLink +from ._paged_models import PrivateZonePaged +from ._paged_models import RecordSetPaged +from ._paged_models import VirtualNetworkLinkPaged +from ._private_dns_management_client_enums import ( ProvisioningState, VirtualNetworkLinkState, RecordType, ) __all__ = [ - 'PrivateZone', - 'SubResource', - 'VirtualNetworkLink', - 'ARecord', 'AaaaRecord', + 'ARecord', 'CnameRecord', 'MxRecord', + 'PrivateZone', + 'ProxyResource', 'PtrRecord', - 'SoaRecord', - 'SrvRecord', - 'TxtRecord', 'RecordSet', 'Resource', + 'SoaRecord', + 'SrvRecord', + 'SubResource', 'TrackedResource', - 'ProxyResource', + 'TxtRecord', + 'VirtualNetworkLink', 'PrivateZonePaged', 'VirtualNetworkLinkPaged', 'RecordSetPaged', diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models.py new file mode 100644 index 000000000000..e7063b18ccc8 --- /dev/null +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models.py @@ -0,0 +1,617 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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 Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AaaaRecord(Model): + """An AAAA record. + + :param ipv6_address: The IPv6 address of this AAAA record. + :type ipv6_address: str + """ + + _attribute_map = { + 'ipv6_address': {'key': 'ipv6Address', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AaaaRecord, self).__init__(**kwargs) + self.ipv6_address = kwargs.get('ipv6_address', None) + + +class ARecord(Model): + """An A record. + + :param ipv4_address: The IPv4 address of this A record. + :type ipv4_address: str + """ + + _attribute_map = { + 'ipv4_address': {'key': 'ipv4Address', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ARecord, self).__init__(**kwargs) + self.ipv4_address = kwargs.get('ipv4_address', None) + + +class CloudError(Model): + """An error response from the service. + + :param error: Cloud error body. + :type error: ~azure.mgmt.privatedns.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.privatedns.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class CnameRecord(Model): + """A CNAME record. + + :param cname: The canonical name for this CNAME record. + :type cname: str + """ + + _attribute_map = { + 'cname': {'key': 'cname', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CnameRecord, self).__init__(**kwargs) + self.cname = kwargs.get('cname', None) + + +class MxRecord(Model): + """An MX record. + + :param preference: The preference value for this MX record. + :type preference: int + :param exchange: The domain name of the mail host for this MX record. + :type exchange: str + """ + + _attribute_map = { + 'preference': {'key': 'preference', 'type': 'int'}, + 'exchange': {'key': 'exchange', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MxRecord, self).__init__(**kwargs) + self.preference = kwargs.get('preference', None) + self.exchange = kwargs.get('exchange', None) + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class PrivateZone(TrackedResource): + """Describes a Private DNS zone. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param etag: The ETag of the zone. + :type etag: str + :ivar max_number_of_record_sets: The maximum number of record sets that + can be created in this Private DNS zone. This is a read-only property and + any attempt to set this value will be ignored. + :vartype max_number_of_record_sets: long + :ivar number_of_record_sets: The current number of record sets in this + Private DNS zone. This is a read-only property and any attempt to set this + value will be ignored. + :vartype number_of_record_sets: long + :ivar max_number_of_virtual_network_links: The maximum number of virtual + networks that can be linked to this Private DNS zone. This is a read-only + property and any attempt to set this value will be ignored. + :vartype max_number_of_virtual_network_links: long + :ivar number_of_virtual_network_links: The current number of virtual + networks that are linked to this Private DNS zone. This is a read-only + property and any attempt to set this value will be ignored. + :vartype number_of_virtual_network_links: long + :ivar max_number_of_virtual_network_links_with_registration: The maximum + number of virtual networks that can be linked to this Private DNS zone + with registration enabled. This is a read-only property and any attempt to + set this value will be ignored. + :vartype max_number_of_virtual_network_links_with_registration: long + :ivar number_of_virtual_network_links_with_registration: The current + number of virtual networks that are linked to this Private DNS zone with + registration enabled. This is a read-only property and any attempt to set + this value will be ignored. + :vartype number_of_virtual_network_links_with_registration: long + :ivar provisioning_state: The provisioning state of the resource. This is + a read-only property and any attempt to set this value will be ignored. + Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.privatedns.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'max_number_of_record_sets': {'readonly': True}, + 'number_of_record_sets': {'readonly': True}, + 'max_number_of_virtual_network_links': {'readonly': True}, + 'number_of_virtual_network_links': {'readonly': True}, + 'max_number_of_virtual_network_links_with_registration': {'readonly': True}, + 'number_of_virtual_network_links_with_registration': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'max_number_of_record_sets': {'key': 'properties.maxNumberOfRecordSets', 'type': 'long'}, + 'number_of_record_sets': {'key': 'properties.numberOfRecordSets', 'type': 'long'}, + 'max_number_of_virtual_network_links': {'key': 'properties.maxNumberOfVirtualNetworkLinks', 'type': 'long'}, + 'number_of_virtual_network_links': {'key': 'properties.numberOfVirtualNetworkLinks', 'type': 'long'}, + 'max_number_of_virtual_network_links_with_registration': {'key': 'properties.maxNumberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, + 'number_of_virtual_network_links_with_registration': {'key': 'properties.numberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateZone, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.max_number_of_record_sets = None + self.number_of_record_sets = None + self.max_number_of_virtual_network_links = None + self.number_of_virtual_network_links = None + self.max_number_of_virtual_network_links_with_registration = None + self.number_of_virtual_network_links_with_registration = None + self.provisioning_state = None + + +class ProxyResource(Resource): + """The resource model definition for an ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class PtrRecord(Model): + """A PTR record. + + :param ptrdname: The PTR target domain name for this PTR record. + :type ptrdname: str + """ + + _attribute_map = { + 'ptrdname': {'key': 'ptrdname', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PtrRecord, self).__init__(**kwargs) + self.ptrdname = kwargs.get('ptrdname', None) + + +class RecordSet(ProxyResource): + """Describes a DNS record set (a collection of DNS records with the same name + and type) in a Private DNS zone. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param etag: The ETag of the record set. + :type etag: str + :param metadata: The metadata attached to the record set. + :type metadata: dict[str, str] + :param ttl: The TTL (time-to-live) of the records in the record set. + :type ttl: long + :ivar fqdn: Fully qualified domain name of the record set. + :vartype fqdn: str + :ivar is_auto_registered: Is the record set auto-registered in the Private + DNS zone through a virtual network link? + :vartype is_auto_registered: bool + :param a_records: The list of A records in the record set. + :type a_records: list[~azure.mgmt.privatedns.models.ARecord] + :param aaaa_records: The list of AAAA records in the record set. + :type aaaa_records: list[~azure.mgmt.privatedns.models.AaaaRecord] + :param cname_record: The CNAME record in the record set. + :type cname_record: ~azure.mgmt.privatedns.models.CnameRecord + :param mx_records: The list of MX records in the record set. + :type mx_records: list[~azure.mgmt.privatedns.models.MxRecord] + :param ptr_records: The list of PTR records in the record set. + :type ptr_records: list[~azure.mgmt.privatedns.models.PtrRecord] + :param soa_record: The SOA record in the record set. + :type soa_record: ~azure.mgmt.privatedns.models.SoaRecord + :param srv_records: The list of SRV records in the record set. + :type srv_records: list[~azure.mgmt.privatedns.models.SrvRecord] + :param txt_records: The list of TXT records in the record set. + :type txt_records: list[~azure.mgmt.privatedns.models.TxtRecord] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'is_auto_registered': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'ttl': {'key': 'properties.ttl', 'type': 'long'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'is_auto_registered': {'key': 'properties.isAutoRegistered', 'type': 'bool'}, + 'a_records': {'key': 'properties.aRecords', 'type': '[ARecord]'}, + 'aaaa_records': {'key': 'properties.aaaaRecords', 'type': '[AaaaRecord]'}, + 'cname_record': {'key': 'properties.cnameRecord', 'type': 'CnameRecord'}, + 'mx_records': {'key': 'properties.mxRecords', 'type': '[MxRecord]'}, + 'ptr_records': {'key': 'properties.ptrRecords', 'type': '[PtrRecord]'}, + 'soa_record': {'key': 'properties.soaRecord', 'type': 'SoaRecord'}, + 'srv_records': {'key': 'properties.srvRecords', 'type': '[SrvRecord]'}, + 'txt_records': {'key': 'properties.txtRecords', 'type': '[TxtRecord]'}, + } + + def __init__(self, **kwargs): + super(RecordSet, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.metadata = kwargs.get('metadata', None) + self.ttl = kwargs.get('ttl', None) + self.fqdn = None + self.is_auto_registered = None + self.a_records = kwargs.get('a_records', None) + self.aaaa_records = kwargs.get('aaaa_records', None) + self.cname_record = kwargs.get('cname_record', None) + self.mx_records = kwargs.get('mx_records', None) + self.ptr_records = kwargs.get('ptr_records', None) + self.soa_record = kwargs.get('soa_record', None) + self.srv_records = kwargs.get('srv_records', None) + self.txt_records = kwargs.get('txt_records', None) + + +class SoaRecord(Model): + """An SOA record. + + :param host: The domain name of the authoritative name server for this SOA + record. + :type host: str + :param email: The email contact for this SOA record. + :type email: str + :param serial_number: The serial number for this SOA record. + :type serial_number: long + :param refresh_time: The refresh value for this SOA record. + :type refresh_time: long + :param retry_time: The retry time for this SOA record. + :type retry_time: long + :param expire_time: The expire time for this SOA record. + :type expire_time: long + :param minimum_ttl: The minimum value for this SOA record. By convention + this is used to determine the negative caching duration. + :type minimum_ttl: long + """ + + _attribute_map = { + 'host': {'key': 'host', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + 'serial_number': {'key': 'serialNumber', 'type': 'long'}, + 'refresh_time': {'key': 'refreshTime', 'type': 'long'}, + 'retry_time': {'key': 'retryTime', 'type': 'long'}, + 'expire_time': {'key': 'expireTime', 'type': 'long'}, + 'minimum_ttl': {'key': 'minimumTtl', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(SoaRecord, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.email = kwargs.get('email', None) + self.serial_number = kwargs.get('serial_number', None) + self.refresh_time = kwargs.get('refresh_time', None) + self.retry_time = kwargs.get('retry_time', None) + self.expire_time = kwargs.get('expire_time', None) + self.minimum_ttl = kwargs.get('minimum_ttl', None) + + +class SrvRecord(Model): + """An SRV record. + + :param priority: The priority value for this SRV record. + :type priority: int + :param weight: The weight value for this SRV record. + :type weight: int + :param port: The port value for this SRV record. + :type port: int + :param target: The target domain name for this SRV record. + :type target: str + """ + + _attribute_map = { + 'priority': {'key': 'priority', 'type': 'int'}, + 'weight': {'key': 'weight', 'type': 'int'}, + 'port': {'key': 'port', 'type': 'int'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SrvRecord, self).__init__(**kwargs) + self.priority = kwargs.get('priority', None) + self.weight = kwargs.get('weight', None) + self.port = kwargs.get('port', None) + self.target = kwargs.get('target', None) + + +class SubResource(Model): + """Reference to another subresource. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class TxtRecord(Model): + """A TXT record. + + :param value: The text value of this TXT record. + :type value: list[str] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(TxtRecord, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualNetworkLink(TrackedResource): + """Describes a link to virtual network for a Private DNS zone. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param etag: The ETag of the virtual network link. + :type etag: str + :param virtual_network: The reference of the virtual network. + :type virtual_network: ~azure.mgmt.privatedns.models.SubResource + :param registration_enabled: Is auto-registration of virtual machine + records in the virtual network in the Private DNS zone enabled? + :type registration_enabled: bool + :ivar virtual_network_link_state: The status of the virtual network link + to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This + is a read-only property and any attempt to set this value will be ignored. + Possible values include: 'InProgress', 'Completed' + :vartype virtual_network_link_state: str or + ~azure.mgmt.privatedns.models.VirtualNetworkLinkState + :ivar provisioning_state: The provisioning state of the resource. This is + a read-only property and any attempt to set this value will be ignored. + Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.privatedns.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_link_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'registration_enabled': {'key': 'properties.registrationEnabled', 'type': 'bool'}, + 'virtual_network_link_state': {'key': 'properties.virtualNetworkLinkState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkLink, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.virtual_network = kwargs.get('virtual_network', None) + self.registration_enabled = kwargs.get('registration_enabled', None) + self.virtual_network_link_state = None + self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models_py3.py new file mode 100644 index 000000000000..691ef8867e66 --- /dev/null +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_models_py3.py @@ -0,0 +1,617 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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 Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AaaaRecord(Model): + """An AAAA record. + + :param ipv6_address: The IPv6 address of this AAAA record. + :type ipv6_address: str + """ + + _attribute_map = { + 'ipv6_address': {'key': 'ipv6Address', 'type': 'str'}, + } + + def __init__(self, *, ipv6_address: str=None, **kwargs) -> None: + super(AaaaRecord, self).__init__(**kwargs) + self.ipv6_address = ipv6_address + + +class ARecord(Model): + """An A record. + + :param ipv4_address: The IPv4 address of this A record. + :type ipv4_address: str + """ + + _attribute_map = { + 'ipv4_address': {'key': 'ipv4Address', 'type': 'str'}, + } + + def __init__(self, *, ipv4_address: str=None, **kwargs) -> None: + super(ARecord, self).__init__(**kwargs) + self.ipv4_address = ipv4_address + + +class CloudError(Model): + """An error response from the service. + + :param error: Cloud error body. + :type error: ~azure.mgmt.privatedns.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.privatedns.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class CnameRecord(Model): + """A CNAME record. + + :param cname: The canonical name for this CNAME record. + :type cname: str + """ + + _attribute_map = { + 'cname': {'key': 'cname', 'type': 'str'}, + } + + def __init__(self, *, cname: str=None, **kwargs) -> None: + super(CnameRecord, self).__init__(**kwargs) + self.cname = cname + + +class MxRecord(Model): + """An MX record. + + :param preference: The preference value for this MX record. + :type preference: int + :param exchange: The domain name of the mail host for this MX record. + :type exchange: str + """ + + _attribute_map = { + 'preference': {'key': 'preference', 'type': 'int'}, + 'exchange': {'key': 'exchange', 'type': 'str'}, + } + + def __init__(self, *, preference: int=None, exchange: str=None, **kwargs) -> None: + super(MxRecord, self).__init__(**kwargs) + self.preference = preference + self.exchange = exchange + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class PrivateZone(TrackedResource): + """Describes a Private DNS zone. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param etag: The ETag of the zone. + :type etag: str + :ivar max_number_of_record_sets: The maximum number of record sets that + can be created in this Private DNS zone. This is a read-only property and + any attempt to set this value will be ignored. + :vartype max_number_of_record_sets: long + :ivar number_of_record_sets: The current number of record sets in this + Private DNS zone. This is a read-only property and any attempt to set this + value will be ignored. + :vartype number_of_record_sets: long + :ivar max_number_of_virtual_network_links: The maximum number of virtual + networks that can be linked to this Private DNS zone. This is a read-only + property and any attempt to set this value will be ignored. + :vartype max_number_of_virtual_network_links: long + :ivar number_of_virtual_network_links: The current number of virtual + networks that are linked to this Private DNS zone. This is a read-only + property and any attempt to set this value will be ignored. + :vartype number_of_virtual_network_links: long + :ivar max_number_of_virtual_network_links_with_registration: The maximum + number of virtual networks that can be linked to this Private DNS zone + with registration enabled. This is a read-only property and any attempt to + set this value will be ignored. + :vartype max_number_of_virtual_network_links_with_registration: long + :ivar number_of_virtual_network_links_with_registration: The current + number of virtual networks that are linked to this Private DNS zone with + registration enabled. This is a read-only property and any attempt to set + this value will be ignored. + :vartype number_of_virtual_network_links_with_registration: long + :ivar provisioning_state: The provisioning state of the resource. This is + a read-only property and any attempt to set this value will be ignored. + Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.privatedns.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'max_number_of_record_sets': {'readonly': True}, + 'number_of_record_sets': {'readonly': True}, + 'max_number_of_virtual_network_links': {'readonly': True}, + 'number_of_virtual_network_links': {'readonly': True}, + 'max_number_of_virtual_network_links_with_registration': {'readonly': True}, + 'number_of_virtual_network_links_with_registration': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'max_number_of_record_sets': {'key': 'properties.maxNumberOfRecordSets', 'type': 'long'}, + 'number_of_record_sets': {'key': 'properties.numberOfRecordSets', 'type': 'long'}, + 'max_number_of_virtual_network_links': {'key': 'properties.maxNumberOfVirtualNetworkLinks', 'type': 'long'}, + 'number_of_virtual_network_links': {'key': 'properties.numberOfVirtualNetworkLinks', 'type': 'long'}, + 'max_number_of_virtual_network_links_with_registration': {'key': 'properties.maxNumberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, + 'number_of_virtual_network_links_with_registration': {'key': 'properties.numberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, etag: str=None, **kwargs) -> None: + super(PrivateZone, self).__init__(tags=tags, location=location, **kwargs) + self.etag = etag + self.max_number_of_record_sets = None + self.number_of_record_sets = None + self.max_number_of_virtual_network_links = None + self.number_of_virtual_network_links = None + self.max_number_of_virtual_network_links_with_registration = None + self.number_of_virtual_network_links_with_registration = None + self.provisioning_state = None + + +class ProxyResource(Resource): + """The resource model definition for an ARM proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class PtrRecord(Model): + """A PTR record. + + :param ptrdname: The PTR target domain name for this PTR record. + :type ptrdname: str + """ + + _attribute_map = { + 'ptrdname': {'key': 'ptrdname', 'type': 'str'}, + } + + def __init__(self, *, ptrdname: str=None, **kwargs) -> None: + super(PtrRecord, self).__init__(**kwargs) + self.ptrdname = ptrdname + + +class RecordSet(ProxyResource): + """Describes a DNS record set (a collection of DNS records with the same name + and type) in a Private DNS zone. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param etag: The ETag of the record set. + :type etag: str + :param metadata: The metadata attached to the record set. + :type metadata: dict[str, str] + :param ttl: The TTL (time-to-live) of the records in the record set. + :type ttl: long + :ivar fqdn: Fully qualified domain name of the record set. + :vartype fqdn: str + :ivar is_auto_registered: Is the record set auto-registered in the Private + DNS zone through a virtual network link? + :vartype is_auto_registered: bool + :param a_records: The list of A records in the record set. + :type a_records: list[~azure.mgmt.privatedns.models.ARecord] + :param aaaa_records: The list of AAAA records in the record set. + :type aaaa_records: list[~azure.mgmt.privatedns.models.AaaaRecord] + :param cname_record: The CNAME record in the record set. + :type cname_record: ~azure.mgmt.privatedns.models.CnameRecord + :param mx_records: The list of MX records in the record set. + :type mx_records: list[~azure.mgmt.privatedns.models.MxRecord] + :param ptr_records: The list of PTR records in the record set. + :type ptr_records: list[~azure.mgmt.privatedns.models.PtrRecord] + :param soa_record: The SOA record in the record set. + :type soa_record: ~azure.mgmt.privatedns.models.SoaRecord + :param srv_records: The list of SRV records in the record set. + :type srv_records: list[~azure.mgmt.privatedns.models.SrvRecord] + :param txt_records: The list of TXT records in the record set. + :type txt_records: list[~azure.mgmt.privatedns.models.TxtRecord] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'is_auto_registered': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'ttl': {'key': 'properties.ttl', 'type': 'long'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'is_auto_registered': {'key': 'properties.isAutoRegistered', 'type': 'bool'}, + 'a_records': {'key': 'properties.aRecords', 'type': '[ARecord]'}, + 'aaaa_records': {'key': 'properties.aaaaRecords', 'type': '[AaaaRecord]'}, + 'cname_record': {'key': 'properties.cnameRecord', 'type': 'CnameRecord'}, + 'mx_records': {'key': 'properties.mxRecords', 'type': '[MxRecord]'}, + 'ptr_records': {'key': 'properties.ptrRecords', 'type': '[PtrRecord]'}, + 'soa_record': {'key': 'properties.soaRecord', 'type': 'SoaRecord'}, + 'srv_records': {'key': 'properties.srvRecords', 'type': '[SrvRecord]'}, + 'txt_records': {'key': 'properties.txtRecords', 'type': '[TxtRecord]'}, + } + + def __init__(self, *, etag: str=None, metadata=None, ttl: int=None, a_records=None, aaaa_records=None, cname_record=None, mx_records=None, ptr_records=None, soa_record=None, srv_records=None, txt_records=None, **kwargs) -> None: + super(RecordSet, self).__init__(**kwargs) + self.etag = etag + self.metadata = metadata + self.ttl = ttl + self.fqdn = None + self.is_auto_registered = None + self.a_records = a_records + self.aaaa_records = aaaa_records + self.cname_record = cname_record + self.mx_records = mx_records + self.ptr_records = ptr_records + self.soa_record = soa_record + self.srv_records = srv_records + self.txt_records = txt_records + + +class SoaRecord(Model): + """An SOA record. + + :param host: The domain name of the authoritative name server for this SOA + record. + :type host: str + :param email: The email contact for this SOA record. + :type email: str + :param serial_number: The serial number for this SOA record. + :type serial_number: long + :param refresh_time: The refresh value for this SOA record. + :type refresh_time: long + :param retry_time: The retry time for this SOA record. + :type retry_time: long + :param expire_time: The expire time for this SOA record. + :type expire_time: long + :param minimum_ttl: The minimum value for this SOA record. By convention + this is used to determine the negative caching duration. + :type minimum_ttl: long + """ + + _attribute_map = { + 'host': {'key': 'host', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + 'serial_number': {'key': 'serialNumber', 'type': 'long'}, + 'refresh_time': {'key': 'refreshTime', 'type': 'long'}, + 'retry_time': {'key': 'retryTime', 'type': 'long'}, + 'expire_time': {'key': 'expireTime', 'type': 'long'}, + 'minimum_ttl': {'key': 'minimumTtl', 'type': 'long'}, + } + + def __init__(self, *, host: str=None, email: str=None, serial_number: int=None, refresh_time: int=None, retry_time: int=None, expire_time: int=None, minimum_ttl: int=None, **kwargs) -> None: + super(SoaRecord, self).__init__(**kwargs) + self.host = host + self.email = email + self.serial_number = serial_number + self.refresh_time = refresh_time + self.retry_time = retry_time + self.expire_time = expire_time + self.minimum_ttl = minimum_ttl + + +class SrvRecord(Model): + """An SRV record. + + :param priority: The priority value for this SRV record. + :type priority: int + :param weight: The weight value for this SRV record. + :type weight: int + :param port: The port value for this SRV record. + :type port: int + :param target: The target domain name for this SRV record. + :type target: str + """ + + _attribute_map = { + 'priority': {'key': 'priority', 'type': 'int'}, + 'weight': {'key': 'weight', 'type': 'int'}, + 'port': {'key': 'port', 'type': 'int'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, *, priority: int=None, weight: int=None, port: int=None, target: str=None, **kwargs) -> None: + super(SrvRecord, self).__init__(**kwargs) + self.priority = priority + self.weight = weight + self.port = port + self.target = target + + +class SubResource(Model): + """Reference to another subresource. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class TxtRecord(Model): + """A TXT record. + + :param value: The text value of this TXT record. + :type value: list[str] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(TxtRecord, self).__init__(**kwargs) + self.value = value + + +class VirtualNetworkLink(TrackedResource): + """Describes a link to virtual network for a Private DNS zone. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Example - + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Example - + 'Microsoft.Network/privateDnsZones'. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param etag: The ETag of the virtual network link. + :type etag: str + :param virtual_network: The reference of the virtual network. + :type virtual_network: ~azure.mgmt.privatedns.models.SubResource + :param registration_enabled: Is auto-registration of virtual machine + records in the virtual network in the Private DNS zone enabled? + :type registration_enabled: bool + :ivar virtual_network_link_state: The status of the virtual network link + to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This + is a read-only property and any attempt to set this value will be ignored. + Possible values include: 'InProgress', 'Completed' + :vartype virtual_network_link_state: str or + ~azure.mgmt.privatedns.models.VirtualNetworkLinkState + :ivar provisioning_state: The provisioning state of the resource. This is + a read-only property and any attempt to set this value will be ignored. + Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.privatedns.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_link_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'registration_enabled': {'key': 'properties.registrationEnabled', 'type': 'bool'}, + 'virtual_network_link_state': {'key': 'properties.virtualNetworkLinkState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, etag: str=None, virtual_network=None, registration_enabled: bool=None, **kwargs) -> None: + super(VirtualNetworkLink, self).__init__(tags=tags, location=location, **kwargs) + self.etag = etag + self.virtual_network = virtual_network + self.registration_enabled = registration_enabled + self.virtual_network_link_state = None + self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link_paged.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_paged_models.py similarity index 53% rename from sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link_paged.py rename to sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_paged_models.py index f177aa02de5b..12293702227a 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link_paged.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_paged_models.py @@ -12,6 +12,19 @@ from msrest.paging import Paged +class PrivateZonePaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateZone ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateZone]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateZonePaged, self).__init__(*args, **kwargs) class VirtualNetworkLinkPaged(Paged): """ A paging container for iterating over a list of :class:`VirtualNetworkLink ` object @@ -25,3 +38,16 @@ class VirtualNetworkLinkPaged(Paged): def __init__(self, *args, **kwargs): super(VirtualNetworkLinkPaged, self).__init__(*args, **kwargs) +class RecordSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecordSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecordSet]'} + } + + def __init__(self, *args, **kwargs): + + super(RecordSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_dns_management_client_enums.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_private_dns_management_client_enums.py similarity index 100% rename from sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_dns_management_client_enums.py rename to sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_private_dns_management_client_enums.py diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record.py deleted file mode 100644 index 4f4b45183a80..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AaaaRecord(Model): - """An AAAA record. - - :param ipv6_address: The IPv6 address of this AAAA record. - :type ipv6_address: str - """ - - _attribute_map = { - 'ipv6_address': {'key': 'ipv6Address', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AaaaRecord, self).__init__(**kwargs) - self.ipv6_address = kwargs.get('ipv6_address', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record_py3.py deleted file mode 100644 index 2cd662761ff9..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/aaaa_record_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AaaaRecord(Model): - """An AAAA record. - - :param ipv6_address: The IPv6 address of this AAAA record. - :type ipv6_address: str - """ - - _attribute_map = { - 'ipv6_address': {'key': 'ipv6Address', 'type': 'str'}, - } - - def __init__(self, *, ipv6_address: str=None, **kwargs) -> None: - super(AaaaRecord, self).__init__(**kwargs) - self.ipv6_address = ipv6_address diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord.py deleted file mode 100644 index 7172ccbb9011..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ARecord(Model): - """An A record. - - :param ipv4_address: The IPv4 address of this A record. - :type ipv4_address: str - """ - - _attribute_map = { - 'ipv4_address': {'key': 'ipv4Address', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ARecord, self).__init__(**kwargs) - self.ipv4_address = kwargs.get('ipv4_address', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord_py3.py deleted file mode 100644 index d38c7f033aae..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/arecord_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ARecord(Model): - """An A record. - - :param ipv4_address: The IPv4 address of this A record. - :type ipv4_address: str - """ - - _attribute_map = { - 'ipv4_address': {'key': 'ipv4Address', 'type': 'str'}, - } - - def __init__(self, *, ipv4_address: str=None, **kwargs) -> None: - super(ARecord, self).__init__(**kwargs) - self.ipv4_address = ipv4_address diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record.py deleted file mode 100644 index 3812539e3504..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CnameRecord(Model): - """A CNAME record. - - :param cname: The canonical name for this CNAME record. - :type cname: str - """ - - _attribute_map = { - 'cname': {'key': 'cname', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CnameRecord, self).__init__(**kwargs) - self.cname = kwargs.get('cname', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record_py3.py deleted file mode 100644 index 903f7071d615..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/cname_record_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CnameRecord(Model): - """A CNAME record. - - :param cname: The canonical name for this CNAME record. - :type cname: str - """ - - _attribute_map = { - 'cname': {'key': 'cname', 'type': 'str'}, - } - - def __init__(self, *, cname: str=None, **kwargs) -> None: - super(CnameRecord, self).__init__(**kwargs) - self.cname = cname diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record.py deleted file mode 100644 index 8027663c4de5..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MxRecord(Model): - """An MX record. - - :param preference: The preference value for this MX record. - :type preference: int - :param exchange: The domain name of the mail host for this MX record. - :type exchange: str - """ - - _attribute_map = { - 'preference': {'key': 'preference', 'type': 'int'}, - 'exchange': {'key': 'exchange', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MxRecord, self).__init__(**kwargs) - self.preference = kwargs.get('preference', None) - self.exchange = kwargs.get('exchange', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record_py3.py deleted file mode 100644 index 6476cd65eb3a..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/mx_record_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MxRecord(Model): - """An MX record. - - :param preference: The preference value for this MX record. - :type preference: int - :param exchange: The domain name of the mail host for this MX record. - :type exchange: str - """ - - _attribute_map = { - 'preference': {'key': 'preference', 'type': 'int'}, - 'exchange': {'key': 'exchange', 'type': 'str'}, - } - - def __init__(self, *, preference: int=None, exchange: str=None, **kwargs) -> None: - super(MxRecord, self).__init__(**kwargs) - self.preference = preference - self.exchange = exchange diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone.py deleted file mode 100644 index da6f7358ef27..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class PrivateZone(TrackedResource): - """Describes a Private DNS zone. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The Azure Region where the resource lives - :type location: str - :param etag: The ETag of the zone. - :type etag: str - :ivar max_number_of_record_sets: The maximum number of record sets that - can be created in this Private DNS zone. This is a read-only property and - any attempt to set this value will be ignored. - :vartype max_number_of_record_sets: long - :ivar number_of_record_sets: The current number of record sets in this - Private DNS zone. This is a read-only property and any attempt to set this - value will be ignored. - :vartype number_of_record_sets: long - :ivar max_number_of_virtual_network_links: The maximum number of virtual - networks that can be linked to this Private DNS zone. This is a read-only - property and any attempt to set this value will be ignored. - :vartype max_number_of_virtual_network_links: long - :ivar number_of_virtual_network_links: The current number of virtual - networks that are linked to this Private DNS zone. This is a read-only - property and any attempt to set this value will be ignored. - :vartype number_of_virtual_network_links: long - :ivar max_number_of_virtual_network_links_with_registration: The maximum - number of virtual networks that can be linked to this Private DNS zone - with registration enabled. This is a read-only property and any attempt to - set this value will be ignored. - :vartype max_number_of_virtual_network_links_with_registration: long - :ivar number_of_virtual_network_links_with_registration: The current - number of virtual networks that are linked to this Private DNS zone with - registration enabled. This is a read-only property and any attempt to set - this value will be ignored. - :vartype number_of_virtual_network_links_with_registration: long - :ivar provisioning_state: The provisioning state of the resource. This is - a read-only property and any attempt to set this value will be ignored. - Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.privatedns.models.ProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'max_number_of_record_sets': {'readonly': True}, - 'number_of_record_sets': {'readonly': True}, - 'max_number_of_virtual_network_links': {'readonly': True}, - 'number_of_virtual_network_links': {'readonly': True}, - 'max_number_of_virtual_network_links_with_registration': {'readonly': True}, - 'number_of_virtual_network_links_with_registration': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'max_number_of_record_sets': {'key': 'properties.maxNumberOfRecordSets', 'type': 'long'}, - 'number_of_record_sets': {'key': 'properties.numberOfRecordSets', 'type': 'long'}, - 'max_number_of_virtual_network_links': {'key': 'properties.maxNumberOfVirtualNetworkLinks', 'type': 'long'}, - 'number_of_virtual_network_links': {'key': 'properties.numberOfVirtualNetworkLinks', 'type': 'long'}, - 'max_number_of_virtual_network_links_with_registration': {'key': 'properties.maxNumberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, - 'number_of_virtual_network_links_with_registration': {'key': 'properties.numberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateZone, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.max_number_of_record_sets = None - self.number_of_record_sets = None - self.max_number_of_virtual_network_links = None - self.number_of_virtual_network_links = None - self.max_number_of_virtual_network_links_with_registration = None - self.number_of_virtual_network_links_with_registration = None - self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_paged.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_paged.py deleted file mode 100644 index 21259ee5efcf..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PrivateZonePaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateZone ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateZone]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateZonePaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_py3.py deleted file mode 100644 index ca01b305e8b7..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/private_zone_py3.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class PrivateZone(TrackedResource): - """Describes a Private DNS zone. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The Azure Region where the resource lives - :type location: str - :param etag: The ETag of the zone. - :type etag: str - :ivar max_number_of_record_sets: The maximum number of record sets that - can be created in this Private DNS zone. This is a read-only property and - any attempt to set this value will be ignored. - :vartype max_number_of_record_sets: long - :ivar number_of_record_sets: The current number of record sets in this - Private DNS zone. This is a read-only property and any attempt to set this - value will be ignored. - :vartype number_of_record_sets: long - :ivar max_number_of_virtual_network_links: The maximum number of virtual - networks that can be linked to this Private DNS zone. This is a read-only - property and any attempt to set this value will be ignored. - :vartype max_number_of_virtual_network_links: long - :ivar number_of_virtual_network_links: The current number of virtual - networks that are linked to this Private DNS zone. This is a read-only - property and any attempt to set this value will be ignored. - :vartype number_of_virtual_network_links: long - :ivar max_number_of_virtual_network_links_with_registration: The maximum - number of virtual networks that can be linked to this Private DNS zone - with registration enabled. This is a read-only property and any attempt to - set this value will be ignored. - :vartype max_number_of_virtual_network_links_with_registration: long - :ivar number_of_virtual_network_links_with_registration: The current - number of virtual networks that are linked to this Private DNS zone with - registration enabled. This is a read-only property and any attempt to set - this value will be ignored. - :vartype number_of_virtual_network_links_with_registration: long - :ivar provisioning_state: The provisioning state of the resource. This is - a read-only property and any attempt to set this value will be ignored. - Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.privatedns.models.ProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'max_number_of_record_sets': {'readonly': True}, - 'number_of_record_sets': {'readonly': True}, - 'max_number_of_virtual_network_links': {'readonly': True}, - 'number_of_virtual_network_links': {'readonly': True}, - 'max_number_of_virtual_network_links_with_registration': {'readonly': True}, - 'number_of_virtual_network_links_with_registration': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'max_number_of_record_sets': {'key': 'properties.maxNumberOfRecordSets', 'type': 'long'}, - 'number_of_record_sets': {'key': 'properties.numberOfRecordSets', 'type': 'long'}, - 'max_number_of_virtual_network_links': {'key': 'properties.maxNumberOfVirtualNetworkLinks', 'type': 'long'}, - 'number_of_virtual_network_links': {'key': 'properties.numberOfVirtualNetworkLinks', 'type': 'long'}, - 'max_number_of_virtual_network_links_with_registration': {'key': 'properties.maxNumberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, - 'number_of_virtual_network_links_with_registration': {'key': 'properties.numberOfVirtualNetworkLinksWithRegistration', 'type': 'long'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, location: str=None, etag: str=None, **kwargs) -> None: - super(PrivateZone, self).__init__(tags=tags, location=location, **kwargs) - self.etag = etag - self.max_number_of_record_sets = None - self.number_of_record_sets = None - self.max_number_of_virtual_network_links = None - self.number_of_virtual_network_links = None - self.max_number_of_virtual_network_links_with_registration = None - self.number_of_virtual_network_links_with_registration = None - self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource.py deleted file mode 100644 index 853224460eea..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """The resource model definition for an ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource_py3.py deleted file mode 100644 index e85909431e15..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/proxy_resource_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProxyResource(Resource): - """The resource model definition for an ARM proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record.py deleted file mode 100644 index 1b14721c9855..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PtrRecord(Model): - """A PTR record. - - :param ptrdname: The PTR target domain name for this PTR record. - :type ptrdname: str - """ - - _attribute_map = { - 'ptrdname': {'key': 'ptrdname', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PtrRecord, self).__init__(**kwargs) - self.ptrdname = kwargs.get('ptrdname', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record_py3.py deleted file mode 100644 index 523afce05a26..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/ptr_record_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PtrRecord(Model): - """A PTR record. - - :param ptrdname: The PTR target domain name for this PTR record. - :type ptrdname: str - """ - - _attribute_map = { - 'ptrdname': {'key': 'ptrdname', 'type': 'str'}, - } - - def __init__(self, *, ptrdname: str=None, **kwargs) -> None: - super(PtrRecord, self).__init__(**kwargs) - self.ptrdname = ptrdname diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set.py deleted file mode 100644 index e824e9459101..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class RecordSet(ProxyResource): - """Describes a DNS record set (a collection of DNS records with the same name - and type) in a Private DNS zone. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param etag: The ETag of the record set. - :type etag: str - :param metadata: The metadata attached to the record set. - :type metadata: dict[str, str] - :param ttl: The TTL (time-to-live) of the records in the record set. - :type ttl: long - :ivar fqdn: Fully qualified domain name of the record set. - :vartype fqdn: str - :ivar is_auto_registered: Is the record set auto-registered in the Private - DNS zone through a virtual network link? - :vartype is_auto_registered: bool - :param a_records: The list of A records in the record set. - :type a_records: list[~azure.mgmt.privatedns.models.ARecord] - :param aaaa_records: The list of AAAA records in the record set. - :type aaaa_records: list[~azure.mgmt.privatedns.models.AaaaRecord] - :param cname_record: The CNAME record in the record set. - :type cname_record: ~azure.mgmt.privatedns.models.CnameRecord - :param mx_records: The list of MX records in the record set. - :type mx_records: list[~azure.mgmt.privatedns.models.MxRecord] - :param ptr_records: The list of PTR records in the record set. - :type ptr_records: list[~azure.mgmt.privatedns.models.PtrRecord] - :param soa_record: The SOA record in the record set. - :type soa_record: ~azure.mgmt.privatedns.models.SoaRecord - :param srv_records: The list of SRV records in the record set. - :type srv_records: list[~azure.mgmt.privatedns.models.SrvRecord] - :param txt_records: The list of TXT records in the record set. - :type txt_records: list[~azure.mgmt.privatedns.models.TxtRecord] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'is_auto_registered': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, - 'ttl': {'key': 'properties.ttl', 'type': 'long'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'is_auto_registered': {'key': 'properties.isAutoRegistered', 'type': 'bool'}, - 'a_records': {'key': 'properties.aRecords', 'type': '[ARecord]'}, - 'aaaa_records': {'key': 'properties.aaaaRecords', 'type': '[AaaaRecord]'}, - 'cname_record': {'key': 'properties.cnameRecord', 'type': 'CnameRecord'}, - 'mx_records': {'key': 'properties.mxRecords', 'type': '[MxRecord]'}, - 'ptr_records': {'key': 'properties.ptrRecords', 'type': '[PtrRecord]'}, - 'soa_record': {'key': 'properties.soaRecord', 'type': 'SoaRecord'}, - 'srv_records': {'key': 'properties.srvRecords', 'type': '[SrvRecord]'}, - 'txt_records': {'key': 'properties.txtRecords', 'type': '[TxtRecord]'}, - } - - def __init__(self, **kwargs): - super(RecordSet, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.metadata = kwargs.get('metadata', None) - self.ttl = kwargs.get('ttl', None) - self.fqdn = None - self.is_auto_registered = None - self.a_records = kwargs.get('a_records', None) - self.aaaa_records = kwargs.get('aaaa_records', None) - self.cname_record = kwargs.get('cname_record', None) - self.mx_records = kwargs.get('mx_records', None) - self.ptr_records = kwargs.get('ptr_records', None) - self.soa_record = kwargs.get('soa_record', None) - self.srv_records = kwargs.get('srv_records', None) - self.txt_records = kwargs.get('txt_records', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_paged.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_paged.py deleted file mode 100644 index 3b7aa7ee307a..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RecordSetPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecordSet ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecordSet]'} - } - - def __init__(self, *args, **kwargs): - - super(RecordSetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_py3.py deleted file mode 100644 index b4c9b4431d7d..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/record_set_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class RecordSet(ProxyResource): - """Describes a DNS record set (a collection of DNS records with the same name - and type) in a Private DNS zone. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param etag: The ETag of the record set. - :type etag: str - :param metadata: The metadata attached to the record set. - :type metadata: dict[str, str] - :param ttl: The TTL (time-to-live) of the records in the record set. - :type ttl: long - :ivar fqdn: Fully qualified domain name of the record set. - :vartype fqdn: str - :ivar is_auto_registered: Is the record set auto-registered in the Private - DNS zone through a virtual network link? - :vartype is_auto_registered: bool - :param a_records: The list of A records in the record set. - :type a_records: list[~azure.mgmt.privatedns.models.ARecord] - :param aaaa_records: The list of AAAA records in the record set. - :type aaaa_records: list[~azure.mgmt.privatedns.models.AaaaRecord] - :param cname_record: The CNAME record in the record set. - :type cname_record: ~azure.mgmt.privatedns.models.CnameRecord - :param mx_records: The list of MX records in the record set. - :type mx_records: list[~azure.mgmt.privatedns.models.MxRecord] - :param ptr_records: The list of PTR records in the record set. - :type ptr_records: list[~azure.mgmt.privatedns.models.PtrRecord] - :param soa_record: The SOA record in the record set. - :type soa_record: ~azure.mgmt.privatedns.models.SoaRecord - :param srv_records: The list of SRV records in the record set. - :type srv_records: list[~azure.mgmt.privatedns.models.SrvRecord] - :param txt_records: The list of TXT records in the record set. - :type txt_records: list[~azure.mgmt.privatedns.models.TxtRecord] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'is_auto_registered': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, - 'ttl': {'key': 'properties.ttl', 'type': 'long'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'is_auto_registered': {'key': 'properties.isAutoRegistered', 'type': 'bool'}, - 'a_records': {'key': 'properties.aRecords', 'type': '[ARecord]'}, - 'aaaa_records': {'key': 'properties.aaaaRecords', 'type': '[AaaaRecord]'}, - 'cname_record': {'key': 'properties.cnameRecord', 'type': 'CnameRecord'}, - 'mx_records': {'key': 'properties.mxRecords', 'type': '[MxRecord]'}, - 'ptr_records': {'key': 'properties.ptrRecords', 'type': '[PtrRecord]'}, - 'soa_record': {'key': 'properties.soaRecord', 'type': 'SoaRecord'}, - 'srv_records': {'key': 'properties.srvRecords', 'type': '[SrvRecord]'}, - 'txt_records': {'key': 'properties.txtRecords', 'type': '[TxtRecord]'}, - } - - def __init__(self, *, etag: str=None, metadata=None, ttl: int=None, a_records=None, aaaa_records=None, cname_record=None, mx_records=None, ptr_records=None, soa_record=None, srv_records=None, txt_records=None, **kwargs) -> None: - super(RecordSet, self).__init__(**kwargs) - self.etag = etag - self.metadata = metadata - self.ttl = ttl - self.fqdn = None - self.is_auto_registered = None - self.a_records = a_records - self.aaaa_records = aaaa_records - self.cname_record = cname_record - self.mx_records = mx_records - self.ptr_records = ptr_records - self.soa_record = soa_record - self.srv_records = srv_records - self.txt_records = txt_records diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource.py deleted file mode 100644 index 002dca378d74..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource_py3.py deleted file mode 100644 index 0312e9e1bb53..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/resource_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record.py deleted file mode 100644 index 8f2dce742499..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SoaRecord(Model): - """An SOA record. - - :param host: The domain name of the authoritative name server for this SOA - record. - :type host: str - :param email: The email contact for this SOA record. - :type email: str - :param serial_number: The serial number for this SOA record. - :type serial_number: long - :param refresh_time: The refresh value for this SOA record. - :type refresh_time: long - :param retry_time: The retry time for this SOA record. - :type retry_time: long - :param expire_time: The expire time for this SOA record. - :type expire_time: long - :param minimum_ttl: The minimum value for this SOA record. By convention - this is used to determine the negative caching duration. - :type minimum_ttl: long - """ - - _attribute_map = { - 'host': {'key': 'host', 'type': 'str'}, - 'email': {'key': 'email', 'type': 'str'}, - 'serial_number': {'key': 'serialNumber', 'type': 'long'}, - 'refresh_time': {'key': 'refreshTime', 'type': 'long'}, - 'retry_time': {'key': 'retryTime', 'type': 'long'}, - 'expire_time': {'key': 'expireTime', 'type': 'long'}, - 'minimum_ttl': {'key': 'minimumTtl', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(SoaRecord, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.email = kwargs.get('email', None) - self.serial_number = kwargs.get('serial_number', None) - self.refresh_time = kwargs.get('refresh_time', None) - self.retry_time = kwargs.get('retry_time', None) - self.expire_time = kwargs.get('expire_time', None) - self.minimum_ttl = kwargs.get('minimum_ttl', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record_py3.py deleted file mode 100644 index c67060f17859..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/soa_record_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SoaRecord(Model): - """An SOA record. - - :param host: The domain name of the authoritative name server for this SOA - record. - :type host: str - :param email: The email contact for this SOA record. - :type email: str - :param serial_number: The serial number for this SOA record. - :type serial_number: long - :param refresh_time: The refresh value for this SOA record. - :type refresh_time: long - :param retry_time: The retry time for this SOA record. - :type retry_time: long - :param expire_time: The expire time for this SOA record. - :type expire_time: long - :param minimum_ttl: The minimum value for this SOA record. By convention - this is used to determine the negative caching duration. - :type minimum_ttl: long - """ - - _attribute_map = { - 'host': {'key': 'host', 'type': 'str'}, - 'email': {'key': 'email', 'type': 'str'}, - 'serial_number': {'key': 'serialNumber', 'type': 'long'}, - 'refresh_time': {'key': 'refreshTime', 'type': 'long'}, - 'retry_time': {'key': 'retryTime', 'type': 'long'}, - 'expire_time': {'key': 'expireTime', 'type': 'long'}, - 'minimum_ttl': {'key': 'minimumTtl', 'type': 'long'}, - } - - def __init__(self, *, host: str=None, email: str=None, serial_number: int=None, refresh_time: int=None, retry_time: int=None, expire_time: int=None, minimum_ttl: int=None, **kwargs) -> None: - super(SoaRecord, self).__init__(**kwargs) - self.host = host - self.email = email - self.serial_number = serial_number - self.refresh_time = refresh_time - self.retry_time = retry_time - self.expire_time = expire_time - self.minimum_ttl = minimum_ttl diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record.py deleted file mode 100644 index c7dc5fcdcbbd..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SrvRecord(Model): - """An SRV record. - - :param priority: The priority value for this SRV record. - :type priority: int - :param weight: The weight value for this SRV record. - :type weight: int - :param port: The port value for this SRV record. - :type port: int - :param target: The target domain name for this SRV record. - :type target: str - """ - - _attribute_map = { - 'priority': {'key': 'priority', 'type': 'int'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'port': {'key': 'port', 'type': 'int'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SrvRecord, self).__init__(**kwargs) - self.priority = kwargs.get('priority', None) - self.weight = kwargs.get('weight', None) - self.port = kwargs.get('port', None) - self.target = kwargs.get('target', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record_py3.py deleted file mode 100644 index 9a464f27cb09..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/srv_record_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SrvRecord(Model): - """An SRV record. - - :param priority: The priority value for this SRV record. - :type priority: int - :param weight: The weight value for this SRV record. - :type weight: int - :param port: The port value for this SRV record. - :type port: int - :param target: The target domain name for this SRV record. - :type target: str - """ - - _attribute_map = { - 'priority': {'key': 'priority', 'type': 'int'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'port': {'key': 'port', 'type': 'int'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, *, priority: int=None, weight: int=None, port: int=None, target: str=None, **kwargs) -> None: - super(SrvRecord, self).__init__(**kwargs) - self.priority = priority - self.weight = weight - self.port = port - self.target = target diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource.py deleted file mode 100644 index 6ab81f55f21b..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource_py3.py deleted file mode 100644 index 8f4c4c816061..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource.py deleted file mode 100644 index 4579dd469812..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The Azure Region where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource_py3.py deleted file mode 100644 index edbd77a08f35..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/tracked_resource_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The Azure Region where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, tags=None, location: str=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record.py deleted file mode 100644 index 472f1f22b5d3..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TxtRecord(Model): - """A TXT record. - - :param value: The text value of this TXT record. - :type value: list[str] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(TxtRecord, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record_py3.py deleted file mode 100644 index 4faef766e859..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/txt_record_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TxtRecord(Model): - """A TXT record. - - :param value: The text value of this TXT record. - :type value: list[str] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[str]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(TxtRecord, self).__init__(**kwargs) - self.value = value diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link.py deleted file mode 100644 index ea26327ae6b4..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class VirtualNetworkLink(TrackedResource): - """Describes a link to virtual network for a Private DNS zone. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The Azure Region where the resource lives - :type location: str - :param etag: The ETag of the virtual network link. - :type etag: str - :param virtual_network: The reference of the virtual network. - :type virtual_network: ~azure.mgmt.privatedns.models.SubResource - :param registration_enabled: Is auto-registration of virtual machine - records in the virtual network in the Private DNS zone enabled? - :type registration_enabled: bool - :ivar virtual_network_link_state: The status of the virtual network link - to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This - is a read-only property and any attempt to set this value will be ignored. - Possible values include: 'InProgress', 'Completed' - :vartype virtual_network_link_state: str or - ~azure.mgmt.privatedns.models.VirtualNetworkLinkState - :ivar provisioning_state: The provisioning state of the resource. This is - a read-only property and any attempt to set this value will be ignored. - Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.privatedns.models.ProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_link_state': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, - 'registration_enabled': {'key': 'properties.registrationEnabled', 'type': 'bool'}, - 'virtual_network_link_state': {'key': 'properties.virtualNetworkLinkState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkLink, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.virtual_network = kwargs.get('virtual_network', None) - self.registration_enabled = kwargs.get('registration_enabled', None) - self.virtual_network_link_state = None - self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link_py3.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link_py3.py deleted file mode 100644 index 39a8e713f67d..000000000000 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class VirtualNetworkLink(TrackedResource): - """Describes a link to virtual network for a Private DNS zone. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Example - - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Example - - 'Microsoft.Network/privateDnsZones'. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The Azure Region where the resource lives - :type location: str - :param etag: The ETag of the virtual network link. - :type etag: str - :param virtual_network: The reference of the virtual network. - :type virtual_network: ~azure.mgmt.privatedns.models.SubResource - :param registration_enabled: Is auto-registration of virtual machine - records in the virtual network in the Private DNS zone enabled? - :type registration_enabled: bool - :ivar virtual_network_link_state: The status of the virtual network link - to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This - is a read-only property and any attempt to set this value will be ignored. - Possible values include: 'InProgress', 'Completed' - :vartype virtual_network_link_state: str or - ~azure.mgmt.privatedns.models.VirtualNetworkLinkState - :ivar provisioning_state: The provisioning state of the resource. This is - a read-only property and any attempt to set this value will be ignored. - Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.privatedns.models.ProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_link_state': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, - 'registration_enabled': {'key': 'properties.registrationEnabled', 'type': 'bool'}, - 'virtual_network_link_state': {'key': 'properties.virtualNetworkLinkState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, tags=None, location: str=None, etag: str=None, virtual_network=None, registration_enabled: bool=None, **kwargs) -> None: - super(VirtualNetworkLink, self).__init__(tags=tags, location=location, **kwargs) - self.etag = etag - self.virtual_network = virtual_network - self.registration_enabled = registration_enabled - self.virtual_network_link_state = None - self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/__init__.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/__init__.py index bc3e85267d5b..fdee516a5908 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/__init__.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from .private_zones_operations import PrivateZonesOperations -from .virtual_network_links_operations import VirtualNetworkLinksOperations -from .record_sets_operations import RecordSetsOperations +from ._private_zones_operations import PrivateZonesOperations +from ._virtual_network_links_operations import VirtualNetworkLinksOperations +from ._record_sets_operations import RecordSetsOperations __all__ = [ 'PrivateZonesOperations', diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/private_zones_operations.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_private_zones_operations.py similarity index 97% rename from sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/private_zones_operations.py rename to sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_private_zones_operations.py index 826c7e981c0e..275cddc5f172 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/private_zones_operations.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_private_zones_operations.py @@ -21,6 +21,8 @@ class PrivateZonesOperations(object): """PrivateZonesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -409,7 +411,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateZone', response) @@ -437,8 +438,7 @@ def list( ~azure.mgmt.privatedns.models.PrivateZonePaged[~azure.mgmt.privatedns.models.PrivateZone] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -469,6 +469,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -479,12 +484,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PrivateZonePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PrivateZonePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PrivateZonePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateDnsZones'} @@ -508,8 +511,7 @@ def list_by_resource_group( ~azure.mgmt.privatedns.models.PrivateZonePaged[~azure.mgmt.privatedns.models.PrivateZone] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -541,6 +543,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -551,12 +558,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PrivateZonePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PrivateZonePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PrivateZonePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones'} diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/record_sets_operations.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_record_sets_operations.py similarity index 97% rename from sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/record_sets_operations.py rename to sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_record_sets_operations.py index 2410f80f7a8f..8d78d1032e0d 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/record_sets_operations.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_record_sets_operations.py @@ -19,6 +19,8 @@ class RecordSetsOperations(object): """RecordSetsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -118,7 +120,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecordSet', response) if response.status_code == 201: @@ -204,7 +205,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecordSet', response) @@ -347,7 +347,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RecordSet', response) @@ -388,8 +387,7 @@ def list_by_type( ~azure.mgmt.privatedns.models.RecordSetPaged[~azure.mgmt.privatedns.models.RecordSet] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_type.metadata['url'] @@ -425,6 +423,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -435,12 +438,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecordSetPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecordSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecordSetPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_type.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}'} @@ -472,8 +473,7 @@ def list( ~azure.mgmt.privatedns.models.RecordSetPaged[~azure.mgmt.privatedns.models.RecordSet] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -508,6 +508,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -518,12 +523,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RecordSetPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RecordSetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RecordSetPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/ALL'} diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/virtual_network_links_operations.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_virtual_network_links_operations.py similarity index 98% rename from sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/virtual_network_links_operations.py rename to sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_virtual_network_links_operations.py index 54f2ba7411b7..9a9e9b85b4f1 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/virtual_network_links_operations.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_virtual_network_links_operations.py @@ -21,6 +21,8 @@ class VirtualNetworkLinksOperations(object): """VirtualNetworkLinksOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -430,7 +432,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetworkLink', response) @@ -463,8 +464,7 @@ def list( ~azure.mgmt.privatedns.models.VirtualNetworkLinkPaged[~azure.mgmt.privatedns.models.VirtualNetworkLink] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -497,6 +497,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -507,12 +512,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkLinkPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkLinkPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks'}