Skip to content

Commit

Permalink
Generated from 11d3fee
Browse files Browse the repository at this point in the history
  • Loading branch information
SwaggerToSDK Automation committed Oct 12, 2017
1 parent 3ef9414 commit 681595e
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 218 deletions.
2 changes: 1 addition & 1 deletion azure-mgmt-dns/azure/mgmt/dns/dns_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2016-04-01'
self.api_version = '2017-09-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
8 changes: 2 additions & 6 deletions azure-mgmt-dns/azure/mgmt/dns/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@
from .txt_record import TxtRecord
from .cname_record import CnameRecord
from .soa_record import SoaRecord
from .caa_record import CaaRecord
from .record_set import RecordSet
from .record_set_update_parameters import RecordSetUpdateParameters
from .zone import Zone
from .zone_delete_result import ZoneDeleteResult
from .resource import Resource
from .record_set_paged import RecordSetPaged
from .zone_paged import ZonePaged
from .dns_management_client_enums import (
OperationStatus,
HttpStatusCode,
RecordType,
)

Expand All @@ -41,14 +39,12 @@
'TxtRecord',
'CnameRecord',
'SoaRecord',
'CaaRecord',
'RecordSet',
'RecordSetUpdateParameters',
'Zone',
'ZoneDeleteResult',
'Resource',
'RecordSetPaged',
'ZonePaged',
'OperationStatus',
'HttpStatusCode',
'RecordType',
]
36 changes: 36 additions & 0 deletions azure-mgmt-dns/azure/mgmt/dns/models/caa_record.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 CaaRecord(Model):
"""A CAA record.
:param flags: The flags for this CAA record as an integer between 0 and
255.
:type flags: int
:param tag: The tag for this CAA record.
:type tag: str
:param value: The value for this CAA record.
:type value: str
"""

_attribute_map = {
'flags': {'key': 'flags', 'type': 'int'},
'tag': {'key': 'tag', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, flags=None, tag=None, value=None):
self.flags = flags
self.tag = tag
self.value = value
Original file line number Diff line number Diff line change
Expand Up @@ -12,68 +12,11 @@
from enum import Enum


class OperationStatus(Enum):

in_progress = "InProgress"
succeeded = "Succeeded"
failed = "Failed"


class HttpStatusCode(Enum):

continue_enum = "Continue"
switching_protocols = "SwitchingProtocols"
ok = "OK"
created = "Created"
accepted = "Accepted"
non_authoritative_information = "NonAuthoritativeInformation"
no_content = "NoContent"
reset_content = "ResetContent"
partial_content = "PartialContent"
multiple_choices = "MultipleChoices"
ambiguous = "Ambiguous"
moved_permanently = "MovedPermanently"
moved = "Moved"
found = "Found"
redirect = "Redirect"
see_other = "SeeOther"
redirect_method = "RedirectMethod"
not_modified = "NotModified"
use_proxy = "UseProxy"
unused = "Unused"
temporary_redirect = "TemporaryRedirect"
redirect_keep_verb = "RedirectKeepVerb"
bad_request = "BadRequest"
unauthorized = "Unauthorized"
payment_required = "PaymentRequired"
forbidden = "Forbidden"
not_found = "NotFound"
method_not_allowed = "MethodNotAllowed"
not_acceptable = "NotAcceptable"
proxy_authentication_required = "ProxyAuthenticationRequired"
request_timeout = "RequestTimeout"
conflict = "Conflict"
gone = "Gone"
length_required = "LengthRequired"
precondition_failed = "PreconditionFailed"
request_entity_too_large = "RequestEntityTooLarge"
request_uri_too_long = "RequestUriTooLong"
unsupported_media_type = "UnsupportedMediaType"
requested_range_not_satisfiable = "RequestedRangeNotSatisfiable"
expectation_failed = "ExpectationFailed"
upgrade_required = "UpgradeRequired"
internal_server_error = "InternalServerError"
not_implemented = "NotImplemented"
bad_gateway = "BadGateway"
service_unavailable = "ServiceUnavailable"
gateway_timeout = "GatewayTimeout"
http_version_not_supported = "HttpVersionNotSupported"


class RecordType(Enum):

a = "A"
aaaa = "AAAA"
caa = "CAA"
cname = "CNAME"
mx = "MX"
ns = "NS"
Expand Down
38 changes: 28 additions & 10 deletions azure-mgmt-dns/azure/mgmt/dns/models/record_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ class RecordSet(Model):
"""Describes a DNS record set (a collection of DNS records with the same name
and type).
:param id: The ID of the record set.
:type id: str
:param name: The name of the record set.
:type name: str
:param type: The type of the record set.
:type type: str
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The ID of the record set.
:vartype id: str
:ivar name: The name of the record set.
:vartype name: str
:ivar type: The type of the record set.
: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
:param arecords: The list of A records in the record set.
:type arecords: list[~azure.mgmt.dns.models.ARecord]
:param aaaa_records: The list of AAAA records in the record set.
Expand All @@ -46,15 +51,25 @@ class RecordSet(Model):
:type cname_record: ~azure.mgmt.dns.models.CnameRecord
:param soa_record: The SOA record in the record set.
:type soa_record: ~azure.mgmt.dns.models.SoaRecord
:param caa_records: The list of CAA records in the record set.
:type caa_records: list[~azure.mgmt.dns.models.CaaRecord]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'fqdn': {'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'},
'arecords': {'key': 'properties.ARecords', 'type': '[ARecord]'},
'aaaa_records': {'key': 'properties.AAAARecords', 'type': '[AaaaRecord]'},
'mx_records': {'key': 'properties.MXRecords', 'type': '[MxRecord]'},
Expand All @@ -64,15 +79,17 @@ class RecordSet(Model):
'txt_records': {'key': 'properties.TXTRecords', 'type': '[TxtRecord]'},
'cname_record': {'key': 'properties.CNAMERecord', 'type': 'CnameRecord'},
'soa_record': {'key': 'properties.SOARecord', 'type': 'SoaRecord'},
'caa_records': {'key': 'properties.caaRecords', 'type': '[CaaRecord]'},
}

def __init__(self, id=None, name=None, type=None, etag=None, metadata=None, ttl=None, arecords=None, aaaa_records=None, mx_records=None, ns_records=None, ptr_records=None, srv_records=None, txt_records=None, cname_record=None, soa_record=None):
self.id = id
self.name = name
self.type = type
def __init__(self, etag=None, metadata=None, ttl=None, arecords=None, aaaa_records=None, mx_records=None, ns_records=None, ptr_records=None, srv_records=None, txt_records=None, cname_record=None, soa_record=None, caa_records=None):
self.id = None
self.name = None
self.type = None
self.etag = etag
self.metadata = metadata
self.ttl = ttl
self.fqdn = None
self.arecords = arecords
self.aaaa_records = aaaa_records
self.mx_records = mx_records
Expand All @@ -82,3 +99,4 @@ def __init__(self, id=None, name=None, type=None, etag=None, metadata=None, ttl=
self.txt_records = txt_records
self.cname_record = cname_record
self.soa_record = soa_record
self.caa_records = caa_records
2 changes: 1 addition & 1 deletion azure-mgmt-dns/azure/mgmt/dns/models/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class Resource(Model):
"""Resource.
"""Common properties of an Azure Resource Manager resource.
Variables are only populated by the server, and will be ignored when
sending a request.
Expand Down
20 changes: 11 additions & 9 deletions azure-mgmt-dns/azure/mgmt/dns/models/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class Zone(Resource):
:type tags: dict[str, str]
:param etag: The etag of the zone.
:type etag: str
:param max_number_of_record_sets: The maximum number of record sets that
:ivar max_number_of_record_sets: The maximum number of record sets that
can be created in this DNS zone. This is a read-only property and any
attempt to set this value will be ignored.
:type max_number_of_record_sets: long
:param number_of_record_sets: The current number of record sets in this
DNS zone. This is a read-only property and any attempt to set this value
will be ignored.
:type number_of_record_sets: long
:vartype max_number_of_record_sets: long
:ivar number_of_record_sets: The current number of record sets in this 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 name_servers: The name servers for this DNS zone. This is a
read-only property and any attempt to set this value will be ignored.
:vartype name_servers: list[str]
Expand All @@ -48,6 +48,8 @@ class Zone(Resource):
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'max_number_of_record_sets': {'readonly': True},
'number_of_record_sets': {'readonly': True},
'name_servers': {'readonly': True},
}

Expand All @@ -63,9 +65,9 @@ class Zone(Resource):
'name_servers': {'key': 'properties.nameServers', 'type': '[str]'},
}

def __init__(self, location, tags=None, etag=None, max_number_of_record_sets=None, number_of_record_sets=None):
def __init__(self, location, tags=None, etag=None):
super(Zone, self).__init__(location=location, tags=tags)
self.etag = etag
self.max_number_of_record_sets = max_number_of_record_sets
self.number_of_record_sets = number_of_record_sets
self.max_number_of_record_sets = None
self.number_of_record_sets = None
self.name_servers = None
54 changes: 0 additions & 54 deletions azure-mgmt-dns/azure/mgmt/dns/models/zone_delete_result.py

This file was deleted.

Loading

0 comments on commit 681595e

Please sign in to comment.