From a4840dd314fbc8d85d510b0f89e32ebc898eb8f4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 4 Jan 2021 05:59:20 +0000 Subject: [PATCH] CodeGen from PR 11495 in Azure/azure-rest-api-specs add relay track2 config (#11495) --- .../azure/mgmt/relay/__init__.py | 7 +- .../azure/mgmt/relay/_configuration.py | 50 ++ ..._client.py => _relay_management_client.py} | 46 +- .../azure/mgmt/relay/models/__init__.py | 100 +-- .../azure/mgmt/relay/models/_models.py | 683 ++++++++++++++++++ .../azure/mgmt/relay/models/_models_py3.py | 683 ++++++++++++++++++ .../azure/mgmt/relay/models/_paged_models.py | 79 ++ ...s.py => _relay_management_client_enums.py} | 0 .../azure/mgmt/relay/models/access_keys.py | 48 -- .../mgmt/relay/models/access_keys_py3.py | 48 -- .../mgmt/relay/models/authorization_rule.py | 49 -- .../relay/models/authorization_rule_paged.py | 27 - .../relay/models/authorization_rule_py3.py | 49 -- .../relay/models/check_name_availability.py | 37 - .../models/check_name_availability_py3.py | 37 - .../models/check_name_availability_result.py | 47 -- .../check_name_availability_result_py3.py | 47 -- .../azure/mgmt/relay/models/error_response.py | 46 -- .../mgmt/relay/models/error_response_py3.py | 46 -- .../mgmt/relay/models/hybrid_connection.py | 71 -- .../relay/models/hybrid_connection_paged.py | 27 - .../relay/models/hybrid_connection_py3.py | 71 -- .../azure/mgmt/relay/models/operation.py | 39 - .../mgmt/relay/models/operation_display.py | 46 -- .../relay/models/operation_display_py3.py | 46 -- .../mgmt/relay/models/operation_paged.py | 27 - .../azure/mgmt/relay/models/operation_py3.py | 39 - .../regenerate_access_key_parameters.py | 41 -- .../regenerate_access_key_parameters_py3.py | 41 -- .../mgmt/relay/models/relay_namespace.py | 83 --- .../relay/models/relay_namespace_paged.py | 27 - .../mgmt/relay/models/relay_namespace_py3.py | 83 --- .../relay/models/relay_update_parameters.py | 77 -- .../models/relay_update_parameters_py3.py | 77 -- .../azure/mgmt/relay/models/resource.py | 45 -- .../relay/models/resource_namespace_patch.py | 46 -- .../models/resource_namespace_patch_py3.py | 46 -- .../azure/mgmt/relay/models/resource_py3.py | 45 -- .../azure/mgmt/relay/models/sku.py | 42 -- .../azure/mgmt/relay/models/sku_py3.py | 42 -- .../mgmt/relay/models/tracked_resource.py | 53 -- .../mgmt/relay/models/tracked_resource_py3.py | 53 -- .../azure/mgmt/relay/models/wcf_relay.py | 85 --- .../mgmt/relay/models/wcf_relay_paged.py | 27 - .../azure/mgmt/relay/models/wcf_relay_py3.py | 85 --- .../azure/mgmt/relay/operations/__init__.py | 8 +- ...s.py => _hybrid_connections_operations.py} | 36 +- ...perations.py => _namespaces_operations.py} | 51 +- .../{operations.py => _operations.py} | 16 +- ...perations.py => _wcf_relays_operations.py} | 36 +- 50 files changed, 1631 insertions(+), 2009 deletions(-) create mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_configuration.py rename sdk/relay/azure-mgmt-relay/azure/mgmt/relay/{relay_management_client.py => _relay_management_client.py} (62%) create mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models.py create mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models_py3.py create mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_paged_models.py rename sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/{relay_management_client_enums.py => _relay_management_client_enums.py} (100%) delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_paged.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_paged.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_paged.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_paged.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource_py3.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_paged.py delete mode 100644 sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_py3.py rename sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/{hybrid_connections_operations.py => _hybrid_connections_operations.py} (98%) rename sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/{namespaces_operations.py => _namespaces_operations.py} (98%) rename sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/{operations.py => _operations.py} (90%) rename sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/{wcf_relays_operations.py => _wcf_relays_operations.py} (98%) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/__init__.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/__init__.py index 2ec056f921c3c..4429e03687b6e 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/__init__.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .relay_management_client import RelayManagementClient -from .version import VERSION +from ._configuration import RelayManagementClientConfiguration +from ._relay_management_client import RelayManagementClient +__all__ = ['RelayManagementClient', 'RelayManagementClientConfiguration'] -__all__ = ['RelayManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_configuration.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_configuration.py new file mode 100644 index 0000000000000..a1b282fb7c486 --- /dev/null +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_configuration.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class RelayManagementClientConfiguration(AzureConfiguration): + """Configuration for RelayManagementClient + 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: Subscription credentials which uniquely identify + the Microsoft Azure subscription. The subscription ID forms part of the + URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(RelayManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-relay/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/relay_management_client.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_relay_management_client.py similarity index 62% rename from sdk/relay/azure-mgmt-relay/azure/mgmt/relay/relay_management_client.py rename to sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_relay_management_client.py index 64cb7b93baabf..180dc6b5bc123 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/relay_management_client.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_relay_management_client.py @@ -11,47 +11,13 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.namespaces_operations import NamespacesOperations -from .operations.hybrid_connections_operations import HybridConnectionsOperations -from .operations.wcf_relays_operations import WCFRelaysOperations -from . import models - - -class RelayManagementClientConfiguration(AzureConfiguration): - """Configuration for RelayManagementClient - 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: Subscription credentials which uniquely identify - the Microsoft Azure subscription. The subscription ID forms part of the - URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(RelayManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('azure-mgmt-relay/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import RelayManagementClientConfiguration +from .operations import Operations +from .operations import NamespacesOperations +from .operations import HybridConnectionsOperations +from .operations import WCFRelaysOperations +from . import models class RelayManagementClient(SDKClient): diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/__init__.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/__init__.py index ad1ad778033be..cb3c895e7eea0 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/__init__.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/__init__.py @@ -10,45 +10,45 @@ # -------------------------------------------------------------------------- try: - from .tracked_resource_py3 import TrackedResource - from .resource_namespace_patch_py3 import ResourceNamespacePatch - from .resource_py3 import Resource - from .hybrid_connection_py3 import HybridConnection - from .wcf_relay_py3 import WcfRelay - from .sku_py3 import Sku - from .relay_namespace_py3 import RelayNamespace - from .relay_update_parameters_py3 import RelayUpdateParameters - from .authorization_rule_py3 import AuthorizationRule - from .access_keys_py3 import AccessKeys - from .regenerate_access_key_parameters_py3 import RegenerateAccessKeyParameters - from .check_name_availability_py3 import CheckNameAvailability - from .check_name_availability_result_py3 import CheckNameAvailabilityResult - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .error_response_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import AccessKeys + from ._models_py3 import AuthorizationRule + from ._models_py3 import CheckNameAvailability + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import HybridConnection + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import RegenerateAccessKeyParameters + from ._models_py3 import RelayNamespace + from ._models_py3 import RelayUpdateParameters + from ._models_py3 import Resource + from ._models_py3 import ResourceNamespacePatch + from ._models_py3 import Sku + from ._models_py3 import TrackedResource + from ._models_py3 import WcfRelay except (SyntaxError, ImportError): - from .tracked_resource import TrackedResource - from .resource_namespace_patch import ResourceNamespacePatch - from .resource import Resource - from .hybrid_connection import HybridConnection - from .wcf_relay import WcfRelay - from .sku import Sku - from .relay_namespace import RelayNamespace - from .relay_update_parameters import RelayUpdateParameters - from .authorization_rule import AuthorizationRule - from .access_keys import AccessKeys - from .regenerate_access_key_parameters import RegenerateAccessKeyParameters - from .check_name_availability import CheckNameAvailability - from .check_name_availability_result import CheckNameAvailabilityResult - from .operation_display import OperationDisplay - from .operation import Operation - from .error_response import ErrorResponse, ErrorResponseException -from .operation_paged import OperationPaged -from .relay_namespace_paged import RelayNamespacePaged -from .authorization_rule_paged import AuthorizationRulePaged -from .hybrid_connection_paged import HybridConnectionPaged -from .wcf_relay_paged import WcfRelayPaged -from .relay_management_client_enums import ( + from ._models import AccessKeys + from ._models import AuthorizationRule + from ._models import CheckNameAvailability + from ._models import CheckNameAvailabilityResult + from ._models import ErrorResponse, ErrorResponseException + from ._models import HybridConnection + from ._models import Operation + from ._models import OperationDisplay + from ._models import RegenerateAccessKeyParameters + from ._models import RelayNamespace + from ._models import RelayUpdateParameters + from ._models import Resource + from ._models import ResourceNamespacePatch + from ._models import Sku + from ._models import TrackedResource + from ._models import WcfRelay +from ._paged_models import AuthorizationRulePaged +from ._paged_models import HybridConnectionPaged +from ._paged_models import OperationPaged +from ._paged_models import RelayNamespacePaged +from ._paged_models import WcfRelayPaged +from ._relay_management_client_enums import ( Relaytype, SkuTier, ProvisioningStateEnum, @@ -58,22 +58,22 @@ ) __all__ = [ - 'TrackedResource', - 'ResourceNamespacePatch', - 'Resource', - 'HybridConnection', - 'WcfRelay', - 'Sku', - 'RelayNamespace', - 'RelayUpdateParameters', - 'AuthorizationRule', 'AccessKeys', - 'RegenerateAccessKeyParameters', + 'AuthorizationRule', 'CheckNameAvailability', 'CheckNameAvailabilityResult', - 'OperationDisplay', - 'Operation', 'ErrorResponse', 'ErrorResponseException', + 'HybridConnection', + 'Operation', + 'OperationDisplay', + 'RegenerateAccessKeyParameters', + 'RelayNamespace', + 'RelayUpdateParameters', + 'Resource', + 'ResourceNamespacePatch', + 'Sku', + 'TrackedResource', + 'WcfRelay', 'OperationPaged', 'RelayNamespacePaged', 'AuthorizationRulePaged', diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models.py new file mode 100644 index 0000000000000..b8c6d66534266 --- /dev/null +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models.py @@ -0,0 +1,683 @@ +# 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 AccessKeys(Model): + """Namespace/Relay Connection String. + + :param primary_connection_string: Primary connection string of the created + namespace authorization rule. + :type primary_connection_string: str + :param secondary_connection_string: Secondary connection string of the + created namespace authorization rule. + :type secondary_connection_string: str + :param primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :type primary_key: str + :param secondary_key: A base64-encoded 256-bit secondary key for signing + and validating the SAS token. + :type secondary_key: str + :param key_name: A string that describes the authorization rule. + :type key_name: str + """ + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessKeys, self).__init__(**kwargs) + self.primary_connection_string = kwargs.get('primary_connection_string', None) + self.secondary_connection_string = kwargs.get('secondary_connection_string', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.key_name = kwargs.get('key_name', None) + + +class Resource(Model): + """The resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AuthorizationRule(Resource): + """Description of a namespace authorization rule. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param rights: Required. The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.relay.models.AccessRights] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'rights': {'required': True, 'unique': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + } + + def __init__(self, **kwargs): + super(AuthorizationRule, self).__init__(**kwargs) + self.rights = kwargs.get('rights', None) + + +class CheckNameAvailability(Model): + """Description of the check name availability request properties. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The namespace name to check for availability. The + namespace name can contain only letters, numbers, and hyphens. The + namespace must start with a letter, and it must end with a letter or + number. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityResult(Model): + """Description of the check name availability request properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: The detailed info regarding the reason associated with the + namespace. + :vartype message: str + :param name_available: Value indicating namespace is available. Returns + true if the namespace is available; otherwise, false. + :type name_available: bool + :param reason: The reason for unavailability of a namespace. Possible + values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', + 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' + :type reason: str or ~azure.mgmt.relay.models.UnavailableReason + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = None + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Error reponse indicates Relay service is not able to process the incoming + request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('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) + + +class HybridConnection(Resource): + """Description of hybrid connection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar created_at: The time the hybrid connection was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar listener_count: The number of listeners for this hybrid connection. + Note that min : 1 and max:25 are supported. + :vartype listener_count: int + :param requires_client_authorization: Returns true if client authorization + is needed for this hybrid connection; otherwise, false. + :type requires_client_authorization: bool + :param user_metadata: The usermetadata is a placeholder to store + user-defined string data for the hybrid connection endpoint. For example, + it can be used to store descriptive data, such as a list of teams and + their contact information. Also, user-defined configuration settings can + be stored. + :type user_metadata: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, + 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, + 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HybridConnection, self).__init__(**kwargs) + self.created_at = None + self.updated_at = None + self.listener_count = None + self.requires_client_authorization = kwargs.get('requires_client_authorization', None) + self.user_metadata = kwargs.get('user_metadata', None) + + +class Operation(Model): + """A Relay REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.relay.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Relay. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class RegenerateAccessKeyParameters(Model): + """Parameters supplied to the regenerate authorization rule operation, + specifies which key neeeds to be reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The access key to regenerate. Possible values + include: 'PrimaryKey', 'SecondaryKey' + :type key_type: str or ~azure.mgmt.relay.models.KeyType + :param key: Optional. If the key value is provided, this is set to key + type, or autogenerated key value set for key type. + :type key: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegenerateAccessKeyParameters, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) + self.key = kwargs.get('key', None) + + +class TrackedResource(Resource): + """Definition of resource. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class RelayNamespace(TrackedResource): + """Description of a namespace resource. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: SKU of the namespace. + :type sku: ~azure.mgmt.relay.models.Sku + :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', + 'Deleted', 'Failed', 'Updating', 'Unknown' + :vartype provisioning_state: str or + ~azure.mgmt.relay.models.ProvisioningStateEnum + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics. + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RelayNamespace, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class ResourceNamespacePatch(Resource): + """Definition of resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceNamespacePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class RelayUpdateParameters(ResourceNamespacePatch): + """Description of a namespace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: SKU of the namespace. + :type sku: ~azure.mgmt.relay.models.Sku + :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', + 'Deleted', 'Failed', 'Updating', 'Unknown' + :vartype provisioning_state: str or + ~azure.mgmt.relay.models.ProvisioningStateEnum + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics. + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RelayUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class Sku(Model): + """SKU of the namespace. + + 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: Required. Name of this SKU. Default value: "Standard" . + :vartype name: str + :param tier: The tier of this SKU. Possible values include: 'Standard' + :type tier: str or ~azure.mgmt.relay.models.SkuTier + """ + + _validation = { + 'name': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + } + + name = "Standard" + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.tier = kwargs.get('tier', None) + + +class WcfRelay(Resource): + """Description of the WCF relay resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar is_dynamic: Returns true if the relay is dynamic; otherwise, false. + :vartype is_dynamic: bool + :ivar created_at: The time the WCF relay was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar listener_count: The number of listeners for this relay. Note that + min :1 and max:25 are supported. + :vartype listener_count: int + :param relay_type: WCF relay type. Possible values include: 'NetTcp', + 'Http' + :type relay_type: str or ~azure.mgmt.relay.models.Relaytype + :param requires_client_authorization: Returns true if client authorization + is needed for this relay; otherwise, false. + :type requires_client_authorization: bool + :param requires_transport_security: Returns true if transport security is + needed for this relay; otherwise, false. + :type requires_transport_security: bool + :param user_metadata: The usermetadata is a placeholder to store + user-defined string data for the WCF Relay endpoint. For example, it can + be used to store descriptive data, such as list of teams and their contact + information. Also, user-defined configuration settings can be stored. + :type user_metadata: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_dynamic': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, + 'relay_type': {'key': 'properties.relayType', 'type': 'Relaytype'}, + 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, + 'requires_transport_security': {'key': 'properties.requiresTransportSecurity', 'type': 'bool'}, + 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WcfRelay, self).__init__(**kwargs) + self.is_dynamic = None + self.created_at = None + self.updated_at = None + self.listener_count = None + self.relay_type = kwargs.get('relay_type', None) + self.requires_client_authorization = kwargs.get('requires_client_authorization', None) + self.requires_transport_security = kwargs.get('requires_transport_security', None) + self.user_metadata = kwargs.get('user_metadata', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models_py3.py new file mode 100644 index 0000000000000..1565f19fac277 --- /dev/null +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_models_py3.py @@ -0,0 +1,683 @@ +# 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 AccessKeys(Model): + """Namespace/Relay Connection String. + + :param primary_connection_string: Primary connection string of the created + namespace authorization rule. + :type primary_connection_string: str + :param secondary_connection_string: Secondary connection string of the + created namespace authorization rule. + :type secondary_connection_string: str + :param primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :type primary_key: str + :param secondary_key: A base64-encoded 256-bit secondary key for signing + and validating the SAS token. + :type secondary_key: str + :param key_name: A string that describes the authorization rule. + :type key_name: str + """ + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, primary_connection_string: str=None, secondary_connection_string: str=None, primary_key: str=None, secondary_key: str=None, key_name: str=None, **kwargs) -> None: + super(AccessKeys, self).__init__(**kwargs) + self.primary_connection_string = primary_connection_string + self.secondary_connection_string = secondary_connection_string + self.primary_key = primary_key + self.secondary_key = secondary_key + self.key_name = key_name + + +class Resource(Model): + """The resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AuthorizationRule(Resource): + """Description of a namespace authorization rule. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param rights: Required. The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.relay.models.AccessRights] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'rights': {'required': True, 'unique': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + } + + def __init__(self, *, rights, **kwargs) -> None: + super(AuthorizationRule, self).__init__(**kwargs) + self.rights = rights + + +class CheckNameAvailability(Model): + """Description of the check name availability request properties. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The namespace name to check for availability. The + namespace name can contain only letters, numbers, and hyphens. The + namespace must start with a letter, and it must end with a letter or + number. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailability, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResult(Model): + """Description of the check name availability request properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: The detailed info regarding the reason associated with the + namespace. + :vartype message: str + :param name_available: Value indicating namespace is available. Returns + true if the namespace is available; otherwise, false. + :type name_available: bool + :param reason: The reason for unavailability of a namespace. Possible + values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', + 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' + :type reason: str or ~azure.mgmt.relay.models.UnavailableReason + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, + } + + def __init__(self, *, name_available: bool=None, reason=None, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = None + self.name_available = name_available + self.reason = reason + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Error reponse indicates Relay service is not able to process the incoming + request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +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) + + +class HybridConnection(Resource): + """Description of hybrid connection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar created_at: The time the hybrid connection was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar listener_count: The number of listeners for this hybrid connection. + Note that min : 1 and max:25 are supported. + :vartype listener_count: int + :param requires_client_authorization: Returns true if client authorization + is needed for this hybrid connection; otherwise, false. + :type requires_client_authorization: bool + :param user_metadata: The usermetadata is a placeholder to store + user-defined string data for the hybrid connection endpoint. For example, + it can be used to store descriptive data, such as a list of teams and + their contact information. Also, user-defined configuration settings can + be stored. + :type user_metadata: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, + 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, + 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, + } + + def __init__(self, *, requires_client_authorization: bool=None, user_metadata: str=None, **kwargs) -> None: + super(HybridConnection, self).__init__(**kwargs) + self.created_at = None + self.updated_at = None + self.listener_count = None + self.requires_client_authorization = requires_client_authorization + self.user_metadata = user_metadata + + +class Operation(Model): + """A Relay REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.relay.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Relay. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class RegenerateAccessKeyParameters(Model): + """Parameters supplied to the regenerate authorization rule operation, + specifies which key neeeds to be reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The access key to regenerate. Possible values + include: 'PrimaryKey', 'SecondaryKey' + :type key_type: str or ~azure.mgmt.relay.models.KeyType + :param key: Optional. If the key value is provided, this is set to key + type, or autogenerated key value set for key type. + :type key: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, key_type, key: str=None, **kwargs) -> None: + super(RegenerateAccessKeyParameters, self).__init__(**kwargs) + self.key_type = key_type + self.key = key + + +class TrackedResource(Resource): + """Definition of resource. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class RelayNamespace(TrackedResource): + """Description of a namespace resource. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: SKU of the namespace. + :type sku: ~azure.mgmt.relay.models.Sku + :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', + 'Deleted', 'Failed', 'Updating', 'Unknown' + :vartype provisioning_state: str or + ~azure.mgmt.relay.models.ProvisioningStateEnum + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics. + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, **kwargs) -> None: + super(RelayNamespace, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class ResourceNamespacePatch(Resource): + """Definition of resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ResourceNamespacePatch, self).__init__(**kwargs) + self.tags = tags + + +class RelayUpdateParameters(ResourceNamespacePatch): + """Description of a namespace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: SKU of the namespace. + :type sku: ~azure.mgmt.relay.models.Sku + :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', + 'Deleted', 'Failed', 'Updating', 'Unknown' + :vartype provisioning_state: str or + ~azure.mgmt.relay.models.ProvisioningStateEnum + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics. + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, sku=None, **kwargs) -> None: + super(RelayUpdateParameters, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class Sku(Model): + """SKU of the namespace. + + 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: Required. Name of this SKU. Default value: "Standard" . + :vartype name: str + :param tier: The tier of this SKU. Possible values include: 'Standard' + :type tier: str or ~azure.mgmt.relay.models.SkuTier + """ + + _validation = { + 'name': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + } + + name = "Standard" + + def __init__(self, *, tier=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.tier = tier + + +class WcfRelay(Resource): + """Description of the WCF relay resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar is_dynamic: Returns true if the relay is dynamic; otherwise, false. + :vartype is_dynamic: bool + :ivar created_at: The time the WCF relay was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar listener_count: The number of listeners for this relay. Note that + min :1 and max:25 are supported. + :vartype listener_count: int + :param relay_type: WCF relay type. Possible values include: 'NetTcp', + 'Http' + :type relay_type: str or ~azure.mgmt.relay.models.Relaytype + :param requires_client_authorization: Returns true if client authorization + is needed for this relay; otherwise, false. + :type requires_client_authorization: bool + :param requires_transport_security: Returns true if transport security is + needed for this relay; otherwise, false. + :type requires_transport_security: bool + :param user_metadata: The usermetadata is a placeholder to store + user-defined string data for the WCF Relay endpoint. For example, it can + be used to store descriptive data, such as list of teams and their contact + information. Also, user-defined configuration settings can be stored. + :type user_metadata: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_dynamic': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, + 'relay_type': {'key': 'properties.relayType', 'type': 'Relaytype'}, + 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, + 'requires_transport_security': {'key': 'properties.requiresTransportSecurity', 'type': 'bool'}, + 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, + } + + def __init__(self, *, relay_type=None, requires_client_authorization: bool=None, requires_transport_security: bool=None, user_metadata: str=None, **kwargs) -> None: + super(WcfRelay, self).__init__(**kwargs) + self.is_dynamic = None + self.created_at = None + self.updated_at = None + self.listener_count = None + self.relay_type = relay_type + self.requires_client_authorization = requires_client_authorization + self.requires_transport_security = requires_transport_security + self.user_metadata = user_metadata diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_paged_models.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_paged_models.py new file mode 100644 index 0000000000000..d0bd5442707e6 --- /dev/null +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_paged_models.py @@ -0,0 +1,79 @@ +# 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) +class RelayNamespacePaged(Paged): + """ + A paging container for iterating over a list of :class:`RelayNamespace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RelayNamespace]'} + } + + def __init__(self, *args, **kwargs): + + super(RelayNamespacePaged, self).__init__(*args, **kwargs) +class AuthorizationRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AuthorizationRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AuthorizationRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AuthorizationRulePaged, self).__init__(*args, **kwargs) +class HybridConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`HybridConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[HybridConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(HybridConnectionPaged, self).__init__(*args, **kwargs) +class WcfRelayPaged(Paged): + """ + A paging container for iterating over a list of :class:`WcfRelay ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WcfRelay]'} + } + + def __init__(self, *args, **kwargs): + + super(WcfRelayPaged, self).__init__(*args, **kwargs) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_management_client_enums.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_relay_management_client_enums.py similarity index 100% rename from sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_management_client_enums.py rename to sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_relay_management_client_enums.py diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys.py deleted file mode 100644 index 73a3001f45d90..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessKeys(Model): - """Namespace/Relay Connection String. - - :param primary_connection_string: Primary connection string of the created - namespace authorization rule. - :type primary_connection_string: str - :param secondary_connection_string: Secondary connection string of the - created namespace authorization rule. - :type secondary_connection_string: str - :param primary_key: A base64-encoded 256-bit primary key for signing and - validating the SAS token. - :type primary_key: str - :param secondary_key: A base64-encoded 256-bit secondary key for signing - and validating the SAS token. - :type secondary_key: str - :param key_name: A string that describes the authorization rule. - :type key_name: str - """ - - _attribute_map = { - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessKeys, self).__init__(**kwargs) - self.primary_connection_string = kwargs.get('primary_connection_string', None) - self.secondary_connection_string = kwargs.get('secondary_connection_string', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.key_name = kwargs.get('key_name', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys_py3.py deleted file mode 100644 index 7b2681c8d93de..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/access_keys_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessKeys(Model): - """Namespace/Relay Connection String. - - :param primary_connection_string: Primary connection string of the created - namespace authorization rule. - :type primary_connection_string: str - :param secondary_connection_string: Secondary connection string of the - created namespace authorization rule. - :type secondary_connection_string: str - :param primary_key: A base64-encoded 256-bit primary key for signing and - validating the SAS token. - :type primary_key: str - :param secondary_key: A base64-encoded 256-bit secondary key for signing - and validating the SAS token. - :type secondary_key: str - :param key_name: A string that describes the authorization rule. - :type key_name: str - """ - - _attribute_map = { - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, *, primary_connection_string: str=None, secondary_connection_string: str=None, primary_key: str=None, secondary_key: str=None, key_name: str=None, **kwargs) -> None: - super(AccessKeys, self).__init__(**kwargs) - self.primary_connection_string = primary_connection_string - self.secondary_connection_string = secondary_connection_string - self.primary_key = primary_key - self.secondary_key = secondary_key - self.key_name = key_name diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule.py deleted file mode 100644 index dc4b5c3e36b11..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AuthorizationRule(Resource): - """Description of a namespace authorization rule. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param rights: Required. The rights associated with the rule. - :type rights: list[str or ~azure.mgmt.relay.models.AccessRights] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'rights': {'required': True, 'unique': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, - } - - def __init__(self, **kwargs): - super(AuthorizationRule, self).__init__(**kwargs) - self.rights = kwargs.get('rights', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_paged.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_paged.py deleted file mode 100644 index f452ea050ef40..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AuthorizationRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`AuthorizationRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AuthorizationRule]'} - } - - def __init__(self, *args, **kwargs): - - super(AuthorizationRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_py3.py deleted file mode 100644 index ffde450c2fe13..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/authorization_rule_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AuthorizationRule(Resource): - """Description of a namespace authorization rule. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param rights: Required. The rights associated with the rule. - :type rights: list[str or ~azure.mgmt.relay.models.AccessRights] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'rights': {'required': True, 'unique': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, - } - - def __init__(self, *, rights, **kwargs) -> None: - super(AuthorizationRule, self).__init__(**kwargs) - self.rights = rights diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability.py deleted file mode 100644 index 6108fa093d3e1..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailability(Model): - """Description of the check name availability request properties. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The namespace name to check for availability. The - namespace name can contain only letters, numbers, and hyphens. The - namespace must start with a letter, and it must end with a letter or - number. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailability, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_py3.py deleted file mode 100644 index a726776ca9a77..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailability(Model): - """Description of the check name availability request properties. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The namespace name to check for availability. The - namespace name can contain only letters, numbers, and hyphens. The - namespace must start with a letter, and it must end with a letter or - number. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailability, self).__init__(**kwargs) - self.name = name diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result.py deleted file mode 100644 index f02fb72b499ba..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResult(Model): - """Description of the check name availability request properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: The detailed info regarding the reason associated with the - namespace. - :vartype message: str - :param name_available: Value indicating namespace is available. Returns - true if the namespace is available; otherwise, false. - :type name_available: bool - :param reason: The reason for unavailability of a namespace. Possible - values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', - 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' - :type reason: str or ~azure.mgmt.relay.models.UnavailableReason - """ - - _validation = { - 'message': {'readonly': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResult, self).__init__(**kwargs) - self.message = None - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result_py3.py deleted file mode 100644 index f623f0561aafb..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/check_name_availability_result_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResult(Model): - """Description of the check name availability request properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: The detailed info regarding the reason associated with the - namespace. - :vartype message: str - :param name_available: Value indicating namespace is available. Returns - true if the namespace is available; otherwise, false. - :type name_available: bool - :param reason: The reason for unavailability of a namespace. Possible - values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', - 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' - :type reason: str or ~azure.mgmt.relay.models.UnavailableReason - """ - - _validation = { - 'message': {'readonly': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, - } - - def __init__(self, *, name_available: bool=None, reason=None, **kwargs) -> None: - super(CheckNameAvailabilityResult, self).__init__(**kwargs) - self.message = None - self.name_available = name_available - self.reason = reason diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response.py deleted file mode 100644 index 46c59e925e8c1..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error reponse indicates Relay service is not able to process the incoming - request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('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/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response_py3.py deleted file mode 100644 index 5056bbd939934..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/error_response_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error reponse indicates Relay service is not able to process the incoming - request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -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/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection.py deleted file mode 100644 index b2dabd7466f19..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class HybridConnection(Resource): - """Description of hybrid connection resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar created_at: The time the hybrid connection was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar listener_count: The number of listeners for this hybrid connection. - Note that min : 1 and max:25 are supported. - :vartype listener_count: int - :param requires_client_authorization: Returns true if client authorization - is needed for this hybrid connection; otherwise, false. - :type requires_client_authorization: bool - :param user_metadata: The usermetadata is a placeholder to store - user-defined string data for the hybrid connection endpoint. For example, - it can be used to store descriptive data, such as a list of teams and - their contact information. Also, user-defined configuration settings can - be stored. - :type user_metadata: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, - 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, - 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HybridConnection, self).__init__(**kwargs) - self.created_at = None - self.updated_at = None - self.listener_count = None - self.requires_client_authorization = kwargs.get('requires_client_authorization', None) - self.user_metadata = kwargs.get('user_metadata', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_paged.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_paged.py deleted file mode 100644 index c2cdcac1cc26b..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class HybridConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`HybridConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HybridConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(HybridConnectionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_py3.py deleted file mode 100644 index 04b47ad229232..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class HybridConnection(Resource): - """Description of hybrid connection resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar created_at: The time the hybrid connection was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar listener_count: The number of listeners for this hybrid connection. - Note that min : 1 and max:25 are supported. - :vartype listener_count: int - :param requires_client_authorization: Returns true if client authorization - is needed for this hybrid connection; otherwise, false. - :type requires_client_authorization: bool - :param user_metadata: The usermetadata is a placeholder to store - user-defined string data for the hybrid connection endpoint. For example, - it can be used to store descriptive data, such as a list of teams and - their contact information. Also, user-defined configuration settings can - be stored. - :type user_metadata: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, - 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, - 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, - } - - def __init__(self, *, requires_client_authorization: bool=None, user_metadata: str=None, **kwargs) -> None: - super(HybridConnection, self).__init__(**kwargs) - self.created_at = None - self.updated_at = None - self.listener_count = None - self.requires_client_authorization = requires_client_authorization - self.user_metadata = user_metadata diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation.py deleted file mode 100644 index 5bff3c000c80a..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Relay REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation} - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.relay.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display.py deleted file mode 100644 index a8eaeee8622da..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Relay. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Invoice, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display_py3.py deleted file mode 100644 index ee850026500d2..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_display_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Relay. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Invoice, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_paged.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_paged.py deleted file mode 100644 index 4cbe3ebcfde0a..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class 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/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_py3.py deleted file mode 100644 index 1c446d85e9321..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Relay REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation} - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.relay.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters.py deleted file mode 100644 index a06da742b2784..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegenerateAccessKeyParameters(Model): - """Parameters supplied to the regenerate authorization rule operation, - specifies which key neeeds to be reset. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The access key to regenerate. Possible values - include: 'PrimaryKey', 'SecondaryKey' - :type key_type: str or ~azure.mgmt.relay.models.KeyType - :param key: Optional. If the key value is provided, this is set to key - type, or autogenerated key value set for key type. - :type key: str - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'KeyType'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegenerateAccessKeyParameters, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) - self.key = kwargs.get('key', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters_py3.py deleted file mode 100644 index 0e41dadb27b73..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/regenerate_access_key_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegenerateAccessKeyParameters(Model): - """Parameters supplied to the regenerate authorization rule operation, - specifies which key neeeds to be reset. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The access key to regenerate. Possible values - include: 'PrimaryKey', 'SecondaryKey' - :type key_type: str or ~azure.mgmt.relay.models.KeyType - :param key: Optional. If the key value is provided, this is set to key - type, or autogenerated key value set for key type. - :type key: str - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'KeyType'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, key_type, key: str=None, **kwargs) -> None: - super(RegenerateAccessKeyParameters, self).__init__(**kwargs) - self.key_type = key_type - self.key = key diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace.py deleted file mode 100644 index 371a68b21ee9a..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class RelayNamespace(TrackedResource): - """Description of a namespace resource. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: SKU of the namespace. - :type sku: ~azure.mgmt.relay.models.Sku - :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', - 'Deleted', 'Failed', 'Updating', 'Unknown' - :vartype provisioning_state: str or - ~azure.mgmt.relay.models.ProvisioningStateEnum - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics. - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RelayNamespace, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_paged.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_paged.py deleted file mode 100644 index cc1223c5784c3..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RelayNamespacePaged(Paged): - """ - A paging container for iterating over a list of :class:`RelayNamespace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RelayNamespace]'} - } - - def __init__(self, *args, **kwargs): - - super(RelayNamespacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_py3.py deleted file mode 100644 index ea72eacfd1c28..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_namespace_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class RelayNamespace(TrackedResource): - """Description of a namespace resource. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: SKU of the namespace. - :type sku: ~azure.mgmt.relay.models.Sku - :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', - 'Deleted', 'Failed', 'Updating', 'Unknown' - :vartype provisioning_state: str or - ~azure.mgmt.relay.models.ProvisioningStateEnum - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics. - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, **kwargs) -> None: - super(RelayNamespace, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters.py deleted file mode 100644 index b2276035c62cb..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_namespace_patch import ResourceNamespacePatch - - -class RelayUpdateParameters(ResourceNamespacePatch): - """Description of a namespace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: SKU of the namespace. - :type sku: ~azure.mgmt.relay.models.Sku - :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', - 'Deleted', 'Failed', 'Updating', 'Unknown' - :vartype provisioning_state: str or - ~azure.mgmt.relay.models.ProvisioningStateEnum - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics. - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RelayUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters_py3.py deleted file mode 100644 index 0d18f809a3d7f..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/relay_update_parameters_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_namespace_patch_py3 import ResourceNamespacePatch - - -class RelayUpdateParameters(ResourceNamespacePatch): - """Description of a namespace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param sku: SKU of the namespace. - :type sku: ~azure.mgmt.relay.models.Sku - :ivar provisioning_state: Possible values include: 'Created', 'Succeeded', - 'Deleted', 'Failed', 'Updating', 'Unknown' - :vartype provisioning_state: str or - ~azure.mgmt.relay.models.ProvisioningStateEnum - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics. - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateEnum'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, *, tags=None, sku=None, **kwargs) -> None: - super(RelayUpdateParameters, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource.py deleted file mode 100644 index b1ef73099bc6c..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch.py deleted file mode 100644 index f4991ad6d3137..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ResourceNamespacePatch(Resource): - """Definition of resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceNamespacePatch, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch_py3.py deleted file mode 100644 index 3cee2173bc9d4..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_namespace_patch_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ResourceNamespacePatch(Resource): - """Definition of resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ResourceNamespacePatch, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_py3.py deleted file mode 100644 index 1a0890e76b74a..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku.py deleted file mode 100644 index 9162fd1c09707..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """SKU of the namespace. - - 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: Required. Name of this SKU. Default value: "Standard" . - :vartype name: str - :param tier: The tier of this SKU. Possible values include: 'Standard' - :type tier: str or ~azure.mgmt.relay.models.SkuTier - """ - - _validation = { - 'name': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'SkuTier'}, - } - - name = "Standard" - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.tier = kwargs.get('tier', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku_py3.py deleted file mode 100644 index c81d3789b1779..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/sku_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """SKU of the namespace. - - 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: Required. Name of this SKU. Default value: "Standard" . - :vartype name: str - :param tier: The tier of this SKU. Possible values include: 'Standard' - :type tier: str or ~azure.mgmt.relay.models.SkuTier - """ - - _validation = { - 'name': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'SkuTier'}, - } - - name = "Standard" - - def __init__(self, *, tier=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.tier = tier diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource.py deleted file mode 100644 index 6ad63c681ff37..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """Definition of resource. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource_py3.py deleted file mode 100644 index 0f570808a6fad..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """Definition of resource. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay.py deleted file mode 100644 index f3d28a56e8cec..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class WcfRelay(Resource): - """Description of the WCF relay resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar is_dynamic: Returns true if the relay is dynamic; otherwise, false. - :vartype is_dynamic: bool - :ivar created_at: The time the WCF relay was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar listener_count: The number of listeners for this relay. Note that - min :1 and max:25 are supported. - :vartype listener_count: int - :param relay_type: WCF relay type. Possible values include: 'NetTcp', - 'Http' - :type relay_type: str or ~azure.mgmt.relay.models.Relaytype - :param requires_client_authorization: Returns true if client authorization - is needed for this relay; otherwise, false. - :type requires_client_authorization: bool - :param requires_transport_security: Returns true if transport security is - needed for this relay; otherwise, false. - :type requires_transport_security: bool - :param user_metadata: The usermetadata is a placeholder to store - user-defined string data for the WCF Relay endpoint. For example, it can - be used to store descriptive data, such as list of teams and their contact - information. Also, user-defined configuration settings can be stored. - :type user_metadata: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'is_dynamic': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, - 'relay_type': {'key': 'properties.relayType', 'type': 'Relaytype'}, - 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, - 'requires_transport_security': {'key': 'properties.requiresTransportSecurity', 'type': 'bool'}, - 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WcfRelay, self).__init__(**kwargs) - self.is_dynamic = None - self.created_at = None - self.updated_at = None - self.listener_count = None - self.relay_type = kwargs.get('relay_type', None) - self.requires_client_authorization = kwargs.get('requires_client_authorization', None) - self.requires_transport_security = kwargs.get('requires_transport_security', None) - self.user_metadata = kwargs.get('user_metadata', None) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_paged.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_paged.py deleted file mode 100644 index 6235b75858ed7..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WcfRelayPaged(Paged): - """ - A paging container for iterating over a list of :class:`WcfRelay ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WcfRelay]'} - } - - def __init__(self, *args, **kwargs): - - super(WcfRelayPaged, self).__init__(*args, **kwargs) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_py3.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_py3.py deleted file mode 100644 index 512335165cfd6..0000000000000 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/wcf_relay_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class WcfRelay(Resource): - """Description of the WCF relay resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar is_dynamic: Returns true if the relay is dynamic; otherwise, false. - :vartype is_dynamic: bool - :ivar created_at: The time the WCF relay was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar listener_count: The number of listeners for this relay. Note that - min :1 and max:25 are supported. - :vartype listener_count: int - :param relay_type: WCF relay type. Possible values include: 'NetTcp', - 'Http' - :type relay_type: str or ~azure.mgmt.relay.models.Relaytype - :param requires_client_authorization: Returns true if client authorization - is needed for this relay; otherwise, false. - :type requires_client_authorization: bool - :param requires_transport_security: Returns true if transport security is - needed for this relay; otherwise, false. - :type requires_transport_security: bool - :param user_metadata: The usermetadata is a placeholder to store - user-defined string data for the WCF Relay endpoint. For example, it can - be used to store descriptive data, such as list of teams and their contact - information. Also, user-defined configuration settings can be stored. - :type user_metadata: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'is_dynamic': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'listener_count': {'readonly': True, 'maximum': 25, 'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'listener_count': {'key': 'properties.listenerCount', 'type': 'int'}, - 'relay_type': {'key': 'properties.relayType', 'type': 'Relaytype'}, - 'requires_client_authorization': {'key': 'properties.requiresClientAuthorization', 'type': 'bool'}, - 'requires_transport_security': {'key': 'properties.requiresTransportSecurity', 'type': 'bool'}, - 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, - } - - def __init__(self, *, relay_type=None, requires_client_authorization: bool=None, requires_transport_security: bool=None, user_metadata: str=None, **kwargs) -> None: - super(WcfRelay, self).__init__(**kwargs) - self.is_dynamic = None - self.created_at = None - self.updated_at = None - self.listener_count = None - self.relay_type = relay_type - self.requires_client_authorization = requires_client_authorization - self.requires_transport_security = requires_transport_security - self.user_metadata = user_metadata diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/__init__.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/__init__.py index 20f9ef1c9a591..a33c2b74bbf00 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/__init__.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/__init__.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .namespaces_operations import NamespacesOperations -from .hybrid_connections_operations import HybridConnectionsOperations -from .wcf_relays_operations import WCFRelaysOperations +from ._operations import Operations +from ._namespaces_operations import NamespacesOperations +from ._hybrid_connections_operations import HybridConnectionsOperations +from ._wcf_relays_operations import WCFRelaysOperations __all__ = [ 'Operations', diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/hybrid_connections_operations.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_hybrid_connections_operations.py similarity index 98% rename from sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/hybrid_connections_operations.py rename to sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_hybrid_connections_operations.py index e1517baa76639..041c64032eeff 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/hybrid_connections_operations.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_hybrid_connections_operations.py @@ -18,6 +18,8 @@ class HybridConnectionsOperations(object): """HybridConnectionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -56,8 +58,7 @@ def list_by_namespace( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_namespace.metadata['url'] @@ -88,6 +89,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -96,12 +102,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.HybridConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections'} @@ -176,7 +180,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('HybridConnection', response) @@ -297,7 +300,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('HybridConnection', response) @@ -330,8 +332,7 @@ def list_authorization_rules( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_authorization_rules.metadata['url'] @@ -363,6 +364,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -371,12 +377,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules'} @@ -446,7 +450,6 @@ def create_or_update_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AuthorizationRule', response) @@ -573,7 +576,6 @@ def get_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AuthorizationRule', response) @@ -641,7 +643,6 @@ def list_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) @@ -722,7 +723,6 @@ def regenerate_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/namespaces_operations.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_namespaces_operations.py similarity index 98% rename from sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/namespaces_operations.py rename to sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_namespaces_operations.py index 2c824ca92d28b..61583d90aaf01 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/namespaces_operations.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_namespaces_operations.py @@ -20,6 +20,8 @@ class NamespacesOperations(object): """NamespacesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -93,7 +95,6 @@ def check_name_availability_method( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) @@ -120,8 +121,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -150,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -158,12 +163,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RelayNamespacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RelayNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RelayNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Relay/namespaces'} @@ -186,8 +189,7 @@ def list_by_resource_group( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -217,6 +219,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -225,12 +232,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RelayNamespacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RelayNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RelayNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces'} @@ -468,7 +473,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RelayNamespace', response) @@ -541,7 +545,6 @@ def update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RelayNamespace', response) if response.status_code == 201: @@ -574,8 +577,7 @@ def list_authorization_rules( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_authorization_rules.metadata['url'] @@ -606,6 +608,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -614,12 +621,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules'} @@ -686,7 +691,6 @@ def create_or_update_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AuthorizationRule', response) @@ -807,7 +811,6 @@ def get_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AuthorizationRule', response) @@ -872,7 +875,6 @@ def list_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) @@ -950,7 +952,6 @@ def regenerate_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/operations.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_operations.py similarity index 90% rename from sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/operations.py rename to sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_operations.py index 545badf3c1070..9da96de7a9ae1 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/operations.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_operations.py @@ -18,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Relay/operations'} diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/wcf_relays_operations.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_wcf_relays_operations.py similarity index 98% rename from sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/wcf_relays_operations.py rename to sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_wcf_relays_operations.py index 0190da6dfafa6..1827cdd4171f1 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/wcf_relays_operations.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_wcf_relays_operations.py @@ -19,6 +19,8 @@ class WCFRelaysOperations(object): """WCFRelaysOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,8 +59,7 @@ def list_by_namespace( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_namespace.metadata['url'] @@ -89,6 +90,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -97,12 +103,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WcfRelayPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WcfRelayPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WcfRelayPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays'} @@ -167,7 +171,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WcfRelay', response) @@ -288,7 +291,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('WcfRelay', response) @@ -320,8 +322,7 @@ def list_authorization_rules( ~azure.mgmt.relay.models.AuthorizationRulePaged[~azure.mgmt.relay.models.AuthorizationRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_authorization_rules.metadata['url'] @@ -353,6 +354,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -363,12 +369,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.AuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules'} @@ -438,7 +442,6 @@ def create_or_update_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AuthorizationRule', response) @@ -565,7 +568,6 @@ def get_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AuthorizationRule', response) @@ -633,7 +635,6 @@ def list_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) @@ -714,7 +715,6 @@ def regenerate_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response)