text: # 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 msrest.serialization
  
  
  class CloudErrorBody(msrest.serialization.Model):
      """An error response from the ManagedServiceIdentity service.
  
      :param code: An identifier for the error.
      :type code: str
      :param message: A message describing the error, intended to be suitable for display in a user
       interface.
      :type message: str
      :param target: The target of the particular error. For example, the name of the property in
       error.
      :type target: str
      :param details: A list of additional details about the error.
      :type details: list[~managed_service_identity_client.models.CloudErrorBody]
      """
  
      _attribute_map = {
          'code': {'key': 'code', 'type': 'str'},
          'message': {'key': 'message', 'type': 'str'},
          'target': {'key': 'target', 'type': 'str'},
          'details': {'key': 'details', 'type': '[CloudErrorBody]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(CloudErrorBody, self).__init__(**kwargs)
          self.code = kwargs.get('code', None)
          self.message = kwargs.get('message', None)
          self.target = kwargs.get('target', None)
          self.details = kwargs.get('details', None)
  
  
  class Resource(msrest.serialization.Model):
      """Common fields that are returned in the response for all Azure Resource Manager resources.
  
      Variables are only populated by the server, and will be ignored when sending a request.
  
      :ivar id: Fully qualified resource ID for the resource. Ex -
       /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
      :vartype id: str
      :ivar name: The name of the resource.
      :vartype name: str
      :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
       "Microsoft.Storage/storageAccounts".
      :vartype type: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
      }
  
      _attribute_map = {
          'id': {'key': 'id', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(Resource, self).__init__(**kwargs)
          self.id = None
          self.name = None
          self.type = None
  
  
  class TrackedResource(Resource):
      """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.
  
      Variables are only populated by the server, and will be ignored when sending a request.
  
      All required parameters must be populated in order to send to Azure.
  
      :ivar id: Fully qualified resource ID for the resource. Ex -
       /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
      :vartype id: str
      :ivar name: The name of the resource.
      :vartype name: str
      :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
       "Microsoft.Storage/storageAccounts".
      :vartype type: str
      :param tags: A set of tags. Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives.
      :type location: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
      }
  
      _attribute_map = {
          'id': {'key': 'id', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
          'tags': {'key': 'tags', 'type': '{str}'},
          'location': {'key': 'location', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(TrackedResource, self).__init__(**kwargs)
          self.tags = kwargs.get('tags', None)
          self.location = kwargs['location']
  
  
  class Identity(TrackedResource):
      """Describes an identity resource.
  
      Variables are only populated by the server, and will be ignored when sending a request.
  
      All required parameters must be populated in order to send to Azure.
  
      :ivar id: Fully qualified resource ID for the resource. Ex -
       /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
      :vartype id: str
      :ivar name: The name of the resource.
      :vartype name: str
      :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
       "Microsoft.Storage/storageAccounts".
      :vartype type: str
      :param tags: A set of tags. Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives.
      :type location: str
      :ivar tenant_id: The id of the tenant which the identity belongs to.
      :vartype tenant_id: str
      :ivar principal_id: The id of the service principal object associated with the created
       identity.
      :vartype principal_id: str
      :ivar client_id: The id of the app associated with the identity. This is a random generated
       UUID by MSI.
      :vartype client_id: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'tenant_id': {'readonly': True},
          'principal_id': {'readonly': True},
          'client_id': {'readonly': True},
      }
  
      _attribute_map = {
          'id': {'key': 'id', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
          'tags': {'key': 'tags', 'type': '{str}'},
          'location': {'key': 'location', 'type': 'str'},
          'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
          'principal_id': {'key': 'properties.principalId', 'type': 'str'},
          'client_id': {'key': 'properties.clientId', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(Identity, self).__init__(**kwargs)
          self.tenant_id = None
          self.principal_id = None
          self.client_id = None
  
  
  class IdentityUpdate(Resource):
      """Describes an identity resource.
  
      Variables are only populated by the server, and will be ignored when sending a request.
  
      :ivar id: Fully qualified resource ID for the resource. Ex -
       /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
      :vartype id: str
      :ivar name: The name of the resource.
      :vartype name: str
      :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
       "Microsoft.Storage/storageAccounts".
      :vartype type: str
      :param location: The geo-location where the resource lives.
      :type location: str
      :param tags: A set of tags. Resource tags.
      :type tags: dict[str, str]
      :ivar tenant_id: The id of the tenant which the identity belongs to.
      :vartype tenant_id: str
      :ivar principal_id: The id of the service principal object associated with the created
       identity.
      :vartype principal_id: str
      :ivar client_id: The id of the app associated with the identity. This is a random generated
       UUID by MSI.
      :vartype client_id: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'tenant_id': {'readonly': True},
          'principal_id': {'readonly': True},
          'client_id': {'readonly': True},
      }
  
      _attribute_map = {
          'id': {'key': 'id', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
          'location': {'key': 'location', 'type': 'str'},
          'tags': {'key': 'tags', 'type': '{str}'},
          'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
          'principal_id': {'key': 'properties.principalId', 'type': 'str'},
          'client_id': {'key': 'properties.clientId', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(IdentityUpdate, self).__init__(**kwargs)
          self.location = kwargs.get('location', None)
          self.tags = kwargs.get('tags', None)
          self.tenant_id = None
          self.principal_id = None
          self.client_id = None
  
  
  class Operation(msrest.serialization.Model):
      """Operation supported by the Microsoft.ManagedIdentity REST API.
  
      :param name: The name of the REST Operation. This is of the format
       {provider}/{resource}/{operation}.
      :type name: str
      :param display: The object that describes the operation.
      :type display: ~managed_service_identity_client.models.OperationDisplay
      """
  
      _attribute_map = {
          'name': {'key': 'name', 'type': 'str'},
          'display': {'key': 'display', 'type': 'OperationDisplay'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(Operation, self).__init__(**kwargs)
          self.name = kwargs.get('name', None)
          self.display = kwargs.get('display', None)
  
  
  class OperationDisplay(msrest.serialization.Model):
      """The object that describes the operation.
  
      :param provider: Friendly name of the resource provider.
      :type provider: str
      :param operation: The type of operation. For example: read, write, delete.
      :type operation: str
      :param resource: The resource type on which the operation is performed.
      :type resource: str
      :param description: A description of the operation.
      :type description: str
      """
  
      _attribute_map = {
          'provider': {'key': 'provider', 'type': 'str'},
          'operation': {'key': 'operation', 'type': 'str'},
          'resource': {'key': 'resource', 'type': 'str'},
          'description': {'key': 'description', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(OperationDisplay, self).__init__(**kwargs)
          self.provider = kwargs.get('provider', None)
          self.operation = kwargs.get('operation', None)
          self.resource = kwargs.get('resource', None)
          self.description = kwargs.get('description', None)
  
  
  class OperationListResult(msrest.serialization.Model):
      """A list of operations supported by Microsoft.ManagedIdentity Resource Provider.
  
      :param value: A list of operations supported by Microsoft.ManagedIdentity Resource Provider.
      :type value: list[~managed_service_identity_client.models.Operation]
      :param next_link: The url to get the next page of results, if any.
      :type next_link: str
      """
  
      _attribute_map = {
          'value': {'key': 'value', 'type': '[Operation]'},
          'next_link': {'key': 'nextLink', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(OperationListResult, self).__init__(**kwargs)
          self.value = kwargs.get('value', None)
          self.next_link = kwargs.get('next_link', None)
  
  
  class ProxyResource(Resource):
      """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location.
  
      Variables are only populated by the server, and will be ignored when sending a request.
  
      :ivar id: Fully qualified resource ID for the resource. Ex -
       /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
      :vartype id: str
      :ivar name: The name of the resource.
      :vartype name: str
      :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
       "Microsoft.Storage/storageAccounts".
      :vartype type: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
      }
  
      _attribute_map = {
          'id': {'key': 'id', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(ProxyResource, self).__init__(**kwargs)
  
  
  class SystemAssignedIdentity(ProxyResource):
      """Describes a system assigned identity resource.
  
      Variables are only populated by the server, and will be ignored when sending a request.
  
      All required parameters must be populated in order to send to Azure.
  
      :ivar id: Fully qualified resource ID for the resource. Ex -
       /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
      :vartype id: str
      :ivar name: The name of the resource.
      :vartype name: str
      :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
       "Microsoft.Storage/storageAccounts".
      :vartype type: str
      :param location: Required. The geo-location where the resource lives.
      :type location: str
      :param tags: A set of tags. Resource tags.
      :type tags: dict[str, str]
      :ivar tenant_id: The id of the tenant which the identity belongs to.
      :vartype tenant_id: str
      :ivar principal_id: The id of the service principal object associated with the created
       identity.
      :vartype principal_id: str
      :ivar client_id: The id of the app associated with the identity. This is a random generated
       UUID by MSI.
      :vartype client_id: str
      :ivar client_secret_url: The ManagedServiceIdentity DataPlane URL that can be queried to obtain
       the identity credentials.
      :vartype client_secret_url: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'tenant_id': {'readonly': True},
          'principal_id': {'readonly': True},
          'client_id': {'readonly': True},
          'client_secret_url': {'readonly': True},
      }
  
      _attribute_map = {
          'id': {'key': 'id', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
          'location': {'key': 'location', 'type': 'str'},
          'tags': {'key': 'tags', 'type': '{str}'},
          'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
          'principal_id': {'key': 'properties.principalId', 'type': 'str'},
          'client_id': {'key': 'properties.clientId', 'type': 'str'},
          'client_secret_url': {'key': 'properties.clientSecretUrl', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(SystemAssignedIdentity, self).__init__(**kwargs)
          self.location = kwargs['location']
          self.tags = kwargs.get('tags', None)
          self.tenant_id = None
          self.principal_id = None
          self.client_id = None
          self.client_secret_url = None
  
  
  class UserAssignedIdentitiesListResult(msrest.serialization.Model):
      """Values returned by the List operation.
  
      :param value: The collection of userAssignedIdentities returned by the listing operation.
      :type value: list[~managed_service_identity_client.models.Identity]
      :param next_link: The url to get the next page of results, if any.
      :type next_link: str
      """
  
      _attribute_map = {
          'value': {'key': 'value', 'type': '[Identity]'},
          'next_link': {'key': 'nextLink', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(UserAssignedIdentitiesListResult, self).__init__(**kwargs)
          self.value = kwargs.get('value', None)
          self.next_link = kwargs.get('next_link', None)
  