From 5c0cdf1b2bc3de0acfd72e233b5cba720a20e913 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 3 Jun 2019 14:23:19 -0700 Subject: [PATCH] Generated from aa0011a90349ff29e0113304a7b176273914b617 (#5622) chore: jsonfmt peering Ran `jsonfmt -w "specification/peering/**/*.json"` --- .../azure/mgmt/peering/__init__.py | 18 + .../azure/mgmt/peering/models/__init__.py | 109 +++++ .../azure/mgmt/peering/models/bgp_session.py | 90 ++++ .../mgmt/peering/models/bgp_session_py3.py | 90 ++++ .../azure/mgmt/peering/models/contact_info.py | 32 ++ .../mgmt/peering/models/contact_info_py3.py | 32 ++ .../mgmt/peering/models/direct_connection.py | 56 +++ .../peering/models/direct_connection_py3.py | 56 +++ .../peering/models/direct_peering_facility.py | 36 ++ .../models/direct_peering_facility_py3.py | 36 ++ .../mgmt/peering/models/error_response.py | 53 +++ .../mgmt/peering/models/error_response_py3.py | 53 +++ .../peering/models/exchange_connection.py | 47 ++ .../peering/models/exchange_connection_py3.py | 47 ++ .../models/exchange_peering_facility.py | 61 +++ .../models/exchange_peering_facility_py3.py | 61 +++ .../azure/mgmt/peering/models/operation.py | 46 ++ .../peering/models/operation_display_info.py | 50 +++ .../models/operation_display_info_py3.py | 50 +++ .../mgmt/peering/models/operation_paged.py | 27 ++ .../mgmt/peering/models/operation_py3.py | 46 ++ .../azure/mgmt/peering/models/peer_asn.py | 59 +++ .../mgmt/peering/models/peer_asn_paged.py | 27 ++ .../azure/mgmt/peering/models/peer_asn_py3.py | 59 +++ .../azure/mgmt/peering/models/peering.py | 85 ++++ .../peering/models/peering_bandwidth_offer.py | 32 ++ .../models/peering_bandwidth_offer_py3.py | 32 ++ .../mgmt/peering/models/peering_location.py | 70 +++ .../peering/models/peering_location_paged.py | 27 ++ .../peering_location_properties_direct.py | 36 ++ .../peering_location_properties_direct_py3.py | 36 ++ .../peering_location_properties_exchange.py | 30 ++ ...eering_location_properties_exchange_py3.py | 30 ++ .../peering/models/peering_location_py3.py | 70 +++ .../models/peering_management_client_enums.py | 101 +++++ .../mgmt/peering/models/peering_paged.py | 27 ++ .../models/peering_properties_direct.py | 38 ++ .../models/peering_properties_direct_py3.py | 38 ++ .../models/peering_properties_exchange.py | 33 ++ .../models/peering_properties_exchange_py3.py | 33 ++ .../azure/mgmt/peering/models/peering_py3.py | 85 ++++ .../azure/mgmt/peering/models/peering_sku.py | 45 ++ .../mgmt/peering/models/peering_sku_py3.py | 45 ++ .../azure/mgmt/peering/models/resource.py | 45 ++ .../azure/mgmt/peering/models/resource_py3.py | 45 ++ .../mgmt/peering/models/resource_tags.py | 28 ++ .../mgmt/peering/models/resource_tags_py3.py | 28 ++ .../azure/mgmt/peering/models/sub_resource.py | 28 ++ .../mgmt/peering/models/sub_resource_py3.py | 28 ++ .../azure/mgmt/peering/operations/__init__.py | 24 + .../operations/legacy_peerings_operations.py | 108 +++++ .../mgmt/peering/operations/operations.py | 96 ++++ .../operations/peer_asns_operations.py | 275 ++++++++++++ .../peering_locations_operations.py | 105 +++++ .../peering/operations/peerings_operations.py | 423 ++++++++++++++++++ .../mgmt/peering/peering_management_client.py | 101 +++++ .../azure/mgmt/peering/version.py | 13 + 57 files changed, 3481 insertions(+) create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/__init__.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/__init__.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_paged.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_paged.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_paged.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_management_client_enums.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_paged.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource_py3.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/operations/__init__.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/operations/legacy_peerings_operations.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/operations/operations.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peer_asns_operations.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peering_locations_operations.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peerings_operations.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/peering_management_client.py create mode 100644 sdk/azure-mgmt-peering/azure/mgmt/peering/version.py diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/__init__.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/__init__.py new file mode 100644 index 000000000000..db00e39e80c2 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/__init__.py @@ -0,0 +1,18 @@ +# 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 .peering_management_client import PeeringManagementClient +from .version import VERSION + +__all__ = ['PeeringManagementClient'] + +__version__ = VERSION + diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/__init__.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/__init__.py new file mode 100644 index 000000000000..43a83cfc21a1 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/__init__.py @@ -0,0 +1,109 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .peering_sku_py3 import PeeringSku + from .bgp_session_py3 import BgpSession + from .direct_connection_py3 import DirectConnection + from .sub_resource_py3 import SubResource + from .peering_properties_direct_py3 import PeeringPropertiesDirect + from .exchange_connection_py3 import ExchangeConnection + from .peering_properties_exchange_py3 import PeeringPropertiesExchange + from .peering_py3 import Peering + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .resource_py3 import Resource + from .operation_display_info_py3 import OperationDisplayInfo + from .operation_py3 import Operation + from .contact_info_py3 import ContactInfo + from .peer_asn_py3 import PeerAsn + from .direct_peering_facility_py3 import DirectPeeringFacility + from .peering_bandwidth_offer_py3 import PeeringBandwidthOffer + from .peering_location_properties_direct_py3 import PeeringLocationPropertiesDirect + from .exchange_peering_facility_py3 import ExchangePeeringFacility + from .peering_location_properties_exchange_py3 import PeeringLocationPropertiesExchange + from .peering_location_py3 import PeeringLocation + from .resource_tags_py3 import ResourceTags +except (SyntaxError, ImportError): + from .peering_sku import PeeringSku + from .bgp_session import BgpSession + from .direct_connection import DirectConnection + from .sub_resource import SubResource + from .peering_properties_direct import PeeringPropertiesDirect + from .exchange_connection import ExchangeConnection + from .peering_properties_exchange import PeeringPropertiesExchange + from .peering import Peering + from .error_response import ErrorResponse, ErrorResponseException + from .resource import Resource + from .operation_display_info import OperationDisplayInfo + from .operation import Operation + from .contact_info import ContactInfo + from .peer_asn import PeerAsn + from .direct_peering_facility import DirectPeeringFacility + from .peering_bandwidth_offer import PeeringBandwidthOffer + from .peering_location_properties_direct import PeeringLocationPropertiesDirect + from .exchange_peering_facility import ExchangePeeringFacility + from .peering_location_properties_exchange import PeeringLocationPropertiesExchange + from .peering_location import PeeringLocation + from .resource_tags import ResourceTags +from .peering_paged import PeeringPaged +from .operation_paged import OperationPaged +from .peer_asn_paged import PeerAsnPaged +from .peering_location_paged import PeeringLocationPaged +from .peering_management_client_enums import ( + Name, + Tier, + Family, + Size, + Kind, + ConnectionState, + SessionStateV4, + SessionStateV6, + ProvisioningState, + ValidationState, +) + +__all__ = [ + 'PeeringSku', + 'BgpSession', + 'DirectConnection', + 'SubResource', + 'PeeringPropertiesDirect', + 'ExchangeConnection', + 'PeeringPropertiesExchange', + 'Peering', + 'ErrorResponse', 'ErrorResponseException', + 'Resource', + 'OperationDisplayInfo', + 'Operation', + 'ContactInfo', + 'PeerAsn', + 'DirectPeeringFacility', + 'PeeringBandwidthOffer', + 'PeeringLocationPropertiesDirect', + 'ExchangePeeringFacility', + 'PeeringLocationPropertiesExchange', + 'PeeringLocation', + 'ResourceTags', + 'PeeringPaged', + 'OperationPaged', + 'PeerAsnPaged', + 'PeeringLocationPaged', + 'Name', + 'Tier', + 'Family', + 'Size', + 'Kind', + 'ConnectionState', + 'SessionStateV4', + 'SessionStateV6', + 'ProvisioningState', + 'ValidationState', +] diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session.py new file mode 100644 index 000000000000..5c3c4671d427 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session.py @@ -0,0 +1,90 @@ +# 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 BgpSession(Model): + """The properties that define a BGP session. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param session_prefix_v4: The IPv4 prefix that contains both ends' IPv4 + addresses. + :type session_prefix_v4: str + :param session_prefix_v6: The IPv6 prefix that contains both ends' IPv6 + addresses. + :type session_prefix_v6: str + :ivar microsoft_session_ipv4_address: The IPv4 session address on + Microsoft's end. + :vartype microsoft_session_ipv4_address: str + :ivar microsoft_session_ipv6_address: The IPv6 session address on + Microsoft's end. + :vartype microsoft_session_ipv6_address: str + :param peer_session_ipv4_address: The IPv4 session address on peer's end. + :type peer_session_ipv4_address: str + :param peer_session_ipv6_address: The IPv6 session address on peer's end. + :type peer_session_ipv6_address: str + :ivar session_state_v4: The state of the IPv4 session. Possible values + include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', + 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove' + :vartype session_state_v4: str or + ~azure.mgmt.peering.models.SessionStateV4 + :ivar session_state_v6: The state of the IPv6 session. Possible values + include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', + 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove' + :vartype session_state_v6: str or + ~azure.mgmt.peering.models.SessionStateV6 + :param max_prefixes_advertised_v4: The maximum number of prefixes + advertised over the IPv4 session. + :type max_prefixes_advertised_v4: int + :param max_prefixes_advertised_v6: The maximum number of prefixes + advertised over the IPv6 session. + :type max_prefixes_advertised_v6: int + :param md5_authentication_key: The MD5 authentication key of the session. + :type md5_authentication_key: str + """ + + _validation = { + 'microsoft_session_ipv4_address': {'readonly': True}, + 'microsoft_session_ipv6_address': {'readonly': True}, + 'session_state_v4': {'readonly': True}, + 'session_state_v6': {'readonly': True}, + } + + _attribute_map = { + 'session_prefix_v4': {'key': 'sessionPrefixV4', 'type': 'str'}, + 'session_prefix_v6': {'key': 'sessionPrefixV6', 'type': 'str'}, + 'microsoft_session_ipv4_address': {'key': 'microsoftSessionIPv4Address', 'type': 'str'}, + 'microsoft_session_ipv6_address': {'key': 'microsoftSessionIPv6Address', 'type': 'str'}, + 'peer_session_ipv4_address': {'key': 'peerSessionIPv4Address', 'type': 'str'}, + 'peer_session_ipv6_address': {'key': 'peerSessionIPv6Address', 'type': 'str'}, + 'session_state_v4': {'key': 'sessionStateV4', 'type': 'str'}, + 'session_state_v6': {'key': 'sessionStateV6', 'type': 'str'}, + 'max_prefixes_advertised_v4': {'key': 'maxPrefixesAdvertisedV4', 'type': 'int'}, + 'max_prefixes_advertised_v6': {'key': 'maxPrefixesAdvertisedV6', 'type': 'int'}, + 'md5_authentication_key': {'key': 'md5AuthenticationKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BgpSession, self).__init__(**kwargs) + self.session_prefix_v4 = kwargs.get('session_prefix_v4', None) + self.session_prefix_v6 = kwargs.get('session_prefix_v6', None) + self.microsoft_session_ipv4_address = None + self.microsoft_session_ipv6_address = None + self.peer_session_ipv4_address = kwargs.get('peer_session_ipv4_address', None) + self.peer_session_ipv6_address = kwargs.get('peer_session_ipv6_address', None) + self.session_state_v4 = None + self.session_state_v6 = None + self.max_prefixes_advertised_v4 = kwargs.get('max_prefixes_advertised_v4', None) + self.max_prefixes_advertised_v6 = kwargs.get('max_prefixes_advertised_v6', None) + self.md5_authentication_key = kwargs.get('md5_authentication_key', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session_py3.py new file mode 100644 index 000000000000..874aba5f98ec --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/bgp_session_py3.py @@ -0,0 +1,90 @@ +# 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 BgpSession(Model): + """The properties that define a BGP session. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param session_prefix_v4: The IPv4 prefix that contains both ends' IPv4 + addresses. + :type session_prefix_v4: str + :param session_prefix_v6: The IPv6 prefix that contains both ends' IPv6 + addresses. + :type session_prefix_v6: str + :ivar microsoft_session_ipv4_address: The IPv4 session address on + Microsoft's end. + :vartype microsoft_session_ipv4_address: str + :ivar microsoft_session_ipv6_address: The IPv6 session address on + Microsoft's end. + :vartype microsoft_session_ipv6_address: str + :param peer_session_ipv4_address: The IPv4 session address on peer's end. + :type peer_session_ipv4_address: str + :param peer_session_ipv6_address: The IPv6 session address on peer's end. + :type peer_session_ipv6_address: str + :ivar session_state_v4: The state of the IPv4 session. Possible values + include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', + 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove' + :vartype session_state_v4: str or + ~azure.mgmt.peering.models.SessionStateV4 + :ivar session_state_v6: The state of the IPv6 session. Possible values + include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', + 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove' + :vartype session_state_v6: str or + ~azure.mgmt.peering.models.SessionStateV6 + :param max_prefixes_advertised_v4: The maximum number of prefixes + advertised over the IPv4 session. + :type max_prefixes_advertised_v4: int + :param max_prefixes_advertised_v6: The maximum number of prefixes + advertised over the IPv6 session. + :type max_prefixes_advertised_v6: int + :param md5_authentication_key: The MD5 authentication key of the session. + :type md5_authentication_key: str + """ + + _validation = { + 'microsoft_session_ipv4_address': {'readonly': True}, + 'microsoft_session_ipv6_address': {'readonly': True}, + 'session_state_v4': {'readonly': True}, + 'session_state_v6': {'readonly': True}, + } + + _attribute_map = { + 'session_prefix_v4': {'key': 'sessionPrefixV4', 'type': 'str'}, + 'session_prefix_v6': {'key': 'sessionPrefixV6', 'type': 'str'}, + 'microsoft_session_ipv4_address': {'key': 'microsoftSessionIPv4Address', 'type': 'str'}, + 'microsoft_session_ipv6_address': {'key': 'microsoftSessionIPv6Address', 'type': 'str'}, + 'peer_session_ipv4_address': {'key': 'peerSessionIPv4Address', 'type': 'str'}, + 'peer_session_ipv6_address': {'key': 'peerSessionIPv6Address', 'type': 'str'}, + 'session_state_v4': {'key': 'sessionStateV4', 'type': 'str'}, + 'session_state_v6': {'key': 'sessionStateV6', 'type': 'str'}, + 'max_prefixes_advertised_v4': {'key': 'maxPrefixesAdvertisedV4', 'type': 'int'}, + 'max_prefixes_advertised_v6': {'key': 'maxPrefixesAdvertisedV6', 'type': 'int'}, + 'md5_authentication_key': {'key': 'md5AuthenticationKey', 'type': 'str'}, + } + + def __init__(self, *, session_prefix_v4: str=None, session_prefix_v6: str=None, peer_session_ipv4_address: str=None, peer_session_ipv6_address: str=None, max_prefixes_advertised_v4: int=None, max_prefixes_advertised_v6: int=None, md5_authentication_key: str=None, **kwargs) -> None: + super(BgpSession, self).__init__(**kwargs) + self.session_prefix_v4 = session_prefix_v4 + self.session_prefix_v6 = session_prefix_v6 + self.microsoft_session_ipv4_address = None + self.microsoft_session_ipv6_address = None + self.peer_session_ipv4_address = peer_session_ipv4_address + self.peer_session_ipv6_address = peer_session_ipv6_address + self.session_state_v4 = None + self.session_state_v6 = None + self.max_prefixes_advertised_v4 = max_prefixes_advertised_v4 + self.max_prefixes_advertised_v6 = max_prefixes_advertised_v6 + self.md5_authentication_key = md5_authentication_key diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info.py new file mode 100644 index 000000000000..cefa1d50f5ab --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info.py @@ -0,0 +1,32 @@ +# 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 ContactInfo(Model): + """The contact information of the peer. + + :param emails: The list of email addresses. + :type emails: list[str] + :param phone: The list of contact numbers. + :type phone: list[str] + """ + + _attribute_map = { + 'emails': {'key': 'emails', 'type': '[str]'}, + 'phone': {'key': 'phone', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ContactInfo, self).__init__(**kwargs) + self.emails = kwargs.get('emails', None) + self.phone = kwargs.get('phone', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info_py3.py new file mode 100644 index 000000000000..93e30e37c069 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/contact_info_py3.py @@ -0,0 +1,32 @@ +# 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 ContactInfo(Model): + """The contact information of the peer. + + :param emails: The list of email addresses. + :type emails: list[str] + :param phone: The list of contact numbers. + :type phone: list[str] + """ + + _attribute_map = { + 'emails': {'key': 'emails', 'type': '[str]'}, + 'phone': {'key': 'phone', 'type': '[str]'}, + } + + def __init__(self, *, emails=None, phone=None, **kwargs) -> None: + super(ContactInfo, self).__init__(**kwargs) + self.emails = emails + self.phone = phone diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection.py new file mode 100644 index 000000000000..2754c099e424 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection.py @@ -0,0 +1,56 @@ +# 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 DirectConnection(Model): + """The properties that define a direct connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param bandwidth_in_mbps: The bandwidth of the connection. + :type bandwidth_in_mbps: int + :param provisioned_bandwidth_in_mbps: The bandwidth that is actually + provisioned. + :type provisioned_bandwidth_in_mbps: int + :param peering_db_facility_id: The PeeringDB.com ID of the facility at + which the connection has to be set up. + :type peering_db_facility_id: int + :ivar connection_state: The state of the connection. Possible values + include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted', + 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active' + :vartype connection_state: str or + ~azure.mgmt.peering.models.ConnectionState + :param bgp_session: The BGP session associated with the connection. + :type bgp_session: ~azure.mgmt.peering.models.BgpSession + """ + + _validation = { + 'connection_state': {'readonly': True}, + } + + _attribute_map = { + 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, + 'provisioned_bandwidth_in_mbps': {'key': 'provisionedBandwidthInMbps', 'type': 'int'}, + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'bgp_session': {'key': 'bgpSession', 'type': 'BgpSession'}, + } + + def __init__(self, **kwargs): + super(DirectConnection, self).__init__(**kwargs) + self.bandwidth_in_mbps = kwargs.get('bandwidth_in_mbps', None) + self.provisioned_bandwidth_in_mbps = kwargs.get('provisioned_bandwidth_in_mbps', None) + self.peering_db_facility_id = kwargs.get('peering_db_facility_id', None) + self.connection_state = None + self.bgp_session = kwargs.get('bgp_session', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection_py3.py new file mode 100644 index 000000000000..3d2eaea44c16 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_connection_py3.py @@ -0,0 +1,56 @@ +# 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 DirectConnection(Model): + """The properties that define a direct connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param bandwidth_in_mbps: The bandwidth of the connection. + :type bandwidth_in_mbps: int + :param provisioned_bandwidth_in_mbps: The bandwidth that is actually + provisioned. + :type provisioned_bandwidth_in_mbps: int + :param peering_db_facility_id: The PeeringDB.com ID of the facility at + which the connection has to be set up. + :type peering_db_facility_id: int + :ivar connection_state: The state of the connection. Possible values + include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted', + 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active' + :vartype connection_state: str or + ~azure.mgmt.peering.models.ConnectionState + :param bgp_session: The BGP session associated with the connection. + :type bgp_session: ~azure.mgmt.peering.models.BgpSession + """ + + _validation = { + 'connection_state': {'readonly': True}, + } + + _attribute_map = { + 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, + 'provisioned_bandwidth_in_mbps': {'key': 'provisionedBandwidthInMbps', 'type': 'int'}, + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'bgp_session': {'key': 'bgpSession', 'type': 'BgpSession'}, + } + + def __init__(self, *, bandwidth_in_mbps: int=None, provisioned_bandwidth_in_mbps: int=None, peering_db_facility_id: int=None, bgp_session=None, **kwargs) -> None: + super(DirectConnection, self).__init__(**kwargs) + self.bandwidth_in_mbps = bandwidth_in_mbps + self.provisioned_bandwidth_in_mbps = provisioned_bandwidth_in_mbps + self.peering_db_facility_id = peering_db_facility_id + self.connection_state = None + self.bgp_session = bgp_session diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility.py new file mode 100644 index 000000000000..6d3ebb2848c9 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility.py @@ -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 DirectPeeringFacility(Model): + """The properties that define a direct peering facility. + + :param address: The address of the direct peering facility. + :type address: str + :param peering_db_facility_id: The PeeringDB.com ID of the facility. + :type peering_db_facility_id: int + :param peering_db_facility_link: The PeeringDB.com URL of the facility. + :type peering_db_facility_link: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'peering_db_facility_link': {'key': 'peeringDBFacilityLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DirectPeeringFacility, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + self.peering_db_facility_id = kwargs.get('peering_db_facility_id', None) + self.peering_db_facility_link = kwargs.get('peering_db_facility_link', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility_py3.py new file mode 100644 index 000000000000..f98cd984657a --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/direct_peering_facility_py3.py @@ -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 DirectPeeringFacility(Model): + """The properties that define a direct peering facility. + + :param address: The address of the direct peering facility. + :type address: str + :param peering_db_facility_id: The PeeringDB.com ID of the facility. + :type peering_db_facility_id: int + :param peering_db_facility_link: The PeeringDB.com URL of the facility. + :type peering_db_facility_link: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'peering_db_facility_link': {'key': 'peeringDBFacilityLink', 'type': 'str'}, + } + + def __init__(self, *, address: str=None, peering_db_facility_id: int=None, peering_db_facility_link: str=None, **kwargs) -> None: + super(DirectPeeringFacility, self).__init__(**kwargs) + self.address = address + self.peering_db_facility_id = peering_db_facility_id + self.peering_db_facility_link = peering_db_facility_link diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response.py new file mode 100644 index 000000000000..19c0822245ec --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response.py @@ -0,0 +1,53 @@ +# 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 ErrorResponse(Model): + """The error response that indicates why an operation has failed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response_py3.py new file mode 100644 index 000000000000..bd982a28c6df --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/error_response_py3.py @@ -0,0 +1,53 @@ +# 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 ErrorResponse(Model): + """The error response that indicates why an operation has failed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection.py new file mode 100644 index 000000000000..1e9819bf4482 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection.py @@ -0,0 +1,47 @@ +# 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 ExchangeConnection(Model): + """The properties that define an exchange connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param peering_db_facility_id: The PeeringDB.com ID of the facility at + which the connection has to be set up. + :type peering_db_facility_id: int + :ivar connection_state: The state of the connection. Possible values + include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted', + 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active' + :vartype connection_state: str or + ~azure.mgmt.peering.models.ConnectionState + :param bgp_session: The BGP session associated with the connection. + :type bgp_session: ~azure.mgmt.peering.models.BgpSession + """ + + _validation = { + 'connection_state': {'readonly': True}, + } + + _attribute_map = { + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'bgp_session': {'key': 'bgpSession', 'type': 'BgpSession'}, + } + + def __init__(self, **kwargs): + super(ExchangeConnection, self).__init__(**kwargs) + self.peering_db_facility_id = kwargs.get('peering_db_facility_id', None) + self.connection_state = None + self.bgp_session = kwargs.get('bgp_session', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection_py3.py new file mode 100644 index 000000000000..bb0fcfda4e70 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_connection_py3.py @@ -0,0 +1,47 @@ +# 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 ExchangeConnection(Model): + """The properties that define an exchange connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param peering_db_facility_id: The PeeringDB.com ID of the facility at + which the connection has to be set up. + :type peering_db_facility_id: int + :ivar connection_state: The state of the connection. Possible values + include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted', + 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active' + :vartype connection_state: str or + ~azure.mgmt.peering.models.ConnectionState + :param bgp_session: The BGP session associated with the connection. + :type bgp_session: ~azure.mgmt.peering.models.BgpSession + """ + + _validation = { + 'connection_state': {'readonly': True}, + } + + _attribute_map = { + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'bgp_session': {'key': 'bgpSession', 'type': 'BgpSession'}, + } + + def __init__(self, *, peering_db_facility_id: int=None, bgp_session=None, **kwargs) -> None: + super(ExchangeConnection, self).__init__(**kwargs) + self.peering_db_facility_id = peering_db_facility_id + self.connection_state = None + self.bgp_session = bgp_session diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility.py new file mode 100644 index 000000000000..d875612284ae --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility.py @@ -0,0 +1,61 @@ +# 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 ExchangePeeringFacility(Model): + """The properties that define an exchange peering facility. + + :param exchange_name: The name of the exchange peering facility. + :type exchange_name: str + :param bandwidth_in_mbps: The bandwidth of the connection between + Microsoft and the exchange peering facility. + :type bandwidth_in_mbps: int + :param microsoft_ipv4_address: The IPv4 address of Microsoft at the + exchange peering facility. + :type microsoft_ipv4_address: str + :param microsoft_ipv6_address: The IPv6 address of Microsoft at the + exchange peering facility. + :type microsoft_ipv6_address: str + :param facility_ipv4_prefix: The IPv4 prefixes associated with the + exchange peering facility. + :type facility_ipv4_prefix: str + :param facility_ipv6_prefix: The IPv6 prefixes associated with the + exchange peering facility. + :type facility_ipv6_prefix: str + :param peering_db_facility_id: The PeeringDB.com ID of the facility. + :type peering_db_facility_id: int + :param peering_db_facility_link: The PeeringDB.com URL of the facility. + :type peering_db_facility_link: str + """ + + _attribute_map = { + 'exchange_name': {'key': 'exchangeName', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, + 'microsoft_ipv4_address': {'key': 'microsoftIPv4Address', 'type': 'str'}, + 'microsoft_ipv6_address': {'key': 'microsoftIPv6Address', 'type': 'str'}, + 'facility_ipv4_prefix': {'key': 'facilityIPv4Prefix', 'type': 'str'}, + 'facility_ipv6_prefix': {'key': 'facilityIPv6Prefix', 'type': 'str'}, + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'peering_db_facility_link': {'key': 'peeringDBFacilityLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExchangePeeringFacility, self).__init__(**kwargs) + self.exchange_name = kwargs.get('exchange_name', None) + self.bandwidth_in_mbps = kwargs.get('bandwidth_in_mbps', None) + self.microsoft_ipv4_address = kwargs.get('microsoft_ipv4_address', None) + self.microsoft_ipv6_address = kwargs.get('microsoft_ipv6_address', None) + self.facility_ipv4_prefix = kwargs.get('facility_ipv4_prefix', None) + self.facility_ipv6_prefix = kwargs.get('facility_ipv6_prefix', None) + self.peering_db_facility_id = kwargs.get('peering_db_facility_id', None) + self.peering_db_facility_link = kwargs.get('peering_db_facility_link', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility_py3.py new file mode 100644 index 000000000000..135e952c08d4 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/exchange_peering_facility_py3.py @@ -0,0 +1,61 @@ +# 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 ExchangePeeringFacility(Model): + """The properties that define an exchange peering facility. + + :param exchange_name: The name of the exchange peering facility. + :type exchange_name: str + :param bandwidth_in_mbps: The bandwidth of the connection between + Microsoft and the exchange peering facility. + :type bandwidth_in_mbps: int + :param microsoft_ipv4_address: The IPv4 address of Microsoft at the + exchange peering facility. + :type microsoft_ipv4_address: str + :param microsoft_ipv6_address: The IPv6 address of Microsoft at the + exchange peering facility. + :type microsoft_ipv6_address: str + :param facility_ipv4_prefix: The IPv4 prefixes associated with the + exchange peering facility. + :type facility_ipv4_prefix: str + :param facility_ipv6_prefix: The IPv6 prefixes associated with the + exchange peering facility. + :type facility_ipv6_prefix: str + :param peering_db_facility_id: The PeeringDB.com ID of the facility. + :type peering_db_facility_id: int + :param peering_db_facility_link: The PeeringDB.com URL of the facility. + :type peering_db_facility_link: str + """ + + _attribute_map = { + 'exchange_name': {'key': 'exchangeName', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, + 'microsoft_ipv4_address': {'key': 'microsoftIPv4Address', 'type': 'str'}, + 'microsoft_ipv6_address': {'key': 'microsoftIPv6Address', 'type': 'str'}, + 'facility_ipv4_prefix': {'key': 'facilityIPv4Prefix', 'type': 'str'}, + 'facility_ipv6_prefix': {'key': 'facilityIPv6Prefix', 'type': 'str'}, + 'peering_db_facility_id': {'key': 'peeringDBFacilityId', 'type': 'int'}, + 'peering_db_facility_link': {'key': 'peeringDBFacilityLink', 'type': 'str'}, + } + + def __init__(self, *, exchange_name: str=None, bandwidth_in_mbps: int=None, microsoft_ipv4_address: str=None, microsoft_ipv6_address: str=None, facility_ipv4_prefix: str=None, facility_ipv6_prefix: str=None, peering_db_facility_id: int=None, peering_db_facility_link: str=None, **kwargs) -> None: + super(ExchangePeeringFacility, self).__init__(**kwargs) + self.exchange_name = exchange_name + self.bandwidth_in_mbps = bandwidth_in_mbps + self.microsoft_ipv4_address = microsoft_ipv4_address + self.microsoft_ipv6_address = microsoft_ipv6_address + self.facility_ipv4_prefix = facility_ipv4_prefix + self.facility_ipv6_prefix = facility_ipv6_prefix + self.peering_db_facility_id = peering_db_facility_id + self.peering_db_facility_link = peering_db_facility_link diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation.py new file mode 100644 index 000000000000..e00bdff62972 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation.py @@ -0,0 +1,46 @@ +# 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 Operation(Model): + """The peering API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. + :vartype name: str + :ivar display: The information related to the operation. + :vartype display: ~azure.mgmt.peering.models.OperationDisplayInfo + :ivar is_data_action: The flag that indicates whether the operation + applies to data plane. + :vartype is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'is_data_action': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.is_data_action = None diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info.py new file mode 100644 index 000000000000..357cb808c4c0 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info.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 msrest.serialization import Model + + +class OperationDisplayInfo(Model): + """The information related to the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The name of the resource provider. + :vartype provider: str + :ivar resource: The type of the resource. + :vartype resource: str + :ivar operation: The name of the operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplayInfo, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info_py3.py new file mode 100644 index 000000000000..f8e2f1e84f3c --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_display_info_py3.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 msrest.serialization import Model + + +class OperationDisplayInfo(Model): + """The information related to the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The name of the resource provider. + :vartype provider: str + :ivar resource: The type of the resource. + :vartype resource: str + :ivar operation: The name of the operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplayInfo, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_paged.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_paged.py new file mode 100644 index 000000000000..67b6a71bd0c2 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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 OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_py3.py new file mode 100644 index 000000000000..dc1e2c70d7d2 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/operation_py3.py @@ -0,0 +1,46 @@ +# 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 Operation(Model): + """The peering API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. + :vartype name: str + :ivar display: The information related to the operation. + :vartype display: ~azure.mgmt.peering.models.OperationDisplayInfo + :ivar is_data_action: The flag that indicates whether the operation + applies to data plane. + :vartype is_data_action: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'is_data_action': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.is_data_action = None diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn.py new file mode 100644 index 000000000000..ac00c3fbb232 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn.py @@ -0,0 +1,59 @@ +# 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 PeerAsn(Resource): + """The essential information related to the peer's ASN. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + :param peer_asn: The Autonomous System Number (ASN) of the peer. + :type peer_asn: int + :param peer_contact_info: The contact information of the peer. + :type peer_contact_info: ~azure.mgmt.peering.models.ContactInfo + :param peer_name: The name of the peer. + :type peer_name: str + :param validation_state: The validation state of the ASN associated with + the peer. Possible values include: 'None', 'Pending', 'Approved', 'Failed' + :type validation_state: str or ~azure.mgmt.peering.models.ValidationState + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'int'}, + 'peer_contact_info': {'key': 'properties.peerContactInfo', 'type': 'ContactInfo'}, + 'peer_name': {'key': 'properties.peerName', 'type': 'str'}, + 'validation_state': {'key': 'properties.validationState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeerAsn, self).__init__(**kwargs) + self.peer_asn = kwargs.get('peer_asn', None) + self.peer_contact_info = kwargs.get('peer_contact_info', None) + self.peer_name = kwargs.get('peer_name', None) + self.validation_state = kwargs.get('validation_state', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_paged.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_paged.py new file mode 100644 index 000000000000..656566d0fa06 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_paged.py @@ -0,0 +1,27 @@ +# 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 PeerAsnPaged(Paged): + """ + A paging container for iterating over a list of :class:`PeerAsn ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PeerAsn]'} + } + + def __init__(self, *args, **kwargs): + + super(PeerAsnPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_py3.py new file mode 100644 index 000000000000..9c3879a3663c --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peer_asn_py3.py @@ -0,0 +1,59 @@ +# 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 PeerAsn(Resource): + """The essential information related to the peer's ASN. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + :param peer_asn: The Autonomous System Number (ASN) of the peer. + :type peer_asn: int + :param peer_contact_info: The contact information of the peer. + :type peer_contact_info: ~azure.mgmt.peering.models.ContactInfo + :param peer_name: The name of the peer. + :type peer_name: str + :param validation_state: The validation state of the ASN associated with + the peer. Possible values include: 'None', 'Pending', 'Approved', 'Failed' + :type validation_state: str or ~azure.mgmt.peering.models.ValidationState + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'int'}, + 'peer_contact_info': {'key': 'properties.peerContactInfo', 'type': 'ContactInfo'}, + 'peer_name': {'key': 'properties.peerName', 'type': 'str'}, + 'validation_state': {'key': 'properties.validationState', 'type': 'str'}, + } + + def __init__(self, *, peer_asn: int=None, peer_contact_info=None, peer_name: str=None, validation_state=None, **kwargs) -> None: + super(PeerAsn, self).__init__(**kwargs) + self.peer_asn = peer_asn + self.peer_contact_info = peer_contact_info + self.peer_name = peer_name + self.validation_state = validation_state diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering.py new file mode 100644 index 000000000000..04cb37b840d2 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering.py @@ -0,0 +1,85 @@ +# 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 Peering(Resource): + """Peering is a logical representation of a set of connections to the + Microsoft Cloud Edge at a location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + :param sku: Required. The SKU that defines the tier and kind of the + peering. + :type sku: ~azure.mgmt.peering.models.PeeringSku + :param kind: Required. The kind of the peering. Possible values include: + 'Direct', 'Exchange' + :type kind: str or ~azure.mgmt.peering.models.Kind + :param direct: The properties that define a direct peering. + :type direct: ~azure.mgmt.peering.models.PeeringPropertiesDirect + :param exchange: The properties that define an exchange peering. + :type exchange: ~azure.mgmt.peering.models.PeeringPropertiesExchange + :param peering_location: The location of the peering. + :type peering_location: str + :ivar provisioning_state: The provisioning state of the resource. Possible + values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.peering.models.ProvisioningState + :param location: Required. The location of the resource. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'sku': {'required': True}, + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'PeeringSku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'direct': {'key': 'properties.direct', 'type': 'PeeringPropertiesDirect'}, + 'exchange': {'key': 'properties.exchange', 'type': 'PeeringPropertiesExchange'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Peering, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = kwargs.get('kind', None) + self.direct = kwargs.get('direct', None) + self.exchange = kwargs.get('exchange', None) + self.peering_location = kwargs.get('peering_location', None) + self.provisioning_state = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer.py new file mode 100644 index 000000000000..772ff8f5b6fd --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer.py @@ -0,0 +1,32 @@ +# 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 PeeringBandwidthOffer(Model): + """The properties that define a peering bandwidth offer. + + :param offer_name: The name of the bandwidth offer. + :type offer_name: str + :param value_in_mbps: The value of the bandwidth offer in Mbps. + :type value_in_mbps: int + """ + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PeeringBandwidthOffer, self).__init__(**kwargs) + self.offer_name = kwargs.get('offer_name', None) + self.value_in_mbps = kwargs.get('value_in_mbps', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer_py3.py new file mode 100644 index 000000000000..43b4d25509c4 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_bandwidth_offer_py3.py @@ -0,0 +1,32 @@ +# 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 PeeringBandwidthOffer(Model): + """The properties that define a peering bandwidth offer. + + :param offer_name: The name of the bandwidth offer. + :type offer_name: str + :param value_in_mbps: The value of the bandwidth offer in Mbps. + :type value_in_mbps: int + """ + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, + } + + def __init__(self, *, offer_name: str=None, value_in_mbps: int=None, **kwargs) -> None: + super(PeeringBandwidthOffer, self).__init__(**kwargs) + self.offer_name = offer_name + self.value_in_mbps = value_in_mbps diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location.py new file mode 100644 index 000000000000..7325b0244019 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location.py @@ -0,0 +1,70 @@ +# 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 PeeringLocation(Resource): + """Peering location is where connectivity could be established to the + Microsoft Cloud Edge. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + :param kind: The kind of peering that the peering location supports. + Possible values include: 'Direct', 'Exchange' + :type kind: str or ~azure.mgmt.peering.models.Kind + :param direct: The properties that define a direct peering location. + :type direct: ~azure.mgmt.peering.models.PeeringLocationPropertiesDirect + :param exchange: The properties that define an exchange peering location. + :type exchange: + ~azure.mgmt.peering.models.PeeringLocationPropertiesExchange + :param peering_location: The name of the peering location. + :type peering_location: str + :param country: The country in which the peering location exists. + :type country: str + :param azure_region: The Azure region associated with the peering + location. + :type azure_region: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'direct': {'key': 'properties.direct', 'type': 'PeeringLocationPropertiesDirect'}, + 'exchange': {'key': 'properties.exchange', 'type': 'PeeringLocationPropertiesExchange'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'country': {'key': 'properties.country', 'type': 'str'}, + 'azure_region': {'key': 'properties.azureRegion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeeringLocation, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.direct = kwargs.get('direct', None) + self.exchange = kwargs.get('exchange', None) + self.peering_location = kwargs.get('peering_location', None) + self.country = kwargs.get('country', None) + self.azure_region = kwargs.get('azure_region', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_paged.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_paged.py new file mode 100644 index 000000000000..d6f09b1634ec --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_paged.py @@ -0,0 +1,27 @@ +# 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 PeeringLocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`PeeringLocation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PeeringLocation]'} + } + + def __init__(self, *args, **kwargs): + + super(PeeringLocationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct.py new file mode 100644 index 000000000000..6b968001618e --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct.py @@ -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 PeeringLocationPropertiesDirect(Model): + """The properties that define a direct peering location. + + :param peering_facilities: The list of direct peering facilities at the + peering location. + :type peering_facilities: + list[~azure.mgmt.peering.models.DirectPeeringFacility] + :param bandwidth_offers: The list of bandwidth offers available at the + peering location. + :type bandwidth_offers: + list[~azure.mgmt.peering.models.PeeringBandwidthOffer] + """ + + _attribute_map = { + 'peering_facilities': {'key': 'peeringFacilities', 'type': '[DirectPeeringFacility]'}, + 'bandwidth_offers': {'key': 'bandwidthOffers', 'type': '[PeeringBandwidthOffer]'}, + } + + def __init__(self, **kwargs): + super(PeeringLocationPropertiesDirect, self).__init__(**kwargs) + self.peering_facilities = kwargs.get('peering_facilities', None) + self.bandwidth_offers = kwargs.get('bandwidth_offers', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct_py3.py new file mode 100644 index 000000000000..8d7b07162a85 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_direct_py3.py @@ -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 PeeringLocationPropertiesDirect(Model): + """The properties that define a direct peering location. + + :param peering_facilities: The list of direct peering facilities at the + peering location. + :type peering_facilities: + list[~azure.mgmt.peering.models.DirectPeeringFacility] + :param bandwidth_offers: The list of bandwidth offers available at the + peering location. + :type bandwidth_offers: + list[~azure.mgmt.peering.models.PeeringBandwidthOffer] + """ + + _attribute_map = { + 'peering_facilities': {'key': 'peeringFacilities', 'type': '[DirectPeeringFacility]'}, + 'bandwidth_offers': {'key': 'bandwidthOffers', 'type': '[PeeringBandwidthOffer]'}, + } + + def __init__(self, *, peering_facilities=None, bandwidth_offers=None, **kwargs) -> None: + super(PeeringLocationPropertiesDirect, self).__init__(**kwargs) + self.peering_facilities = peering_facilities + self.bandwidth_offers = bandwidth_offers diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange.py new file mode 100644 index 000000000000..b75ac6bd912c --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange.py @@ -0,0 +1,30 @@ +# 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 PeeringLocationPropertiesExchange(Model): + """The properties that define an exchange peering location. + + :param peering_facilities: The list of exchange peering facilities at the + peering location. + :type peering_facilities: + list[~azure.mgmt.peering.models.ExchangePeeringFacility] + """ + + _attribute_map = { + 'peering_facilities': {'key': 'peeringFacilities', 'type': '[ExchangePeeringFacility]'}, + } + + def __init__(self, **kwargs): + super(PeeringLocationPropertiesExchange, self).__init__(**kwargs) + self.peering_facilities = kwargs.get('peering_facilities', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange_py3.py new file mode 100644 index 000000000000..0ce15d706893 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_properties_exchange_py3.py @@ -0,0 +1,30 @@ +# 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 PeeringLocationPropertiesExchange(Model): + """The properties that define an exchange peering location. + + :param peering_facilities: The list of exchange peering facilities at the + peering location. + :type peering_facilities: + list[~azure.mgmt.peering.models.ExchangePeeringFacility] + """ + + _attribute_map = { + 'peering_facilities': {'key': 'peeringFacilities', 'type': '[ExchangePeeringFacility]'}, + } + + def __init__(self, *, peering_facilities=None, **kwargs) -> None: + super(PeeringLocationPropertiesExchange, self).__init__(**kwargs) + self.peering_facilities = peering_facilities diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_py3.py new file mode 100644 index 000000000000..0f9da0ec086c --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_location_py3.py @@ -0,0 +1,70 @@ +# 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 PeeringLocation(Resource): + """Peering location is where connectivity could be established to the + Microsoft Cloud Edge. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + :param kind: The kind of peering that the peering location supports. + Possible values include: 'Direct', 'Exchange' + :type kind: str or ~azure.mgmt.peering.models.Kind + :param direct: The properties that define a direct peering location. + :type direct: ~azure.mgmt.peering.models.PeeringLocationPropertiesDirect + :param exchange: The properties that define an exchange peering location. + :type exchange: + ~azure.mgmt.peering.models.PeeringLocationPropertiesExchange + :param peering_location: The name of the peering location. + :type peering_location: str + :param country: The country in which the peering location exists. + :type country: str + :param azure_region: The Azure region associated with the peering + location. + :type azure_region: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'direct': {'key': 'properties.direct', 'type': 'PeeringLocationPropertiesDirect'}, + 'exchange': {'key': 'properties.exchange', 'type': 'PeeringLocationPropertiesExchange'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'country': {'key': 'properties.country', 'type': 'str'}, + 'azure_region': {'key': 'properties.azureRegion', 'type': 'str'}, + } + + def __init__(self, *, kind=None, direct=None, exchange=None, peering_location: str=None, country: str=None, azure_region: str=None, **kwargs) -> None: + super(PeeringLocation, self).__init__(**kwargs) + self.kind = kind + self.direct = direct + self.exchange = exchange + self.peering_location = peering_location + self.country = country + self.azure_region = azure_region diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_management_client_enums.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_management_client_enums.py new file mode 100644 index 000000000000..b8c9157498a3 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_management_client_enums.py @@ -0,0 +1,101 @@ +# 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 enum import Enum + + +class Name(str, Enum): + + basic_exchange_free = "Basic_Exchange_Free" + basic_direct_free = "Basic_Direct_Free" + premium_direct_free = "Premium_Direct_Free" + premium_exchange_metered = "Premium_Exchange_Metered" + + +class Tier(str, Enum): + + basic = "Basic" + premium = "Premium" + + +class Family(str, Enum): + + direct = "Direct" + exchange = "Exchange" + + +class Size(str, Enum): + + free = "Free" + metered = "Metered" + unlimited = "Unlimited" + + +class Kind(str, Enum): + + direct = "Direct" + exchange = "Exchange" + + +class ConnectionState(str, Enum): + + none = "None" + pending_approval = "PendingApproval" + approved = "Approved" + provisioning_started = "ProvisioningStarted" + provisioning_failed = "ProvisioningFailed" + provisioning_completed = "ProvisioningCompleted" + validating = "Validating" + active = "Active" + + +class SessionStateV4(str, Enum): + + none = "None" + idle = "Idle" + connect = "Connect" + active = "Active" + open_sent = "OpenSent" + open_confirm = "OpenConfirm" + established = "Established" + pending_add = "PendingAdd" + pending_update = "PendingUpdate" + pending_remove = "PendingRemove" + + +class SessionStateV6(str, Enum): + + none = "None" + idle = "Idle" + connect = "Connect" + active = "Active" + open_sent = "OpenSent" + open_confirm = "OpenConfirm" + established = "Established" + pending_add = "PendingAdd" + pending_update = "PendingUpdate" + pending_remove = "PendingRemove" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + updating = "Updating" + deleting = "Deleting" + failed = "Failed" + + +class ValidationState(str, Enum): + + none = "None" + pending = "Pending" + approved = "Approved" + failed = "Failed" diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_paged.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_paged.py new file mode 100644 index 000000000000..a3a3fd6bade5 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_paged.py @@ -0,0 +1,27 @@ +# 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 PeeringPaged(Paged): + """ + A paging container for iterating over a list of :class:`Peering ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Peering]'} + } + + def __init__(self, *args, **kwargs): + + super(PeeringPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct.py new file mode 100644 index 000000000000..977278902330 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct.py @@ -0,0 +1,38 @@ +# 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 PeeringPropertiesDirect(Model): + """The properties that define a direct peering. + + :param connections: The set of connections that constitute a direct + peering. + :type connections: list[~azure.mgmt.peering.models.DirectConnection] + :param use_for_peering_service: The flag that indicates whether or not the + peering is used for peering service. + :type use_for_peering_service: bool + :param peer_asn: The reference of the peer ASN. + :type peer_asn: ~azure.mgmt.peering.models.SubResource + """ + + _attribute_map = { + 'connections': {'key': 'connections', 'type': '[DirectConnection]'}, + 'use_for_peering_service': {'key': 'useForPeeringService', 'type': 'bool'}, + 'peer_asn': {'key': 'peerAsn', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(PeeringPropertiesDirect, self).__init__(**kwargs) + self.connections = kwargs.get('connections', None) + self.use_for_peering_service = kwargs.get('use_for_peering_service', None) + self.peer_asn = kwargs.get('peer_asn', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct_py3.py new file mode 100644 index 000000000000..ad286b055ee6 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_direct_py3.py @@ -0,0 +1,38 @@ +# 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 PeeringPropertiesDirect(Model): + """The properties that define a direct peering. + + :param connections: The set of connections that constitute a direct + peering. + :type connections: list[~azure.mgmt.peering.models.DirectConnection] + :param use_for_peering_service: The flag that indicates whether or not the + peering is used for peering service. + :type use_for_peering_service: bool + :param peer_asn: The reference of the peer ASN. + :type peer_asn: ~azure.mgmt.peering.models.SubResource + """ + + _attribute_map = { + 'connections': {'key': 'connections', 'type': '[DirectConnection]'}, + 'use_for_peering_service': {'key': 'useForPeeringService', 'type': 'bool'}, + 'peer_asn': {'key': 'peerAsn', 'type': 'SubResource'}, + } + + def __init__(self, *, connections=None, use_for_peering_service: bool=None, peer_asn=None, **kwargs) -> None: + super(PeeringPropertiesDirect, self).__init__(**kwargs) + self.connections = connections + self.use_for_peering_service = use_for_peering_service + self.peer_asn = peer_asn diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange.py new file mode 100644 index 000000000000..1d7746c5169b --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange.py @@ -0,0 +1,33 @@ +# 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 PeeringPropertiesExchange(Model): + """The properties that define an exchange peering. + + :param connections: The set of connections that constitute an exchange + peering. + :type connections: list[~azure.mgmt.peering.models.ExchangeConnection] + :param peer_asn: The reference of the peer ASN. + :type peer_asn: ~azure.mgmt.peering.models.SubResource + """ + + _attribute_map = { + 'connections': {'key': 'connections', 'type': '[ExchangeConnection]'}, + 'peer_asn': {'key': 'peerAsn', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(PeeringPropertiesExchange, self).__init__(**kwargs) + self.connections = kwargs.get('connections', None) + self.peer_asn = kwargs.get('peer_asn', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange_py3.py new file mode 100644 index 000000000000..20d880e99b94 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_properties_exchange_py3.py @@ -0,0 +1,33 @@ +# 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 PeeringPropertiesExchange(Model): + """The properties that define an exchange peering. + + :param connections: The set of connections that constitute an exchange + peering. + :type connections: list[~azure.mgmt.peering.models.ExchangeConnection] + :param peer_asn: The reference of the peer ASN. + :type peer_asn: ~azure.mgmt.peering.models.SubResource + """ + + _attribute_map = { + 'connections': {'key': 'connections', 'type': '[ExchangeConnection]'}, + 'peer_asn': {'key': 'peerAsn', 'type': 'SubResource'}, + } + + def __init__(self, *, connections=None, peer_asn=None, **kwargs) -> None: + super(PeeringPropertiesExchange, self).__init__(**kwargs) + self.connections = connections + self.peer_asn = peer_asn diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_py3.py new file mode 100644 index 000000000000..1841ff05d699 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_py3.py @@ -0,0 +1,85 @@ +# 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 Peering(Resource): + """Peering is a logical representation of a set of connections to the + Microsoft Cloud Edge at a location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + :param sku: Required. The SKU that defines the tier and kind of the + peering. + :type sku: ~azure.mgmt.peering.models.PeeringSku + :param kind: Required. The kind of the peering. Possible values include: + 'Direct', 'Exchange' + :type kind: str or ~azure.mgmt.peering.models.Kind + :param direct: The properties that define a direct peering. + :type direct: ~azure.mgmt.peering.models.PeeringPropertiesDirect + :param exchange: The properties that define an exchange peering. + :type exchange: ~azure.mgmt.peering.models.PeeringPropertiesExchange + :param peering_location: The location of the peering. + :type peering_location: str + :ivar provisioning_state: The provisioning state of the resource. Possible + values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.peering.models.ProvisioningState + :param location: Required. The location of the resource. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'sku': {'required': True}, + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'PeeringSku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'direct': {'key': 'properties.direct', 'type': 'PeeringPropertiesDirect'}, + 'exchange': {'key': 'properties.exchange', 'type': 'PeeringPropertiesExchange'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku, kind, location: str, direct=None, exchange=None, peering_location: str=None, tags=None, **kwargs) -> None: + super(Peering, self).__init__(**kwargs) + self.sku = sku + self.kind = kind + self.direct = direct + self.exchange = exchange + self.peering_location = peering_location + self.provisioning_state = None + self.location = location + self.tags = tags diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku.py new file mode 100644 index 000000000000..3c215ab6117d --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku.py @@ -0,0 +1,45 @@ +# 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 PeeringSku(Model): + """The SKU that defines the tier and kind of the peering. + + :param name: The name of the peering SKU. Possible values include: + 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free', + 'Premium_Exchange_Metered' + :type name: str or ~azure.mgmt.peering.models.Name + :param tier: The tier of the peering SKU. Possible values include: + 'Basic', 'Premium' + :type tier: str or ~azure.mgmt.peering.models.Tier + :param family: The family of the peering SKU. Possible values include: + 'Direct', 'Exchange' + :type family: str or ~azure.mgmt.peering.models.Family + :param size: The size of the peering SKU. Possible values include: 'Free', + 'Metered', 'Unlimited' + :type size: str or ~azure.mgmt.peering.models.Size + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PeeringSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.family = kwargs.get('family', None) + self.size = kwargs.get('size', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku_py3.py new file mode 100644 index 000000000000..0e30c97e02de --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/peering_sku_py3.py @@ -0,0 +1,45 @@ +# 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 PeeringSku(Model): + """The SKU that defines the tier and kind of the peering. + + :param name: The name of the peering SKU. Possible values include: + 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free', + 'Premium_Exchange_Metered' + :type name: str or ~azure.mgmt.peering.models.Name + :param tier: The tier of the peering SKU. Possible values include: + 'Basic', 'Premium' + :type tier: str or ~azure.mgmt.peering.models.Tier + :param family: The family of the peering SKU. Possible values include: + 'Direct', 'Exchange' + :type family: str or ~azure.mgmt.peering.models.Family + :param size: The size of the peering SKU. Possible values include: 'Free', + 'Metered', 'Unlimited' + :type size: str or ~azure.mgmt.peering.models.Size + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, name=None, tier=None, family=None, size=None, **kwargs) -> None: + super(PeeringSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.family = family + self.size = size diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource.py new file mode 100644 index 000000000000..430782cb8ee7 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource.py @@ -0,0 +1,45 @@ +# 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 ARM resource class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_py3.py new file mode 100644 index 000000000000..fcdb8bdf70ec --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_py3.py @@ -0,0 +1,45 @@ +# 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 ARM resource class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource. + :vartype name: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags.py new file mode 100644 index 000000000000..1853618cb000 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags.py @@ -0,0 +1,28 @@ +# 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 ResourceTags(Model): + """The resource tags. + + :param tags: Gets or sets the tags, a dictionary of descriptors arm object + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceTags, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags_py3.py new file mode 100644 index 000000000000..6d6ff04e557c --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/resource_tags_py3.py @@ -0,0 +1,28 @@ +# 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 ResourceTags(Model): + """The resource tags. + + :param tags: Gets or sets the tags, a dictionary of descriptors arm object + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ResourceTags, self).__init__(**kwargs) + self.tags = tags diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource.py new file mode 100644 index 000000000000..fc1c651f3453 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource.py @@ -0,0 +1,28 @@ +# 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): + """The sub resource. + + :param id: The identifier of the referenced resource. + :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/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource_py3.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource_py3.py new file mode 100644 index 000000000000..657dee3a61c9 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/models/sub_resource_py3.py @@ -0,0 +1,28 @@ +# 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): + """The sub resource. + + :param id: The identifier of the referenced resource. + :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/azure-mgmt-peering/azure/mgmt/peering/operations/__init__.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/__init__.py new file mode 100644 index 000000000000..5b10beba012e --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/__init__.py @@ -0,0 +1,24 @@ +# 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 .legacy_peerings_operations import LegacyPeeringsOperations +from .operations import Operations +from .peer_asns_operations import PeerAsnsOperations +from .peering_locations_operations import PeeringLocationsOperations +from .peerings_operations import PeeringsOperations + +__all__ = [ + 'LegacyPeeringsOperations', + 'Operations', + 'PeerAsnsOperations', + 'PeeringLocationsOperations', + 'PeeringsOperations', +] diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/legacy_peerings_operations.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/legacy_peerings_operations.py new file mode 100644 index 000000000000..99acbe9dbedc --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/legacy_peerings_operations.py @@ -0,0 +1,108 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class LegacyPeeringsOperations(object): + """LegacyPeeringsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2019-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01-preview" + + self.config = config + + def list( + self, peering_location, kind, custom_headers=None, raw=False, **operation_config): + """Lists all of the legacy peerings under the given subscription matching + the specified kind and location. + + :param peering_location: The location of the peering. + :type peering_location: str + :param kind: The kind of the peering. Possible values include: + 'Direct', 'Exchange' + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Peering + :rtype: + ~azure.mgmt.peering.models.PeeringPaged[~azure.mgmt.peering.models.Peering] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['peeringLocation'] = self._serialize.query("peering_location", peering_location, 'str') + query_parameters['kind'] = self._serialize.query("kind", kind, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.PeeringPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PeeringPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Peering/legacyPeerings'} diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/operations.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/operations.py new file mode 100644 index 000000000000..f948154e16bb --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/operations.py @@ -0,0 +1,96 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2019-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available API operations for peering resources. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.peering.models.OperationPaged[~azure.mgmt.peering.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Peering/operations'} diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peer_asns_operations.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peer_asns_operations.py new file mode 100644 index 000000000000..2f4e8636a20c --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peer_asns_operations.py @@ -0,0 +1,275 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PeerAsnsOperations(object): + """PeerAsnsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2019-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01-preview" + + self.config = config + + def get( + self, peer_asn_name, custom_headers=None, raw=False, **operation_config): + """Gets the peer ASN with the specified name under the given subscription. + + :param peer_asn_name: The peer ASN name. + :type peer_asn_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PeerAsn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.peering.models.PeerAsn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'peerAsnName': self._serialize.url("peer_asn_name", peer_asn_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PeerAsn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}'} + + def create_or_update( + self, peer_asn_name, peer_asn, custom_headers=None, raw=False, **operation_config): + """Creates a new peer ASN or updates an existing peer ASN with the + specified name under the given subscription. + + :param peer_asn_name: The peer ASN name. + :type peer_asn_name: str + :param peer_asn: The peer ASN. + :type peer_asn: ~azure.mgmt.peering.models.PeerAsn + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PeerAsn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.peering.models.PeerAsn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'peerAsnName': self._serialize.url("peer_asn_name", peer_asn_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(peer_asn, 'PeerAsn') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PeerAsn', response) + if response.status_code == 201: + deserialized = self._deserialize('PeerAsn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}'} + + def delete( + self, peer_asn_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing peer ASN with the specified name under the given + subscription. + + :param peer_asn_name: The peer ASN name. + :type peer_asn_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'peerAsnName': self._serialize.url("peer_asn_name", peer_asn_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the peer ASNs under the given subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PeerAsn + :rtype: + ~azure.mgmt.peering.models.PeerAsnPaged[~azure.mgmt.peering.models.PeerAsn] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.PeerAsnPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PeerAsnPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns'} diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peering_locations_operations.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peering_locations_operations.py new file mode 100644 index 000000000000..3cd413320aef --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peering_locations_operations.py @@ -0,0 +1,105 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PeeringLocationsOperations(object): + """PeeringLocationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2019-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01-preview" + + self.config = config + + def list( + self, kind, custom_headers=None, raw=False, **operation_config): + """Lists all of the available peering locations for the specified kind of + peering. + + :param kind: The kind of the peering. Possible values include: + 'Direct', 'Exchange' + :type kind: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PeeringLocation + :rtype: + ~azure.mgmt.peering.models.PeeringLocationPaged[~azure.mgmt.peering.models.PeeringLocation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['kind'] = self._serialize.query("kind", kind, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.PeeringLocationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PeeringLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringLocations'} diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peerings_operations.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peerings_operations.py new file mode 100644 index 000000000000..602eef0c3725 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/operations/peerings_operations.py @@ -0,0 +1,423 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PeeringsOperations(object): + """PeeringsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The client API version. Constant value: "2019-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, peering_name, custom_headers=None, raw=False, **operation_config): + """Gets an existing peering with the specified name under the given + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Peering or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.peering.models.Peering or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Peering', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}'} + + def create_or_update( + self, resource_group_name, peering_name, peering, custom_headers=None, raw=False, **operation_config): + """Creates a new peering or updates an existing peering with the specified + name under the given subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param peering: The properties needed to create or update a peering. + :type peering: ~azure.mgmt.peering.models.Peering + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Peering or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.peering.models.Peering or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(peering, 'Peering') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Peering', response) + if response.status_code == 201: + deserialized = self._deserialize('Peering', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}'} + + def delete( + self, resource_group_name, peering_name, custom_headers=None, raw=False, **operation_config): + """Deletes an existing peering with the specified name under the given + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}'} + + def update( + self, resource_group_name, peering_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Updates tags for a peering with the specified name under the given + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param tags: Gets or sets the tags, a dictionary of descriptors arm + object + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Peering or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.peering.models.Peering or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + tags1 = models.ResourceTags(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(tags1, 'ResourceTags') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Peering', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the peerings under the given subscription and resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Peering + :rtype: + ~azure.mgmt.peering.models.PeeringPaged[~azure.mgmt.peering.models.Peering] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.PeeringPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PeeringPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the peerings under the given subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Peering + :rtype: + ~azure.mgmt.peering.models.PeeringPaged[~azure.mgmt.peering.models.Peering] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.PeeringPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PeeringPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerings'} diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/peering_management_client.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/peering_management_client.py new file mode 100644 index 000000000000..c6a9c8a4fcd9 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/peering_management_client.py @@ -0,0 +1,101 @@ +# 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.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.legacy_peerings_operations import LegacyPeeringsOperations +from .operations.operations import Operations +from .operations.peer_asns_operations import PeerAsnsOperations +from .operations.peering_locations_operations import PeeringLocationsOperations +from .operations.peerings_operations import PeeringsOperations +from . import models + + +class PeeringManagementClientConfiguration(AzureConfiguration): + """Configuration for PeeringManagementClient + 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: The Azure subscription ID. + :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(PeeringManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-peering/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class PeeringManagementClient(SDKClient): + """APIs to manage Peering resources through the Azure Resource Manager. + + :ivar config: Configuration for client. + :vartype config: PeeringManagementClientConfiguration + + :ivar legacy_peerings: LegacyPeerings operations + :vartype legacy_peerings: azure.mgmt.peering.operations.LegacyPeeringsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.peering.operations.Operations + :ivar peer_asns: PeerAsns operations + :vartype peer_asns: azure.mgmt.peering.operations.PeerAsnsOperations + :ivar peering_locations: PeeringLocations operations + :vartype peering_locations: azure.mgmt.peering.operations.PeeringLocationsOperations + :ivar peerings: Peerings operations + :vartype peerings: azure.mgmt.peering.operations.PeeringsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = PeeringManagementClientConfiguration(credentials, subscription_id, base_url) + super(PeeringManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-03-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.legacy_peerings = LegacyPeeringsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.peer_asns = PeerAsnsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.peering_locations = PeeringLocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.peerings = PeeringsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-mgmt-peering/azure/mgmt/peering/version.py b/sdk/azure-mgmt-peering/azure/mgmt/peering/version.py new file mode 100644 index 000000000000..53c4c7ea05e8 --- /dev/null +++ b/sdk/azure-mgmt-peering/azure/mgmt/peering/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2.0.0" +