From 62833da64e329b6ff484cacc8dbbb2f35929080d Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 23 Oct 2019 17:41:58 +0000 Subject: [PATCH] Generated from 458d27229157e306c716253a135b8189549fd66c Using the filter for collection call to return specific definitions. Created separate path for point get call. Previous comment: New api-version, having new resource type - marketplaceregistrationdefinition. --- .../azure/mgmt/managedservices/__init__.py | 7 +- .../mgmt/managedservices/_configuration.py | 43 ++ ..._client.py => _managed_services_client.py} | 44 +- .../mgmt/managedservices/models/__init__.py | 78 +-- ...s.py => _managed_services_client_enums.py} | 0 .../mgmt/managedservices/models/_models.py | 508 ++++++++++++++++++ .../managedservices/models/_models_py3.py | 508 ++++++++++++++++++ ...n_assignment_paged.py => _paged_models.py} | 13 + .../managedservices/models/authorization.py | 45 -- .../models/authorization_py3.py | 45 -- .../managedservices/models/error_response.py | 50 -- .../models/error_response_error.py | 41 -- .../models/error_response_error_py3.py | 41 -- .../models/error_response_py3.py | 50 -- .../mgmt/managedservices/models/operation.py | 40 -- .../models/operation_display.py | 41 -- .../models/operation_display_py3.py | 41 -- .../managedservices/models/operation_list.py | 35 -- .../models/operation_list_py3.py | 35 -- .../managedservices/models/operation_py3.py | 40 -- .../azure/mgmt/managedservices/models/plan.py | 49 -- .../mgmt/managedservices/models/plan_py3.py | 49 -- .../models/registration_assignment.py | 50 -- .../registration_assignment_properties.py | 54 -- .../registration_assignment_properties_py3.py | 54 -- ...ment_properties_registration_definition.py | 56 -- ...ties_registration_definition_properties.py | 62 --- ..._registration_definition_properties_py3.py | 62 --- ..._properties_registration_definition_py3.py | 56 -- .../models/registration_assignment_py3.py | 50 -- .../models/registration_definition.py | 54 -- .../models/registration_definition_paged.py | 27 - .../registration_definition_properties.py | 67 --- .../registration_definition_properties_py3.py | 67 --- .../models/registration_definition_py3.py | 54 -- .../managedservices/operations/__init__.py | 8 +- ...ace_registration_definitions_operations.py | 176 ++++++ .../{operations.py => _operations.py} | 7 +- ...> _registration_assignments_operations.py} | 21 +- ...> _registration_definitions_operations.py} | 21 +- 40 files changed, 1335 insertions(+), 1414 deletions(-) create mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py rename sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/{managed_services_client.py => _managed_services_client.py} (64%) rename sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/{managed_services_client_enums.py => _managed_services_client_enums.py} (100%) create mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py create mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py rename sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/{registration_assignment_paged.py => _paged_models.py} (67%) delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py create mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py rename sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/{operations.py => _operations.py} (94%) rename sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/{registration_assignments_operations.py => _registration_assignments_operations.py} (97%) rename sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/{registration_definitions_operations.py => _registration_definitions_operations.py} (96%) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py index 395333b4333e..92bedf358291 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .managed_services_client import ManagedServicesClient -from .version import VERSION +from ._configuration import ManagedServicesClientConfiguration +from ._managed_services_client import ManagedServicesClient +__all__ = ['ManagedServicesClient', 'ManagedServicesClientConfiguration'] -__all__ = ['ManagedServicesClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py new file mode 100644 index 000000000000..308e6a180e30 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py @@ -0,0 +1,43 @@ +# 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 ManagedServicesClientConfiguration(AzureConfiguration): + """Configuration for ManagedServicesClient + 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 str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ManagedServicesClientConfiguration, 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-managedservices/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py similarity index 64% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py index 44ac713474e6..4389031b0a9f 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py @@ -11,39 +11,13 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.registration_definitions_operations import RegistrationDefinitionsOperations -from .operations.registration_assignments_operations import RegistrationAssignmentsOperations -from .operations.operations import Operations -from . import models - - -class ManagedServicesClientConfiguration(AzureConfiguration): - """Configuration for ManagedServicesClient - 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 str base_url: Service URL - """ - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ManagedServicesClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-managedservices/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials +from ._configuration import ManagedServicesClientConfiguration +from .operations import RegistrationDefinitionsOperations +from .operations import RegistrationAssignmentsOperations +from .operations import MarketplaceRegistrationDefinitionsOperations +from .operations import Operations +from . import models class ManagedServicesClient(SDKClient): @@ -56,6 +30,8 @@ class ManagedServicesClient(SDKClient): :vartype registration_definitions: azure.mgmt.managedservices.operations.RegistrationDefinitionsOperations :ivar registration_assignments: RegistrationAssignments operations :vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations + :ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitions operations + :vartype marketplace_registration_definitions: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.managedservices.operations.Operations @@ -72,7 +48,7 @@ def __init__( super(ManagedServicesClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-06-01' + self.api_version = '2019-09-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -80,5 +56,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.registration_assignments = RegistrationAssignmentsOperations( self._client, self.config, self._serialize, self._deserialize) + self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py index e5f57b0313ff..9ef6595e0467 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py @@ -10,53 +10,53 @@ # -------------------------------------------------------------------------- try: - from .authorization_py3 import Authorization - from .registration_definition_properties_py3 import RegistrationDefinitionProperties - from .plan_py3 import Plan - from .registration_definition_py3 import RegistrationDefinition - from .registration_assignment_properties_registration_definition_properties_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties - from .registration_assignment_properties_registration_definition_py3 import RegistrationAssignmentPropertiesRegistrationDefinition - from .registration_assignment_properties_py3 import RegistrationAssignmentProperties - from .registration_assignment_py3 import RegistrationAssignment - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_py3 import OperationList - from .error_response_error_py3 import ErrorResponseError - from .error_response_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Authorization + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponseError + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationList + from ._models_py3 import Plan + from ._models_py3 import RegistrationAssignment + from ._models_py3 import RegistrationAssignmentProperties + from ._models_py3 import RegistrationAssignmentPropertiesRegistrationDefinition + from ._models_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties + from ._models_py3 import RegistrationDefinition + from ._models_py3 import RegistrationDefinitionProperties except (SyntaxError, ImportError): - from .authorization import Authorization - from .registration_definition_properties import RegistrationDefinitionProperties - from .plan import Plan - from .registration_definition import RegistrationDefinition - from .registration_assignment_properties_registration_definition_properties import RegistrationAssignmentPropertiesRegistrationDefinitionProperties - from .registration_assignment_properties_registration_definition import RegistrationAssignmentPropertiesRegistrationDefinition - from .registration_assignment_properties import RegistrationAssignmentProperties - from .registration_assignment import RegistrationAssignment - from .operation_display import OperationDisplay - from .operation import Operation - from .operation_list import OperationList - from .error_response_error import ErrorResponseError - from .error_response import ErrorResponse, ErrorResponseException -from .registration_definition_paged import RegistrationDefinitionPaged -from .registration_assignment_paged import RegistrationAssignmentPaged -from .managed_services_client_enums import ( + from ._models import Authorization + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponseError + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationList + from ._models import Plan + from ._models import RegistrationAssignment + from ._models import RegistrationAssignmentProperties + from ._models import RegistrationAssignmentPropertiesRegistrationDefinition + from ._models import RegistrationAssignmentPropertiesRegistrationDefinitionProperties + from ._models import RegistrationDefinition + from ._models import RegistrationDefinitionProperties +from ._paged_models import RegistrationAssignmentPaged +from ._paged_models import RegistrationDefinitionPaged +from ._managed_services_client_enums import ( ProvisioningState, ) __all__ = [ 'Authorization', - 'RegistrationDefinitionProperties', - 'Plan', - 'RegistrationDefinition', - 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties', - 'RegistrationAssignmentPropertiesRegistrationDefinition', - 'RegistrationAssignmentProperties', - 'RegistrationAssignment', - 'OperationDisplay', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponseError', 'Operation', + 'OperationDisplay', 'OperationList', - 'ErrorResponseError', - 'ErrorResponse', 'ErrorResponseException', + 'Plan', + 'RegistrationAssignment', + 'RegistrationAssignmentProperties', + 'RegistrationAssignmentPropertiesRegistrationDefinition', + 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties', + 'RegistrationDefinition', + 'RegistrationDefinitionProperties', 'RegistrationDefinitionPaged', 'RegistrationAssignmentPaged', 'ProvisioningState', diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py similarity index 100% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py new file mode 100644 index 000000000000..f3ddf86237ce --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py @@ -0,0 +1,508 @@ +# 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 Authorization(Model): + """Authorization tuple containing principal Id (of user/service + principal/security group) and role definition id. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. Principal Id of the security group/service + principal/user that would be assigned permissions to the projected + subscription + :type principal_id: str + :param role_definition_id: Required. The role definition identifier. This + role will define all the permissions that the security group/service + principal/user must have on the projected subscription. This role cannot + be an owner role. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Authorization, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error response indicates Azure Resource Manager is not able + to process the incoming request. The reason is provided in the error + message. + :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = 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 ErrorResponseError(Model): + """Error response indicates Azure Resource Manager is not able to process the + incoming request. The reason is provided in the error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message indicating why the operation + failed. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Operation(Model): + """Object that describes a single Microsoft.ManagedServices 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 + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'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 = None + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ManagedServices + :type provider: str + :param resource: Resource on which the operation is performed: + Registration definition, registration assignment etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationList(Model): + """List of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Microsoft.ManagedServices operations. + :vartype value: list[~azure.mgmt.managedservices.models.Operation] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs): + super(OperationList, self).__init__(**kwargs) + self.value = None + + +class Plan(Model): + """Plan details for the managed services. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan name. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. The product code. + :type product: str + :param version: Required. The plan's version. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.version = kwargs.get('version', None) + + +class RegistrationAssignment(Model): + """Registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties + :ivar id: The fully qualified path of the registration assignment. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration assignment. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignment, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentProperties(Model): + """Properties of a registration assignment. + + 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. + + :param registration_definition_id: Required. Fully qualified path of the + registration definition. + :type registration_definition_id: str + :ivar provisioning_state: Current state of the registration assignment. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar registration_definition: Registration definition inside registration + assignment. + :vartype registration_definition: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition + """ + + _validation = { + 'registration_definition_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'registration_definition': {'readonly': True}, + } + + _attribute_map = { + 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentProperties, self).__init__(**kwargs) + self.registration_definition_id = kwargs.get('registration_definition_id', None) + self.provisioning_state = None + self.registration_definition = None + + +class RegistrationAssignmentPropertiesRegistrationDefinition(Model): + """Registration definition inside registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of registration definition inside + registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.plan = kwargs.get('plan', None) + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): + """Properties of registration definition inside registration assignment. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Authorization tuple containing principal id of the + user/security group or service principal and id of the build-in role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :param managee_tenant_id: Id of the home tenant. + :type managee_tenant_id: str + :param managee_tenant_name: Name of the home tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: Id of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: Name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorizations = kwargs.get('authorizations', None) + self.registration_definition_name = kwargs.get('registration_definition_name', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.managee_tenant_id = kwargs.get('managee_tenant_id', None) + self.managee_tenant_name = kwargs.get('managee_tenant_name', None) + self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) + self.managed_by_tenant_name = kwargs.get('managed_by_tenant_name', None) + + +class RegistrationDefinition(Model): + """Registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.plan = kwargs.get('plan', None) + self.id = None + self.type = None + self.name = None + + +class RegistrationDefinitionProperties(Model): + """Properties of a registration definition. + + 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. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Required. Authorization tuple containing principal + id of the user/security group or service principal and id of the build-in + role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar managed_by_tenant_name: Name of the managedBy tenant. + :vartype managed_by_tenant_name: str + """ + + _validation = { + 'authorizations': {'required': True}, + 'managed_by_tenant_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorizations = kwargs.get('authorizations', None) + self.registration_definition_name = kwargs.get('registration_definition_name', None) + self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) + self.provisioning_state = None + self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py new file mode 100644 index 000000000000..acbdf1365074 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py @@ -0,0 +1,508 @@ +# 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 Authorization(Model): + """Authorization tuple containing principal Id (of user/service + principal/security group) and role definition id. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. Principal Id of the security group/service + principal/user that would be assigned permissions to the projected + subscription + :type principal_id: str + :param role_definition_id: Required. The role definition identifier. This + role will define all the permissions that the security group/service + principal/user must have on the projected subscription. This role cannot + be an owner role. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None: + super(Authorization, self).__init__(**kwargs) + self.principal_id = principal_id + self.role_definition_id = role_definition_id + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error response indicates Azure Resource Manager is not able + to process the incoming request. The reason is provided in the error + message. + :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = 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 ErrorResponseError(Model): + """Error response indicates Azure Resource Manager is not able to process the + incoming request. The reason is provided in the error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message indicating why the operation + failed. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Operation(Model): + """Object that describes a single Microsoft.ManagedServices 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 + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ManagedServices + :type provider: str + :param resource: Resource on which the operation is performed: + Registration definition, registration assignment etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationList(Model): + """List of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Microsoft.ManagedServices operations. + :vartype value: list[~azure.mgmt.managedservices.models.Operation] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationList, self).__init__(**kwargs) + self.value = None + + +class Plan(Model): + """Plan details for the managed services. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan name. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. The product code. + :type product: str + :param version: Required. The plan's version. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str, publisher: str, product: str, version: str, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.version = version + + +class RegistrationAssignment(Model): + """Registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties + :ivar id: The fully qualified path of the registration assignment. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration assignment. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(RegistrationAssignment, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentProperties(Model): + """Properties of a registration assignment. + + 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. + + :param registration_definition_id: Required. Fully qualified path of the + registration definition. + :type registration_definition_id: str + :ivar provisioning_state: Current state of the registration assignment. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar registration_definition: Registration definition inside registration + assignment. + :vartype registration_definition: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition + """ + + _validation = { + 'registration_definition_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'registration_definition': {'readonly': True}, + } + + _attribute_map = { + 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, + } + + def __init__(self, *, registration_definition_id: str, **kwargs) -> None: + super(RegistrationAssignmentProperties, self).__init__(**kwargs) + self.registration_definition_id = registration_definition_id + self.provisioning_state = None + self.registration_definition = None + + +class RegistrationAssignmentPropertiesRegistrationDefinition(Model): + """Registration definition inside registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of registration definition inside + registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, plan=None, **kwargs) -> None: + super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) + self.properties = properties + self.plan = plan + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): + """Properties of registration definition inside registration assignment. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Authorization tuple containing principal id of the + user/security group or service principal and id of the build-in role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :param managee_tenant_id: Id of the home tenant. + :type managee_tenant_id: str + :param managee_tenant_name: Name of the home tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: Id of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: Name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, authorizations=None, registration_definition_name: str=None, provisioning_state=None, managee_tenant_id: str=None, managee_tenant_name: str=None, managed_by_tenant_id: str=None, managed_by_tenant_name: str=None, **kwargs) -> None: + super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = description + self.authorizations = authorizations + self.registration_definition_name = registration_definition_name + self.provisioning_state = provisioning_state + self.managee_tenant_id = managee_tenant_id + self.managee_tenant_name = managee_tenant_name + self.managed_by_tenant_id = managed_by_tenant_id + self.managed_by_tenant_name = managed_by_tenant_name + + +class RegistrationDefinition(Model): + """Registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, plan=None, **kwargs) -> None: + super(RegistrationDefinition, self).__init__(**kwargs) + self.properties = properties + self.plan = plan + self.id = None + self.type = None + self.name = None + + +class RegistrationDefinitionProperties(Model): + """Properties of a registration definition. + + 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. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Required. Authorization tuple containing principal + id of the user/security group or service principal and id of the build-in + role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar managed_by_tenant_name: Name of the managedBy tenant. + :vartype managed_by_tenant_name: str + """ + + _validation = { + 'authorizations': {'required': True}, + 'managed_by_tenant_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, *, authorizations, managed_by_tenant_id: str, description: str=None, registration_definition_name: str=None, **kwargs) -> None: + super(RegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = description + self.authorizations = authorizations + self.registration_definition_name = registration_definition_name + self.managed_by_tenant_id = managed_by_tenant_id + self.provisioning_state = None + self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py similarity index 67% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py index 21a68092ffb5..a5fdea1e54f9 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py @@ -12,6 +12,19 @@ from msrest.paging import Paged +class RegistrationDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegistrationDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegistrationDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(RegistrationDefinitionPaged, self).__init__(*args, **kwargs) class RegistrationAssignmentPaged(Paged): """ A paging container for iterating over a list of :class:`RegistrationAssignment ` object diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py deleted file mode 100644 index d44f2b851134..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.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 Authorization(Model): - """Authorization tuple containing principal Id (of user/service - principal/security group) and role definition id. - - All required parameters must be populated in order to send to Azure. - - :param principal_id: Required. Principal Id of the security group/service - principal/user that would be assigned permissions to the projected - subscription - :type principal_id: str - :param role_definition_id: Required. The role definition identifier. This - role will define all the permissions that the security group/service - principal/user must have on the projected subscription. This role cannot - be an owner role. - :type role_definition_id: str - """ - - _validation = { - 'principal_id': {'required': True}, - 'role_definition_id': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Authorization, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.role_definition_id = kwargs.get('role_definition_id', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py deleted file mode 100644 index dd5307748705..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_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 Authorization(Model): - """Authorization tuple containing principal Id (of user/service - principal/security group) and role definition id. - - All required parameters must be populated in order to send to Azure. - - :param principal_id: Required. Principal Id of the security group/service - principal/user that would be assigned permissions to the projected - subscription - :type principal_id: str - :param role_definition_id: Required. The role definition identifier. This - role will define all the permissions that the security group/service - principal/user must have on the projected subscription. This role cannot - be an owner role. - :type role_definition_id: str - """ - - _validation = { - 'principal_id': {'required': True}, - 'role_definition_id': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - } - - def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None: - super(Authorization, self).__init__(**kwargs) - self.principal_id = principal_id - self.role_definition_id = role_definition_id diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py deleted file mode 100644 index 0bb2ae53f561..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py +++ /dev/null @@ -1,50 +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 response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar error: Error response indicates Azure Resource Manager is not able - to process the incoming request. The reason is provided in the error - message. - :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseError'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = 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/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py deleted file mode 100644 index a22a3fe7daf9..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.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 ErrorResponseError(Model): - """Error response indicates Azure Resource Manager is not able to process the - incoming request. The reason is provided in the error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. - :type code: str - :param message: Required. Error message indicating why the operation - failed. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponseError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py deleted file mode 100644 index 0407b0d4e106..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_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 ErrorResponseError(Model): - """Error response indicates Azure Resource Manager is not able to process the - incoming request. The reason is provided in the error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. - :type code: str - :param message: Required. Error message indicating why the operation - failed. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str, message: str, **kwargs) -> None: - super(ErrorResponseError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py deleted file mode 100644 index 65bd21421859..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py +++ /dev/null @@ -1,50 +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 response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar error: Error response indicates Azure Resource Manager is not able - to process the incoming request. The reason is provided in the error - message. - :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = 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/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py deleted file mode 100644 index 2b4fc63804f8..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Object that describes a single Microsoft.ManagedServices 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 - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'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 = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py deleted file mode 100644 index ff3c7d57b1bf..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.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 OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ManagedServices - :type provider: str - :param resource: Resource on which the operation is performed: - Registration definition, registration assignment etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py deleted file mode 100644 index f6d0e99a0718..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_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 OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ManagedServices - :type provider: str - :param resource: Resource on which the operation is performed: - Registration definition, registration assignment etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py deleted file mode 100644 index b3f2e806af4e..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py +++ /dev/null @@ -1,35 +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 OperationList(Model): - """List of the operations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: List of Microsoft.ManagedServices operations. - :vartype value: list[~azure.mgmt.managedservices.models.Operation] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationList, self).__init__(**kwargs) - self.value = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py deleted file mode 100644 index aed3a8d3ce94..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py +++ /dev/null @@ -1,35 +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 OperationList(Model): - """List of the operations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: List of Microsoft.ManagedServices operations. - :vartype value: list[~azure.mgmt.managedservices.models.Operation] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationList, self).__init__(**kwargs) - self.value = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py deleted file mode 100644 index afbd7d244ce4..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Object that describes a single Microsoft.ManagedServices 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 - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py deleted file mode 100644 index 96a1757eeab2..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.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 msrest.serialization import Model - - -class Plan(Model): - """Plan details for the managed services. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The plan name. - :type name: str - :param publisher: Required. The publisher ID. - :type publisher: str - :param product: Required. The product code. - :type product: str - :param version: Required. The plan's version. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.version = kwargs.get('version', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py deleted file mode 100644 index 0c37b6b98ba7..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_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 msrest.serialization import Model - - -class Plan(Model): - """Plan details for the managed services. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The plan name. - :type name: str - :param publisher: Required. The publisher ID. - :type publisher: str - :param product: Required. The product code. - :type product: str - :param version: Required. The plan's version. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, name: str, publisher: str, product: str, version: str, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.version = version diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py deleted file mode 100644 index d92e0ddf3858..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py +++ /dev/null @@ -1,50 +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 RegistrationAssignment(Model): - """Registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties - :ivar id: The fully qualified path of the registration assignment. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration assignment. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignment, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py deleted file mode 100644 index 2b0f757e3d6c..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentProperties(Model): - """Properties of a registration assignment. - - 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. - - :param registration_definition_id: Required. Fully qualified path of the - registration definition. - :type registration_definition_id: str - :ivar provisioning_state: Current state of the registration assignment. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar registration_definition: Registration definition inside registration - assignment. - :vartype registration_definition: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition - """ - - _validation = { - 'registration_definition_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'registration_definition': {'readonly': True}, - } - - _attribute_map = { - 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignmentProperties, self).__init__(**kwargs) - self.registration_definition_id = kwargs.get('registration_definition_id', None) - self.provisioning_state = None - self.registration_definition = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py deleted file mode 100644 index 0cc52d0144ec..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentProperties(Model): - """Properties of a registration assignment. - - 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. - - :param registration_definition_id: Required. Fully qualified path of the - registration definition. - :type registration_definition_id: str - :ivar provisioning_state: Current state of the registration assignment. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar registration_definition: Registration definition inside registration - assignment. - :vartype registration_definition: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition - """ - - _validation = { - 'registration_definition_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'registration_definition': {'readonly': True}, - } - - _attribute_map = { - 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, - } - - def __init__(self, *, registration_definition_id: str, **kwargs) -> None: - super(RegistrationAssignmentProperties, self).__init__(**kwargs) - self.registration_definition_id = registration_definition_id - self.provisioning_state = None - self.registration_definition = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py deleted file mode 100644 index 024c1af8b5b3..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py +++ /dev/null @@ -1,56 +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 RegistrationAssignmentPropertiesRegistrationDefinition(Model): - """Registration definition inside registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of registration definition inside - registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource - (Microsoft.ManagedServices/registrationDefinitions). - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.plan = kwargs.get('plan', None) - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py deleted file mode 100644 index 073e2827f11e..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py +++ /dev/null @@ -1,62 +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 RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): - """Properties of registration definition inside registration assignment. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :type provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :param managee_tenant_id: Id of the home tenant. - :type managee_tenant_id: str - :param managee_tenant_name: Name of the home tenant. - :type managee_tenant_name: str - :param managed_by_tenant_id: Id of the managedBy tenant. - :type managed_by_tenant_id: str - :param managed_by_tenant_name: Name of the managedBy tenant. - :type managed_by_tenant_name: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, - 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authorizations = kwargs.get('authorizations', None) - self.registration_definition_name = kwargs.get('registration_definition_name', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.managee_tenant_id = kwargs.get('managee_tenant_id', None) - self.managee_tenant_name = kwargs.get('managee_tenant_name', None) - self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) - self.managed_by_tenant_name = kwargs.get('managed_by_tenant_name', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py deleted file mode 100644 index 5dd43174cf1e..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py +++ /dev/null @@ -1,62 +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 RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): - """Properties of registration definition inside registration assignment. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :type provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :param managee_tenant_id: Id of the home tenant. - :type managee_tenant_id: str - :param managee_tenant_name: Name of the home tenant. - :type managee_tenant_name: str - :param managed_by_tenant_id: Id of the managedBy tenant. - :type managed_by_tenant_id: str - :param managed_by_tenant_name: Name of the managedBy tenant. - :type managed_by_tenant_name: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, - 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, authorizations=None, registration_definition_name: str=None, provisioning_state=None, managee_tenant_id: str=None, managee_tenant_name: str=None, managed_by_tenant_id: str=None, managed_by_tenant_name: str=None, **kwargs) -> None: - super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = description - self.authorizations = authorizations - self.registration_definition_name = registration_definition_name - self.provisioning_state = provisioning_state - self.managee_tenant_id = managee_tenant_id - self.managee_tenant_name = managee_tenant_name - self.managed_by_tenant_id = managed_by_tenant_id - self.managed_by_tenant_name = managed_by_tenant_name diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py deleted file mode 100644 index 9a5ef972e44c..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py +++ /dev/null @@ -1,56 +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 RegistrationAssignmentPropertiesRegistrationDefinition(Model): - """Registration definition inside registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of registration definition inside - registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource - (Microsoft.ManagedServices/registrationDefinitions). - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties=None, plan=None, **kwargs) -> None: - super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) - self.properties = properties - self.plan = plan - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py deleted file mode 100644 index decb5b20b6c3..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py +++ /dev/null @@ -1,50 +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 RegistrationAssignment(Model): - """Registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties - :ivar id: The fully qualified path of the registration assignment. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration assignment. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(RegistrationAssignment, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py deleted file mode 100644 index 65c19f3f8daa..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDefinition(Model): - """Registration definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration definition. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationDefinition, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.plan = kwargs.get('plan', None) - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py deleted file mode 100644 index 9b51285427ae..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_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 RegistrationDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`RegistrationDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RegistrationDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(RegistrationDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py deleted file mode 100644 index 714a1a946853..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py +++ /dev/null @@ -1,67 +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 RegistrationDefinitionProperties(Model): - """Properties of a registration definition. - - 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. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Required. Authorization tuple containing principal - id of the user/security group or service principal and id of the build-in - role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param managed_by_tenant_id: Required. Id of the managedBy tenant. - :type managed_by_tenant_id: str - :ivar provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar managed_by_tenant_name: Name of the managedBy tenant. - :vartype managed_by_tenant_name: str - """ - - _validation = { - 'authorizations': {'required': True}, - 'managed_by_tenant_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'managed_by_tenant_name': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authorizations = kwargs.get('authorizations', None) - self.registration_definition_name = kwargs.get('registration_definition_name', None) - self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) - self.provisioning_state = None - self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py deleted file mode 100644 index f22a794c8e76..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py +++ /dev/null @@ -1,67 +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 RegistrationDefinitionProperties(Model): - """Properties of a registration definition. - - 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. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Required. Authorization tuple containing principal - id of the user/security group or service principal and id of the build-in - role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param managed_by_tenant_id: Required. Id of the managedBy tenant. - :type managed_by_tenant_id: str - :ivar provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar managed_by_tenant_name: Name of the managedBy tenant. - :vartype managed_by_tenant_name: str - """ - - _validation = { - 'authorizations': {'required': True}, - 'managed_by_tenant_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'managed_by_tenant_name': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, *, authorizations, managed_by_tenant_id: str, description: str=None, registration_definition_name: str=None, **kwargs) -> None: - super(RegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = description - self.authorizations = authorizations - self.registration_definition_name = registration_definition_name - self.managed_by_tenant_id = managed_by_tenant_id - self.provisioning_state = None - self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py deleted file mode 100644 index f570181a2764..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDefinition(Model): - """Registration definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration definition. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties=None, plan=None, **kwargs) -> None: - super(RegistrationDefinition, self).__init__(**kwargs) - self.properties = properties - self.plan = plan - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py index f51ba517d417..3b2b2e67052b 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py @@ -9,12 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .registration_definitions_operations import RegistrationDefinitionsOperations -from .registration_assignments_operations import RegistrationAssignmentsOperations -from .operations import Operations +from ._registration_definitions_operations import RegistrationDefinitionsOperations +from ._registration_assignments_operations import RegistrationAssignmentsOperations +from ._marketplace_registration_definitions_operations import MarketplaceRegistrationDefinitionsOperations +from ._operations import Operations __all__ = [ 'RegistrationDefinitionsOperations', 'RegistrationAssignmentsOperations', + 'MarketplaceRegistrationDefinitionsOperations', 'Operations', ] diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py new file mode 100644 index 000000000000..91e42506a8f5 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MarketplaceRegistrationDefinitionsOperations(object): + """MarketplaceRegistrationDefinitionsOperations 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. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-09-01" + + self.config = config + + def list( + self, scope, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of the marketplace registration definitions for the + marketplace identifier. + + :param scope: Scope of the resource. + :type scope: str + :param filter: The filter query parameter. Might be used to filter + marketplace registration definition by plan identifier, publisher, + version etc. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegistrationDefinition + :rtype: + ~azure.mgmt.managedservices.models.RegistrationDefinitionPaged[~azure.mgmt.managedservices.models.RegistrationDefinition] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + 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]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions'} + + def get( + self, scope, marketplace_identifier, custom_headers=None, raw=False, **operation_config): + """Get the marketplace registration definition for the marketplace + identifier. + + :param scope: Scope of the resource. + :type scope: str + :param marketplace_identifier: Market place identifer. Expected + Formats - {publisher}.{product[-preview]}.{planName}.{version} or + {publisher}.{product[-preview]}.{planName} or + {publisher}.{product[-preview]} or {publisher}). + :type marketplace_identifier: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistrationDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'marketplaceIdentifier': self._serialize.url("marketplace_identifier", marketplace_identifier, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegistrationDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/{marketplaceIdentifier}'} diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py similarity index 94% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py index 2cd9ebba8fdd..454eb6c6d1d3 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py @@ -18,11 +18,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01" + self.api_version = "2019-09-01" self.config = config @@ -76,7 +78,6 @@ def list( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationList', response) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py similarity index 97% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py index 8c4a5d8ddcfb..34b25ccd951a 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py @@ -20,11 +20,13 @@ class RegistrationAssignmentsOperations(object): """RegistrationAssignmentsOperations 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. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01". """ models = models @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01" + self.api_version = "2019-09-01" self.config = config @@ -94,7 +96,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegistrationAssignment', response) @@ -308,8 +309,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'] @@ -340,6 +340,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]: @@ -348,12 +353,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments'} diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py similarity index 96% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py index f30ce8ce7524..d84e0943152e 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py @@ -20,11 +20,13 @@ class RegistrationDefinitionsOperations(object): """RegistrationDefinitionsOperations 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. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01". """ models = models @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01" + self.api_version = "2019-09-01" self.config = config @@ -88,7 +90,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegistrationDefinition', response) @@ -275,8 +276,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'] @@ -305,6 +305,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]: @@ -313,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions'}