diff --git a/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in b/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in +++ b/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/managedservices/azure-mgmt-managedservices/_meta.json b/sdk/managedservices/azure-mgmt-managedservices/_meta.json new file mode 100644 index 000000000000..bf086f436eec --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "e8c6db17dc13a00155936dcaeacf4da0a1fabf77", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/managedservices/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/managedservices/resource-manager/readme.md" +} \ No newline at end of file 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 63% 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..0cfa0e85566a 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,43 +11,18 @@ 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 MarketplaceRegistrationDefinitionsWithoutScopeOperations +from .operations import Operations +from . import models class ManagedServicesClient(SDKClient): - """Specification for ManagedServices. + """The specification for ManagedServices. :ivar config: Configuration for client. :vartype config: ManagedServicesClientConfiguration @@ -56,6 +31,10 @@ 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 marketplace_registration_definitions_without_scope: MarketplaceRegistrationDefinitionsWithoutScope operations + :vartype marketplace_registration_definitions_without_scope: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsWithoutScopeOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.managedservices.operations.Operations @@ -72,7 +51,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 = '2020-02-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -80,5 +59,9 @@ 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.marketplace_registration_definitions_without_scope = MarketplaceRegistrationDefinitionsWithoutScopeOperations( + 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..f55da534ebd7 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,54 +10,73 @@ # -------------------------------------------------------------------------- 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 EligibleApprover + from ._models_py3 import EligibleAuthorization + from ._models_py3 import ErrorDefinition + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import JustInTimeAccessPolicy + from ._models_py3 import MarketplaceRegistrationDefinition + from ._models_py3 import MarketplaceRegistrationDefinitionProperties + 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 EligibleApprover + from ._models import EligibleAuthorization + from ._models import ErrorDefinition + from ._models import ErrorResponse, ErrorResponseException + from ._models import JustInTimeAccessPolicy + from ._models import MarketplaceRegistrationDefinition + from ._models import MarketplaceRegistrationDefinitionProperties + 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 MarketplaceRegistrationDefinitionPaged +from ._paged_models import RegistrationAssignmentPaged +from ._paged_models import RegistrationDefinitionPaged +from ._managed_services_client_enums import ( + MultiFactorAuthProvider, ProvisioningState, ) __all__ = [ 'Authorization', - 'RegistrationDefinitionProperties', - 'Plan', - 'RegistrationDefinition', - 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties', - 'RegistrationAssignmentPropertiesRegistrationDefinition', - 'RegistrationAssignmentProperties', - 'RegistrationAssignment', - 'OperationDisplay', + 'EligibleApprover', + 'EligibleAuthorization', + 'ErrorDefinition', + 'ErrorResponse', 'ErrorResponseException', + 'JustInTimeAccessPolicy', + 'MarketplaceRegistrationDefinition', + 'MarketplaceRegistrationDefinitionProperties', 'Operation', + 'OperationDisplay', 'OperationList', - 'ErrorResponseError', - 'ErrorResponse', 'ErrorResponseException', + 'Plan', + 'RegistrationAssignment', + 'RegistrationAssignmentProperties', + 'RegistrationAssignmentPropertiesRegistrationDefinition', + 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties', + 'RegistrationDefinition', + 'RegistrationDefinitionProperties', 'RegistrationDefinitionPaged', 'RegistrationAssignmentPaged', + 'MarketplaceRegistrationDefinitionPaged', + 'MultiFactorAuthProvider', '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 91% 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 index 7c973162069e..f90d45a217ca 100644 --- 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 @@ -12,6 +12,12 @@ from enum import Enum +class MultiFactorAuthProvider(str, Enum): + + azure = "Azure" + none = "None" + + class ProvisioningState(str, Enum): not_specified = "NotSpecified" 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..820a9836ba0d --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py @@ -0,0 +1,755 @@ +# 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): + """The Azure Active Directory principal identifier and Azure built-in role + that describes the access the principal will receive on the delegated + resource in the managed tenant. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active + Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active + Directory principal. + :type principal_id_display_name: str + :param role_definition_id: Required. The identifier of the Azure built-in + role that defines the permissions that the Azure Active Directory + principal will have on the projected scope. + :type role_definition_id: str + :param delegated_role_definition_ids: The delegatedRoleDefinitionIds field + is required when the roleDefinitionId refers to the User Access + Administrator Role. It is the list of role definition ids which define all + the permissions that the user in the authorization can assign to other + principals. + :type delegated_role_definition_ids: list[str] + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'delegated_role_definition_ids': {'key': 'delegatedRoleDefinitionIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Authorization, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.principal_id_display_name = kwargs.get('principal_id_display_name', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + self.delegated_role_definition_ids = kwargs.get('delegated_role_definition_ids', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class EligibleApprover(Model): + """Defines the Azure Active Directory principal that can approve any + just-in-time access requests by the principal defined in the + EligibleAuthorization. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active + Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active + Directory principal. + :type principal_id_display_name: str + """ + + _validation = { + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EligibleApprover, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.principal_id_display_name = kwargs.get('principal_id_display_name', None) + + +class EligibleAuthorization(Model): + """The Azure Active Directory principal identifier, Azure built-in role, and + just-in-time access policy that describes the just-in-time access the + principal will receive on the delegated resource in the managed tenant. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active + Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active + Directory principal. + :type principal_id_display_name: str + :param role_definition_id: Required. The identifier of the Azure built-in + role that defines the permissions that the Azure Active Directory + principal will have on the projected scope. + :type role_definition_id: str + :param just_in_time_access_policy: The just-in-time access policy setting. + :type just_in_time_access_policy: + ~azure.mgmt.managedservices.models.JustInTimeAccessPolicy + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'just_in_time_access_policy': {'key': 'justInTimeAccessPolicy', 'type': 'JustInTimeAccessPolicy'}, + } + + def __init__(self, **kwargs): + super(EligibleAuthorization, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.principal_id_display_name = kwargs.get('principal_id_display_name', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + self.just_in_time_access_policy = kwargs.get('just_in_time_access_policy', None) + + +class ErrorDefinition(Model): + """The error response indicating why the incoming request wasn’t able to be + processed. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message indicating why the operation + failed. + :type message: str + :param details: The internal error details. + :type details: list[~azure.mgmt.managedservices.models.ErrorDefinition] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + } + + def __init__(self, **kwargs): + super(ErrorDefinition, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class ErrorResponse(Model): + """Error response. + + :param error: The error details. + :type error: ~azure.mgmt.managedservices.models.ErrorDefinition + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('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 JustInTimeAccessPolicy(Model): + """Just-in-time access policy setting. + + All required parameters must be populated in order to send to Azure. + + :param multi_factor_auth_provider: Required. The multi-factor + authorization provider to be used for just-in-time access requests. + Possible values include: 'Azure', 'None'. Default value: "None" . + :type multi_factor_auth_provider: str or + ~azure.mgmt.managedservices.models.MultiFactorAuthProvider + :param maximum_activation_duration: The maximum access duration in ISO + 8601 format for just-in-time access requests. Default value: "PT8H" . + :type maximum_activation_duration: timedelta + :param managed_by_tenant_approvers: The list of managedByTenant approvers + for the eligible authorization. + :type managed_by_tenant_approvers: + list[~azure.mgmt.managedservices.models.EligibleApprover] + """ + + _validation = { + 'multi_factor_auth_provider': {'required': True}, + } + + _attribute_map = { + 'multi_factor_auth_provider': {'key': 'multiFactorAuthProvider', 'type': 'str'}, + 'maximum_activation_duration': {'key': 'maximumActivationDuration', 'type': 'duration'}, + 'managed_by_tenant_approvers': {'key': 'managedByTenantApprovers', 'type': '[EligibleApprover]'}, + } + + def __init__(self, **kwargs): + super(JustInTimeAccessPolicy, self).__init__(**kwargs) + self.multi_factor_auth_provider = kwargs.get('multi_factor_auth_provider', "None") + self.maximum_activation_duration = kwargs.get('maximum_activation_duration', "PT8H") + self.managed_by_tenant_approvers = kwargs.get('managed_by_tenant_approvers', None) + + +class MarketplaceRegistrationDefinition(Model): + """MarketplaceRegistrationDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The properties of the marketplace registration + definition. + :type properties: + ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionProperties + :param plan: The details for the Managed Services offer’s plan in Azure + Marketplace. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: The fully qualified path of the marketplace registration + definition. + :vartype id: str + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/marketplaceRegistrationDefinitions). + :vartype type: str + :ivar name: The name of the marketplace registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MarketplaceRegistrationDefinitionProperties'}, + '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(MarketplaceRegistrationDefinition, 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 MarketplaceRegistrationDefinitionProperties(Model): + """The properties of the marketplace registration definition. + + All required parameters must be populated in order to send to Azure. + + :param managed_by_tenant_id: Required. The identifier of the managedBy + tenant. + :type managed_by_tenant_id: str + :param authorizations: Required. The collection of authorization objects + describing the access Azure Active Directory principals in the managedBy + tenant will receive on the delegated resource in the managed tenant. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param eligible_authorizations: The collection of eligible authorization + objects describing the just-in-time access Azure Active Directory + principals in the managedBy tenant will receive on the delegated resource + in the managed tenant. + :type eligible_authorizations: + list[~azure.mgmt.managedservices.models.EligibleAuthorization] + :param offer_display_name: The marketplace offer display name. + :type offer_display_name: str + :param publisher_display_name: The marketplace publisher display name. + :type publisher_display_name: str + :param plan_display_name: The marketplace plan display name. + :type plan_display_name: str + """ + + _validation = { + 'managed_by_tenant_id': {'required': True}, + 'authorizations': {'required': True}, + } + + _attribute_map = { + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'eligible_authorizations': {'key': 'eligibleAuthorizations', 'type': '[EligibleAuthorization]'}, + 'offer_display_name': {'key': 'offerDisplayName', 'type': 'str'}, + 'publisher_display_name': {'key': 'publisherDisplayName', 'type': 'str'}, + 'plan_display_name': {'key': 'planDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MarketplaceRegistrationDefinitionProperties, self).__init__(**kwargs) + self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) + self.authorizations = kwargs.get('authorizations', None) + self.eligible_authorizations = kwargs.get('eligible_authorizations', None) + self.offer_display_name = kwargs.get('offer_display_name', None) + self.publisher_display_name = kwargs.get('publisher_display_name', None) + self.plan_display_name = kwargs.get('plan_display_name', None) + + +class Operation(Model): + """The 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: The operation name with the format: + {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: The service provider. + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation type. + :type operation: str + :param description: The 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): + """The list of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The 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): + """The details for the Managed Services offer’s plan in Azure Marketplace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Azure Marketplace plan name. + :type name: str + :param publisher: Required. Azure Marketplace publisher ID. + :type publisher: str + :param product: Required. Azure Marketplace product code. + :type product: str + :param version: Required. Azure Marketplace 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): + """The registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The 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: The type of the Azure resource + (Microsoft.ManagedServices/registrationAssignments). + :vartype type: str + :ivar name: The 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): + """The properties of the 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. The fully qualified path of + the registration definition. + :type registration_definition_id: str + :ivar provisioning_state: The current provisioning 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: The registration definition associated with + the 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): + """The registration definition associated with the registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The properties of the registration definition + associated with the registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: The details for the Managed Services offer’s plan in Azure + Marketplace. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: The fully qualified path of the registration definition. + :vartype id: str + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: The 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): + """The properties of the registration definition associated with the + registration assignment. + + :param description: The description of the registration definition. + :type description: str + :param authorizations: The collection of authorization objects describing + the access Azure Active Directory principals in the managedBy tenant will + receive on the delegated resource in the managed tenant. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param eligible_authorizations: The collection of eligible authorization + objects describing the just-in-time access Azure Active Directory + principals in the managedBy tenant will receive on the delegated resource + in the managed tenant. + :type eligible_authorizations: + list[~azure.mgmt.managedservices.models.EligibleAuthorization] + :param registration_definition_name: The name of the registration + definition. + :type registration_definition_name: str + :param provisioning_state: The current provisioning 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: The identifier of the managed tenant. + :type managee_tenant_id: str + :param managee_tenant_name: The name of the managed tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: The identifier of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: The name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'eligible_authorizations': {'key': 'eligibleAuthorizations', 'type': '[EligibleAuthorization]'}, + '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.eligible_authorizations = kwargs.get('eligible_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): + """The registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: The details for the Managed Services offer’s plan in Azure + Marketplace. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: The fully qualified path of the registration definition. + :vartype id: str + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: The 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): + """The 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: The description of the registration definition. + :type description: str + :param authorizations: Required. The collection of authorization objects + describing the access Azure Active Directory principals in the managedBy + tenant will receive on the delegated resource in the managed tenant. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param eligible_authorizations: The collection of eligible authorization + objects describing the just-in-time access Azure Active Directory + principals in the managedBy tenant will receive on the delegated resource + in the managed tenant. + :type eligible_authorizations: + list[~azure.mgmt.managedservices.models.EligibleAuthorization] + :param registration_definition_name: The name of the registration + definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. The identifier of the managedBy + tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: The current provisioning 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 managee_tenant_id: The identifier of the managed tenant. + :vartype managee_tenant_id: str + :ivar managee_tenant_name: The name of the managed tenant. + :vartype managee_tenant_name: str + :ivar managed_by_tenant_name: The 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}, + 'managee_tenant_id': {'readonly': True}, + 'managee_tenant_name': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'eligible_authorizations': {'key': 'eligibleAuthorizations', 'type': '[EligibleAuthorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', '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_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.eligible_authorizations = kwargs.get('eligible_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.managee_tenant_id = None + self.managee_tenant_name = 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..ae975dd487e6 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py @@ -0,0 +1,755 @@ +# 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): + """The Azure Active Directory principal identifier and Azure built-in role + that describes the access the principal will receive on the delegated + resource in the managed tenant. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active + Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active + Directory principal. + :type principal_id_display_name: str + :param role_definition_id: Required. The identifier of the Azure built-in + role that defines the permissions that the Azure Active Directory + principal will have on the projected scope. + :type role_definition_id: str + :param delegated_role_definition_ids: The delegatedRoleDefinitionIds field + is required when the roleDefinitionId refers to the User Access + Administrator Role. It is the list of role definition ids which define all + the permissions that the user in the authorization can assign to other + principals. + :type delegated_role_definition_ids: list[str] + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'delegated_role_definition_ids': {'key': 'delegatedRoleDefinitionIds', 'type': '[str]'}, + } + + def __init__(self, *, principal_id: str, role_definition_id: str, principal_id_display_name: str=None, delegated_role_definition_ids=None, **kwargs) -> None: + super(Authorization, self).__init__(**kwargs) + self.principal_id = principal_id + self.principal_id_display_name = principal_id_display_name + self.role_definition_id = role_definition_id + self.delegated_role_definition_ids = delegated_role_definition_ids + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class EligibleApprover(Model): + """Defines the Azure Active Directory principal that can approve any + just-in-time access requests by the principal defined in the + EligibleAuthorization. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active + Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active + Directory principal. + :type principal_id_display_name: str + """ + + _validation = { + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + } + + def __init__(self, *, principal_id: str, principal_id_display_name: str=None, **kwargs) -> None: + super(EligibleApprover, self).__init__(**kwargs) + self.principal_id = principal_id + self.principal_id_display_name = principal_id_display_name + + +class EligibleAuthorization(Model): + """The Azure Active Directory principal identifier, Azure built-in role, and + just-in-time access policy that describes the just-in-time access the + principal will receive on the delegated resource in the managed tenant. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The identifier of the Azure Active + Directory principal. + :type principal_id: str + :param principal_id_display_name: The display name of the Azure Active + Directory principal. + :type principal_id_display_name: str + :param role_definition_id: Required. The identifier of the Azure built-in + role that defines the permissions that the Azure Active Directory + principal will have on the projected scope. + :type role_definition_id: str + :param just_in_time_access_policy: The just-in-time access policy setting. + :type just_in_time_access_policy: + ~azure.mgmt.managedservices.models.JustInTimeAccessPolicy + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'principal_id_display_name': {'key': 'principalIdDisplayName', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'just_in_time_access_policy': {'key': 'justInTimeAccessPolicy', 'type': 'JustInTimeAccessPolicy'}, + } + + def __init__(self, *, principal_id: str, role_definition_id: str, principal_id_display_name: str=None, just_in_time_access_policy=None, **kwargs) -> None: + super(EligibleAuthorization, self).__init__(**kwargs) + self.principal_id = principal_id + self.principal_id_display_name = principal_id_display_name + self.role_definition_id = role_definition_id + self.just_in_time_access_policy = just_in_time_access_policy + + +class ErrorDefinition(Model): + """The error response indicating why the incoming request wasn’t able to be + processed. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message indicating why the operation + failed. + :type message: str + :param details: The internal error details. + :type details: list[~azure.mgmt.managedservices.models.ErrorDefinition] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ErrorDefinition, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class ErrorResponse(Model): + """Error response. + + :param error: The error details. + :type error: ~azure.mgmt.managedservices.models.ErrorDefinition + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +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 JustInTimeAccessPolicy(Model): + """Just-in-time access policy setting. + + All required parameters must be populated in order to send to Azure. + + :param multi_factor_auth_provider: Required. The multi-factor + authorization provider to be used for just-in-time access requests. + Possible values include: 'Azure', 'None'. Default value: "None" . + :type multi_factor_auth_provider: str or + ~azure.mgmt.managedservices.models.MultiFactorAuthProvider + :param maximum_activation_duration: The maximum access duration in ISO + 8601 format for just-in-time access requests. Default value: "PT8H" . + :type maximum_activation_duration: timedelta + :param managed_by_tenant_approvers: The list of managedByTenant approvers + for the eligible authorization. + :type managed_by_tenant_approvers: + list[~azure.mgmt.managedservices.models.EligibleApprover] + """ + + _validation = { + 'multi_factor_auth_provider': {'required': True}, + } + + _attribute_map = { + 'multi_factor_auth_provider': {'key': 'multiFactorAuthProvider', 'type': 'str'}, + 'maximum_activation_duration': {'key': 'maximumActivationDuration', 'type': 'duration'}, + 'managed_by_tenant_approvers': {'key': 'managedByTenantApprovers', 'type': '[EligibleApprover]'}, + } + + def __init__(self, *, multi_factor_auth_provider="None", maximum_activation_duration="PT8H", managed_by_tenant_approvers=None, **kwargs) -> None: + super(JustInTimeAccessPolicy, self).__init__(**kwargs) + self.multi_factor_auth_provider = multi_factor_auth_provider + self.maximum_activation_duration = maximum_activation_duration + self.managed_by_tenant_approvers = managed_by_tenant_approvers + + +class MarketplaceRegistrationDefinition(Model): + """MarketplaceRegistrationDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The properties of the marketplace registration + definition. + :type properties: + ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionProperties + :param plan: The details for the Managed Services offer’s plan in Azure + Marketplace. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: The fully qualified path of the marketplace registration + definition. + :vartype id: str + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/marketplaceRegistrationDefinitions). + :vartype type: str + :ivar name: The name of the marketplace registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'MarketplaceRegistrationDefinitionProperties'}, + '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(MarketplaceRegistrationDefinition, self).__init__(**kwargs) + self.properties = properties + self.plan = plan + self.id = None + self.type = None + self.name = None + + +class MarketplaceRegistrationDefinitionProperties(Model): + """The properties of the marketplace registration definition. + + All required parameters must be populated in order to send to Azure. + + :param managed_by_tenant_id: Required. The identifier of the managedBy + tenant. + :type managed_by_tenant_id: str + :param authorizations: Required. The collection of authorization objects + describing the access Azure Active Directory principals in the managedBy + tenant will receive on the delegated resource in the managed tenant. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param eligible_authorizations: The collection of eligible authorization + objects describing the just-in-time access Azure Active Directory + principals in the managedBy tenant will receive on the delegated resource + in the managed tenant. + :type eligible_authorizations: + list[~azure.mgmt.managedservices.models.EligibleAuthorization] + :param offer_display_name: The marketplace offer display name. + :type offer_display_name: str + :param publisher_display_name: The marketplace publisher display name. + :type publisher_display_name: str + :param plan_display_name: The marketplace plan display name. + :type plan_display_name: str + """ + + _validation = { + 'managed_by_tenant_id': {'required': True}, + 'authorizations': {'required': True}, + } + + _attribute_map = { + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'eligible_authorizations': {'key': 'eligibleAuthorizations', 'type': '[EligibleAuthorization]'}, + 'offer_display_name': {'key': 'offerDisplayName', 'type': 'str'}, + 'publisher_display_name': {'key': 'publisherDisplayName', 'type': 'str'}, + 'plan_display_name': {'key': 'planDisplayName', 'type': 'str'}, + } + + def __init__(self, *, managed_by_tenant_id: str, authorizations, eligible_authorizations=None, offer_display_name: str=None, publisher_display_name: str=None, plan_display_name: str=None, **kwargs) -> None: + super(MarketplaceRegistrationDefinitionProperties, self).__init__(**kwargs) + self.managed_by_tenant_id = managed_by_tenant_id + self.authorizations = authorizations + self.eligible_authorizations = eligible_authorizations + self.offer_display_name = offer_display_name + self.publisher_display_name = publisher_display_name + self.plan_display_name = plan_display_name + + +class Operation(Model): + """The 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: The operation name with the format: + {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: The service provider. + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation type. + :type operation: str + :param description: The 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): + """The list of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The 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): + """The details for the Managed Services offer’s plan in Azure Marketplace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Azure Marketplace plan name. + :type name: str + :param publisher: Required. Azure Marketplace publisher ID. + :type publisher: str + :param product: Required. Azure Marketplace product code. + :type product: str + :param version: Required. Azure Marketplace 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): + """The registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The 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: The type of the Azure resource + (Microsoft.ManagedServices/registrationAssignments). + :vartype type: str + :ivar name: The 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): + """The properties of the 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. The fully qualified path of + the registration definition. + :type registration_definition_id: str + :ivar provisioning_state: The current provisioning 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: The registration definition associated with + the 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): + """The registration definition associated with the registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The properties of the registration definition + associated with the registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: The details for the Managed Services offer’s plan in Azure + Marketplace. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: The fully qualified path of the registration definition. + :vartype id: str + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: The 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): + """The properties of the registration definition associated with the + registration assignment. + + :param description: The description of the registration definition. + :type description: str + :param authorizations: The collection of authorization objects describing + the access Azure Active Directory principals in the managedBy tenant will + receive on the delegated resource in the managed tenant. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param eligible_authorizations: The collection of eligible authorization + objects describing the just-in-time access Azure Active Directory + principals in the managedBy tenant will receive on the delegated resource + in the managed tenant. + :type eligible_authorizations: + list[~azure.mgmt.managedservices.models.EligibleAuthorization] + :param registration_definition_name: The name of the registration + definition. + :type registration_definition_name: str + :param provisioning_state: The current provisioning 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: The identifier of the managed tenant. + :type managee_tenant_id: str + :param managee_tenant_name: The name of the managed tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: The identifier of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: The name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'eligible_authorizations': {'key': 'eligibleAuthorizations', 'type': '[EligibleAuthorization]'}, + '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, eligible_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.eligible_authorizations = eligible_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): + """The registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: The details for the Managed Services offer’s plan in Azure + Marketplace. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: The fully qualified path of the registration definition. + :vartype id: str + :ivar type: The type of the Azure resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: The 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): + """The 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: The description of the registration definition. + :type description: str + :param authorizations: Required. The collection of authorization objects + describing the access Azure Active Directory principals in the managedBy + tenant will receive on the delegated resource in the managed tenant. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param eligible_authorizations: The collection of eligible authorization + objects describing the just-in-time access Azure Active Directory + principals in the managedBy tenant will receive on the delegated resource + in the managed tenant. + :type eligible_authorizations: + list[~azure.mgmt.managedservices.models.EligibleAuthorization] + :param registration_definition_name: The name of the registration + definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. The identifier of the managedBy + tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: The current provisioning 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 managee_tenant_id: The identifier of the managed tenant. + :vartype managee_tenant_id: str + :ivar managee_tenant_name: The name of the managed tenant. + :vartype managee_tenant_name: str + :ivar managed_by_tenant_name: The 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}, + 'managee_tenant_id': {'readonly': True}, + 'managee_tenant_name': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'eligible_authorizations': {'key': 'eligibleAuthorizations', 'type': '[EligibleAuthorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', '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_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, *, authorizations, managed_by_tenant_id: str, description: str=None, eligible_authorizations=None, registration_definition_name: str=None, **kwargs) -> None: + super(RegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = description + self.authorizations = authorizations + self.eligible_authorizations = eligible_authorizations + self.registration_definition_name = registration_definition_name + self.managed_by_tenant_id = managed_by_tenant_id + self.provisioning_state = None + self.managee_tenant_id = None + self.managee_tenant_name = None + self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py new file mode 100644 index 000000000000..3722f441740a --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.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 + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegistrationAssignment]'} + } + + def __init__(self, *args, **kwargs): + + super(RegistrationAssignmentPaged, self).__init__(*args, **kwargs) +class MarketplaceRegistrationDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MarketplaceRegistrationDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MarketplaceRegistrationDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(MarketplaceRegistrationDefinitionPaged, self).__init__(*args, **kwargs) 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_paged.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py deleted file mode 100644 index 21a68092ffb5..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_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 RegistrationAssignmentPaged(Paged): - """ - A paging container for iterating over a list of :class:`RegistrationAssignment ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RegistrationAssignment]'} - } - - def __init__(self, *args, **kwargs): - - super(RegistrationAssignmentPaged, self).__init__(*args, **kwargs) 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..f21ab95b4543 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,16 @@ # 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 ._marketplace_registration_definitions_without_scope_operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations +from ._operations import Operations __all__ = [ 'RegistrationDefinitionsOperations', 'RegistrationAssignmentsOperations', + 'MarketplaceRegistrationDefinitionsOperations', + 'MarketplaceRegistrationDefinitionsWithoutScopeOperations', '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..795ad4416605 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py @@ -0,0 +1,178 @@ +# 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: "2020-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-02-01-preview" + + 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: The scope of the resource. + :type scope: str + :param filter: The filter query parameter to filter marketplace + registration definitions 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 + MarketplaceRegistrationDefinition + :rtype: + ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionPaged[~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition] + :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.MarketplaceRegistrationDefinitionPaged(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: The scope of the resource. + :type scope: str + :param marketplace_identifier: The Azure Marketplace identifier. + 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: MarketplaceRegistrationDefinition or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition + 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('MarketplaceRegistrationDefinition', 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/_marketplace_registration_definitions_without_scope_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py new file mode 100644 index 000000000000..8105470eb594 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py @@ -0,0 +1,169 @@ +# 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 MarketplaceRegistrationDefinitionsWithoutScopeOperations(object): + """MarketplaceRegistrationDefinitionsWithoutScopeOperations 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: "2020-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-02-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of the marketplace registration definitions for the + marketplace identifier. + + :param filter: The filter query parameter to filter marketplace + registration definitions 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 + MarketplaceRegistrationDefinition + :rtype: + ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionPaged[~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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.MarketplaceRegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions'} + + def get( + self, marketplace_identifier, custom_headers=None, raw=False, **operation_config): + """Get the marketplace registration definition for the marketplace + identifier. + + :param marketplace_identifier: The Azure Marketplace identifier. + 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: MarketplaceRegistrationDefinition or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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('MarketplaceRegistrationDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/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 93% 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..ba8f564284a3 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: "2020-02-01-preview". """ 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 = "2020-02-01-preview" 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 92% 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..d470135023fa 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: "2020-02-01-preview". """ models = models @@ -34,21 +36,21 @@ 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 = "2020-02-01-preview" self.config = config def get( self, scope, registration_assignment_id, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): - """Gets the details of specified registration assignment. + """Gets the details of the specified registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str - :param expand_registration_definition: Tells whether to return - registration definition details also along with registration + :param expand_registration_definition: The flag indicating whether to + return the registration definition details along with the registration assignment details. :type expand_registration_definition: bool :param dict custom_headers: headers that will be added to the request @@ -94,7 +96,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegistrationAssignment', response) @@ -144,9 +145,9 @@ def delete( self, scope, registration_assignment_id, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str :param dict custom_headers: headers that will be added to the request @@ -238,12 +239,12 @@ def create_or_update( self, scope, registration_assignment_id, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a registration assignment. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_assignment_id: Guid of the registration + :param registration_assignment_id: The GUID of the registration assignment. :type registration_assignment_id: str - :param properties: Properties of a registration assignment. + :param properties: The properties of a registration assignment. :type properties: ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties :param dict custom_headers: headers that will be added to the request @@ -291,10 +292,10 @@ def list( self, scope, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): """Gets a list of the registration assignments. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param expand_registration_definition: Tells whether to return - registration definition details also along with registration + :param expand_registration_definition: The flag indicating whether to + return the registration definition details along with the registration assignment details. :type expand_registration_definition: bool :param dict custom_headers: headers that will be added to the request @@ -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 92% 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..93e66dea4ffd 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: "2020-02-01-preview". """ 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 = "2020-02-01-preview" self.config = config @@ -42,9 +44,9 @@ def get( self, scope, registration_definition_id, custom_headers=None, raw=False, **operation_config): """Gets the registration definition details. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param registration_definition_id: Guid of the registration + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str :param dict custom_headers: headers that will be added to the request @@ -88,7 +90,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegistrationDefinition', response) @@ -103,10 +104,10 @@ def delete( self, registration_definition_id, scope, custom_headers=None, raw=False, **operation_config): """Deletes the registration definition. - :param registration_definition_id: Guid of the registration + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -206,15 +207,16 @@ def create_or_update( self, registration_definition_id, scope, properties=None, plan=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a registration definition. - :param registration_definition_id: Guid of the registration + :param registration_definition_id: The GUID of the registration definition. :type registration_definition_id: str - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str - :param properties: Properties of a registration definition. + :param properties: The properties of a registration definition. :type properties: ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties - :param plan: Plan details for the managed services. + :param plan: The details for the Managed Services offer’s plan in + Azure Marketplace. :type plan: ~azure.mgmt.managedservices.models.Plan :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -262,7 +264,7 @@ def list( self, scope, custom_headers=None, raw=False, **operation_config): """Gets a list of the registration definitions. - :param scope: Scope of the resource. + :param scope: The scope of the resource. :type scope: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -275,8 +277,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 +306,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 +319,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'}