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.
  # --------------------------------------------------------------------------
  
  from msrest.serialization import Model
  from msrest.exceptions import HttpOperationError
  
  
  class RestRequestAuthentication(Model):
      """The authentication information required in the REST health check request to
      the health provider.
  
      You probably want to use the sub-classes and not this class directly. Known
      sub-classes are: RolloutIdentityAuthentication, ApiKeyAuthentication
  
      All required parameters must be populated in order to send to Azure.
  
      :param type: Required. Constant filled by server.
      :type type: str
      """
  
      _validation = {
          'type': {'required': True},
      }
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
      }
  
      _subtype_map = {
          'type': {'RolloutIdentity': 'RolloutIdentityAuthentication', 'ApiKey': 'ApiKeyAuthentication'}
      }
  
      def __init__(self, **kwargs) -> None:
          super(RestRequestAuthentication, self).__init__(**kwargs)
          self.type = None
  
  
  class ApiKeyAuthentication(RestRequestAuthentication):
      """ApiKey authentication gives a name and a value that can be included in
      either the request header or query parameters.
  
      All required parameters must be populated in order to send to Azure.
  
      :param type: Required. Constant filled by server.
      :type type: str
      :param name: Required. The key name of the authentication key/value pair.
      :type name: str
      :param in_property: Required. The location of the authentication key/value
       pair in the request. Possible values include: 'Query', 'Header'
      :type in_property: str or
       ~azure.mgmt.deploymentmanager.models.RestAuthLocation
      :param value: Required. The value of the authentication key/value pair.
      :type value: str
      """
  
      _validation = {
          'type': {'required': True},
          'name': {'required': True},
          'in_property': {'required': True},
          'value': {'required': True},
      }
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'in_property': {'key': 'in', 'type': 'RestAuthLocation'},
          'value': {'key': 'value', 'type': 'str'},
      }
  
      def __init__(self, *, name: str, in_property, value: str, **kwargs) -> None:
          super(ApiKeyAuthentication, self).__init__(**kwargs)
          self.name = name
          self.in_property = in_property
          self.value = value
          self.type = 'ApiKey'
  
  
  class Resource(Model):
      """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. Ex-
       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) -> None:
          super(Resource, self).__init__(**kwargs)
          self.id = None
          self.name = None
          self.type = None
  
  
  class TrackedResource(Resource):
      """The resource model definition for a ARM tracked top level 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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param 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, *, location: str, tags=None, **kwargs) -> None:
          super(TrackedResource, self).__init__(**kwargs)
          self.tags = tags
          self.location = location
  
  
  class ArtifactSource(TrackedResource):
      """The resource that defines the source location where the artifacts are
      located.
  
      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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param tags: Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives
      :type location: str
      :param source_type: Required. The type of artifact source used.
      :type source_type: str
      :param artifact_root: The path from the location that the 'authentication'
       property [say, a SAS URI to the blob container] refers to, to the location
       of the artifacts. This can be used to differentiate different versions of
       the artifacts. Or, different types of artifacts like binaries or
       templates. The location referenced by the authentication property
       concatenated with this optional artifactRoot path forms the artifact
       source location where the artifacts are expected to be found.
      :type artifact_root: str
      :param authentication: Required. The authentication method to use to
       access the artifact source.
      :type authentication: ~azure.mgmt.deploymentmanager.models.Authentication
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'source_type': {'required': True},
          'authentication': {'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'},
          'source_type': {'key': 'properties.sourceType', 'type': 'str'},
          'artifact_root': {'key': 'properties.artifactRoot', 'type': 'str'},
          'authentication': {'key': 'properties.authentication', 'type': 'Authentication'},
      }
  
      def __init__(self, *, location: str, source_type: str, authentication, tags=None, artifact_root: str=None, **kwargs) -> None:
          super(ArtifactSource, self).__init__(tags=tags, location=location, **kwargs)
          self.source_type = source_type
          self.artifact_root = artifact_root
          self.authentication = authentication
  
  
  class ArtifactSourcePropertiesModel(Model):
      """The properties that define the source location where the artifacts are
      located.
  
      All required parameters must be populated in order to send to Azure.
  
      :param source_type: Required. The type of artifact source used.
      :type source_type: str
      :param artifact_root: The path from the location that the 'authentication'
       property [say, a SAS URI to the blob container] refers to, to the location
       of the artifacts. This can be used to differentiate different versions of
       the artifacts. Or, different types of artifacts like binaries or
       templates. The location referenced by the authentication property
       concatenated with this optional artifactRoot path forms the artifact
       source location where the artifacts are expected to be found.
      :type artifact_root: str
      :param authentication: Required. The authentication method to use to
       access the artifact source.
      :type authentication: ~azure.mgmt.deploymentmanager.models.Authentication
      """
  
      _validation = {
          'source_type': {'required': True},
          'authentication': {'required': True},
      }
  
      _attribute_map = {
          'source_type': {'key': 'sourceType', 'type': 'str'},
          'artifact_root': {'key': 'artifactRoot', 'type': 'str'},
          'authentication': {'key': 'authentication', 'type': 'Authentication'},
      }
  
      def __init__(self, *, source_type: str, authentication, artifact_root: str=None, **kwargs) -> None:
          super(ArtifactSourcePropertiesModel, self).__init__(**kwargs)
          self.source_type = source_type
          self.artifact_root = artifact_root
          self.authentication = authentication
  
  
  class Authentication(Model):
      """Defines the authentication method and properties to access the artifacts.
  
      You probably want to use the sub-classes and not this class directly. Known
      sub-classes are: SasAuthentication
  
      All required parameters must be populated in order to send to Azure.
  
      :param type: Required. Constant filled by server.
      :type type: str
      """
  
      _validation = {
          'type': {'required': True},
      }
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
      }
  
      _subtype_map = {
          'type': {'Sas': 'SasAuthentication'}
      }
  
      def __init__(self, **kwargs) -> None:
          super(Authentication, self).__init__(**kwargs)
          self.type = None
  
  
  class AzureEntityResource(Resource):
      """The resource model definition for a Azure Resource Manager resource with an
      etag.
  
      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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :ivar etag: Resource Etag.
      :vartype etag: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'etag': {'readonly': True},
      }
  
      _attribute_map = {
          'id': {'key': 'id', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
          'etag': {'key': 'etag', 'type': 'str'},
      }
  
      def __init__(self, **kwargs) -> None:
          super(AzureEntityResource, self).__init__(**kwargs)
          self.etag = None
  
  
  class CloudError(Model):
      """The error information object.
  
      :param error: The properties that define the error.
      :type error: ~azure.mgmt.deploymentmanager.models.CloudErrorBody
      """
  
      _attribute_map = {
          'error': {'key': 'error', 'type': 'CloudErrorBody'},
      }
  
      def __init__(self, *, error=None, **kwargs) -> None:
          super(CloudError, self).__init__(**kwargs)
          self.error = error
  
  
  class CloudErrorException(HttpOperationError):
      """Server responsed with exception of type: 'CloudError'.
  
      :param deserialize: A deserializer
      :param response: Server response to be deserialized.
      """
  
      def __init__(self, deserialize, response, *args):
  
          super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args)
  
  
  class CloudErrorBody(Model):
      """Detailed error information of any failure.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      :ivar code: Error code string.
      :vartype code: str
      :ivar message: Descriptive error information.
      :vartype message: str
      :param target: Error target
      :type target: str
      :param details: More detailed error information.
      :type details: list[~azure.mgmt.deploymentmanager.models.CloudErrorBody]
      """
  
      _validation = {
          'code': {'readonly': True},
          'message': {'readonly': True},
      }
  
      _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, *, target: str=None, details=None, **kwargs) -> None:
          super(CloudErrorBody, self).__init__(**kwargs)
          self.code = None
          self.message = None
          self.target = target
          self.details = details
  
  
  class HealthCheckStepAttributes(Model):
      """The attributes for the health check step.
  
      You probably want to use the sub-classes and not this class directly. Known
      sub-classes are: RestHealthCheckStepAttributes
  
      All required parameters must be populated in order to send to Azure.
  
      :param wait_duration: The duration in ISO 8601 format for which health
       check waits idly without any checks.
      :type wait_duration: str
      :param max_elastic_duration: The duration in ISO 8601 format for which the
       health check waits for the resource to become healthy. Health check fails
       if it doesn't. Health check starts to enforce healthyStateDuration once
       resource becomes healthy.
      :type max_elastic_duration: str
      :param healthy_state_duration: Required. The duration in ISO 8601 format
       for which the resource is expected to be continuously healthy. If
       maxElasticDuration is specified, healthy state duration is enforced after
       the detection of first healthy signal.
      :type healthy_state_duration: str
      :param type: Required. Constant filled by server.
      :type type: str
      """
  
      _validation = {
          'healthy_state_duration': {'required': True},
          'type': {'required': True},
      }
  
      _attribute_map = {
          'wait_duration': {'key': 'waitDuration', 'type': 'str'},
          'max_elastic_duration': {'key': 'maxElasticDuration', 'type': 'str'},
          'healthy_state_duration': {'key': 'healthyStateDuration', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
      }
  
      _subtype_map = {
          'type': {'REST': 'RestHealthCheckStepAttributes'}
      }
  
      def __init__(self, *, healthy_state_duration: str, wait_duration: str=None, max_elastic_duration: str=None, **kwargs) -> None:
          super(HealthCheckStepAttributes, self).__init__(**kwargs)
          self.wait_duration = wait_duration
          self.max_elastic_duration = max_elastic_duration
          self.healthy_state_duration = healthy_state_duration
          self.type = None
  
  
  class StepProperties(Model):
      """The properties of a step resource.
  
      You probably want to use the sub-classes and not this class directly. Known
      sub-classes are: HealthCheckStepProperties, WaitStepProperties
  
      All required parameters must be populated in order to send to Azure.
  
      :param step_type: Required. Constant filled by server.
      :type step_type: str
      """
  
      _validation = {
          'step_type': {'required': True},
      }
  
      _attribute_map = {
          'step_type': {'key': 'stepType', 'type': 'str'},
      }
  
      _subtype_map = {
          'step_type': {'HealthCheck': 'HealthCheckStepProperties', 'Wait': 'WaitStepProperties'}
      }
  
      def __init__(self, **kwargs) -> None:
          super(StepProperties, self).__init__(**kwargs)
          self.step_type = None
  
  
  class HealthCheckStepProperties(StepProperties):
      """Defines the properties of a health check step.
  
      All required parameters must be populated in order to send to Azure.
  
      :param step_type: Required. Constant filled by server.
      :type step_type: str
      :param attributes: Required. The health check step attributes
      :type attributes:
       ~azure.mgmt.deploymentmanager.models.HealthCheckStepAttributes
      """
  
      _validation = {
          'step_type': {'required': True},
          'attributes': {'required': True},
      }
  
      _attribute_map = {
          'step_type': {'key': 'stepType', 'type': 'str'},
          'attributes': {'key': 'attributes', 'type': 'HealthCheckStepAttributes'},
      }
  
      def __init__(self, *, attributes, **kwargs) -> None:
          super(HealthCheckStepProperties, self).__init__(**kwargs)
          self.attributes = attributes
          self.step_type = 'HealthCheck'
  
  
  class Identity(Model):
      """Identity for the resource.
  
      All required parameters must be populated in order to send to Azure.
  
      :param type: Required. The identity type.
      :type type: str
      :param identity_ids: Required. The list of identities.
      :type identity_ids: list[str]
      """
  
      _validation = {
          'type': {'required': True},
          'identity_ids': {'required': True},
      }
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
          'identity_ids': {'key': 'identityIds', 'type': '[str]'},
      }
  
      def __init__(self, *, type: str, identity_ids, **kwargs) -> None:
          super(Identity, self).__init__(**kwargs)
          self.type = type
          self.identity_ids = identity_ids
  
  
  class Message(Model):
      """Supplementary contextual messages during a rollout.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      :ivar time_stamp: Time in UTC this message was provided.
      :vartype time_stamp: datetime
      :ivar message: The actual message text.
      :vartype message: str
      """
  
      _validation = {
          'time_stamp': {'readonly': True},
          'message': {'readonly': True},
      }
  
      _attribute_map = {
          'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'},
          'message': {'key': 'message', 'type': 'str'},
      }
  
      def __init__(self, **kwargs) -> None:
          super(Message, self).__init__(**kwargs)
          self.time_stamp = None
          self.message = None
  
  
  class Operation(Model):
      """Represents an operation that can be performed on the service.
  
      :param name: The name of the operation.
      :type name: str
      :param display: The display name of the operation.
      :type display: ~azure.mgmt.deploymentmanager.models.OperationDetail
      :param origin: The origin of the operation.
      :type origin: str
      :param properties: The properties of the operation.
      :type properties: object
      """
  
      _attribute_map = {
          'name': {'key': 'name', 'type': 'str'},
          'display': {'key': 'display', 'type': 'OperationDetail'},
          'origin': {'key': 'origin', 'type': 'str'},
          'properties': {'key': 'properties', 'type': 'object'},
      }
  
      def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None:
          super(Operation, self).__init__(**kwargs)
          self.name = name
          self.display = display
          self.origin = origin
          self.properties = properties
  
  
  class OperationDetail(Model):
      """The detail about an operation.
  
      :param provider: The name of the provider that supports the operation.
      :type provider: str
      :param resource: The resource type on which this operation can be
       performed.
      :type resource: str
      :param operation: The name of the operation.
      :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(OperationDetail, self).__init__(**kwargs)
          self.provider = provider
          self.resource = resource
          self.operation = operation
          self.description = description
  
  
  class OperationsList(Model):
      """The operations response.
  
      :param value: The list of supported operations
      :type value: ~azure.mgmt.deploymentmanager.models.Operation
      """
  
      _attribute_map = {
          'value': {'key': 'value', 'type': 'Operation'},
      }
  
      def __init__(self, *, value=None, **kwargs) -> None:
          super(OperationsList, self).__init__(**kwargs)
          self.value = value
  
  
  class PrePostStep(Model):
      """The properties that define a step.
  
      All required parameters must be populated in order to send to Azure.
  
      :param step_id: Required. The resource Id of the step to be run.
      :type step_id: str
      """
  
      _validation = {
          'step_id': {'required': True},
      }
  
      _attribute_map = {
          'step_id': {'key': 'stepId', 'type': 'str'},
      }
  
      def __init__(self, *, step_id: str, **kwargs) -> None:
          super(PrePostStep, self).__init__(**kwargs)
          self.step_id = step_id
  
  
  class ProxyResource(Resource):
      """The resource model definition for a ARM proxy resource. It will have
      everything other than required location and tags.
  
      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. Ex-
       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) -> None:
          super(ProxyResource, self).__init__(**kwargs)
  
  
  class ResourceOperation(Model):
      """Individual resource operation information.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      :param resource_name: Name of the resource as specified in the artifacts.
       For ARM resources, this is the name of the resource specified in the
       template.
      :type resource_name: str
      :ivar operation_id: Unique identifier of the operation. For ARM resources,
       this is the operationId obtained from ARM service.
      :vartype operation_id: str
      :param resource_type: Type of the resource as specified in the artifacts.
       For ARM resources, this is the type of the resource specified in the
       template.
      :type resource_type: str
      :ivar provisioning_state: State of the resource deployment. For ARM
       resources, this is the current provisioning state of the resource.
      :vartype provisioning_state: str
      :ivar status_message: Descriptive information of the resource operation.
      :vartype status_message: str
      :ivar status_code: Http status code of the operation.
      :vartype status_code: str
      """
  
      _validation = {
          'operation_id': {'readonly': True},
          'provisioning_state': {'readonly': True},
          'status_message': {'readonly': True},
          'status_code': {'readonly': True},
      }
  
      _attribute_map = {
          'resource_name': {'key': 'resourceName', 'type': 'str'},
          'operation_id': {'key': 'operationId', 'type': 'str'},
          'resource_type': {'key': 'resourceType', 'type': 'str'},
          'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
          'status_message': {'key': 'statusMessage', 'type': 'str'},
          'status_code': {'key': 'statusCode', 'type': 'str'},
      }
  
      def __init__(self, *, resource_name: str=None, resource_type: str=None, **kwargs) -> None:
          super(ResourceOperation, self).__init__(**kwargs)
          self.resource_name = resource_name
          self.operation_id = None
          self.resource_type = resource_type
          self.provisioning_state = None
          self.status_message = None
          self.status_code = None
  
  
  class RestHealthCheck(Model):
      """A REST based health check.
  
      All required parameters must be populated in order to send to Azure.
  
      :param name: Required. A unique name for this check.
      :type name: str
      :param request: Required. The request to the health provider.
      :type request: ~azure.mgmt.deploymentmanager.models.RestRequest
      :param response: The expected response from the health provider. If no
       expected response is provided, the default is to expect the received
       response to have an HTTP status code of 200 OK.
      :type response: ~azure.mgmt.deploymentmanager.models.RestResponse
      """
  
      _validation = {
          'name': {'required': True},
          'request': {'required': True},
      }
  
      _attribute_map = {
          'name': {'key': 'name', 'type': 'str'},
          'request': {'key': 'request', 'type': 'RestRequest'},
          'response': {'key': 'response', 'type': 'RestResponse'},
      }
  
      def __init__(self, *, name: str, request, response=None, **kwargs) -> None:
          super(RestHealthCheck, self).__init__(**kwargs)
          self.name = name
          self.request = request
          self.response = response
  
  
  class RestHealthCheckStepAttributes(HealthCheckStepAttributes):
      """Defines the REST health check step properties.
  
      All required parameters must be populated in order to send to Azure.
  
      :param wait_duration: The duration in ISO 8601 format for which health
       check waits idly without any checks.
      :type wait_duration: str
      :param max_elastic_duration: The duration in ISO 8601 format for which the
       health check waits for the resource to become healthy. Health check fails
       if it doesn't. Health check starts to enforce healthyStateDuration once
       resource becomes healthy.
      :type max_elastic_duration: str
      :param healthy_state_duration: Required. The duration in ISO 8601 format
       for which the resource is expected to be continuously healthy. If
       maxElasticDuration is specified, healthy state duration is enforced after
       the detection of first healthy signal.
      :type healthy_state_duration: str
      :param type: Required. Constant filled by server.
      :type type: str
      :param health_checks: Required. The list of checks that form the health
       check step.
      :type health_checks:
       list[~azure.mgmt.deploymentmanager.models.RestHealthCheck]
      """
  
      _validation = {
          'healthy_state_duration': {'required': True},
          'type': {'required': True},
          'health_checks': {'required': True},
      }
  
      _attribute_map = {
          'wait_duration': {'key': 'waitDuration', 'type': 'str'},
          'max_elastic_duration': {'key': 'maxElasticDuration', 'type': 'str'},
          'healthy_state_duration': {'key': 'healthyStateDuration', 'type': 'str'},
          'type': {'key': 'type', 'type': 'str'},
          'health_checks': {'key': 'properties.healthChecks', 'type': '[RestHealthCheck]'},
      }
  
      def __init__(self, *, healthy_state_duration: str, health_checks, wait_duration: str=None, max_elastic_duration: str=None, **kwargs) -> None:
          super(RestHealthCheckStepAttributes, self).__init__(wait_duration=wait_duration, max_elastic_duration=max_elastic_duration, healthy_state_duration=healthy_state_duration, **kwargs)
          self.health_checks = health_checks
          self.type = 'REST'
  
  
  class RestRequest(Model):
      """The properties that make up a REST request.
  
      All required parameters must be populated in order to send to Azure.
  
      :param method: Required. The HTTP method to use for the request. Possible
       values include: 'GET', 'POST'
      :type method: str or
       ~azure.mgmt.deploymentmanager.models.RestRequestMethod
      :param uri: Required. The HTTP URI to use for the request.
      :type uri: str
      :param authentication: Required. The authentication information required
       in the request to the health provider.
      :type authentication:
       ~azure.mgmt.deploymentmanager.models.RestRequestAuthentication
      """
  
      _validation = {
          'method': {'required': True},
          'uri': {'required': True},
          'authentication': {'required': True},
      }
  
      _attribute_map = {
          'method': {'key': 'method', 'type': 'RestRequestMethod'},
          'uri': {'key': 'uri', 'type': 'str'},
          'authentication': {'key': 'authentication', 'type': 'RestRequestAuthentication'},
      }
  
      def __init__(self, *, method, uri: str, authentication, **kwargs) -> None:
          super(RestRequest, self).__init__(**kwargs)
          self.method = method
          self.uri = uri
          self.authentication = authentication
  
  
  class RestResponse(Model):
      """The properties that make up the expected REST response.
  
      :param success_status_codes: The HTTP status codes expected in a
       successful health check response. The response is expected to match one of
       the given status codes. If no expected status codes are provided, default
       expected status code is 200 OK.
      :type success_status_codes: list[str]
      :param regex: The regular expressions to match the response content with.
      :type regex: ~azure.mgmt.deploymentmanager.models.RestResponseRegex
      """
  
      _attribute_map = {
          'success_status_codes': {'key': 'successStatusCodes', 'type': '[str]'},
          'regex': {'key': 'regex', 'type': 'RestResponseRegex'},
      }
  
      def __init__(self, *, success_status_codes=None, regex=None, **kwargs) -> None:
          super(RestResponse, self).__init__(**kwargs)
          self.success_status_codes = success_status_codes
          self.regex = regex
  
  
  class RestResponseRegex(Model):
      """The regular expressions to match the response content with.
  
      :param matches: The list of regular expressions.
      :type matches: list[str]
      :param match_quantifier: Indicates whether any or all of the expressions
       should match with the response content. Possible values include: 'All',
       'Any'
      :type match_quantifier: str or
       ~azure.mgmt.deploymentmanager.models.RestMatchQuantifier
      """
  
      _attribute_map = {
          'matches': {'key': 'matches', 'type': '[str]'},
          'match_quantifier': {'key': 'matchQuantifier', 'type': 'RestMatchQuantifier'},
      }
  
      def __init__(self, *, matches=None, match_quantifier=None, **kwargs) -> None:
          super(RestResponseRegex, self).__init__(**kwargs)
          self.matches = matches
          self.match_quantifier = match_quantifier
  
  
  class Rollout(TrackedResource):
      """Defines the rollout.
  
      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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param tags: Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives
      :type location: str
      :param identity: Identity for the resource.
      :type identity: ~azure.mgmt.deploymentmanager.models.Identity
      :param build_version: Required. The version of the build being deployed.
      :type build_version: str
      :param artifact_source_id: The reference to the artifact source resource
       Id where the payload is located.
      :type artifact_source_id: str
      :param target_service_topology_id: Required. The resource Id of the
       service topology from which service units are being referenced in step
       groups to be deployed.
      :type target_service_topology_id: str
      :param step_groups: Required. The list of step groups that define the
       orchestration.
      :type step_groups: list[~azure.mgmt.deploymentmanager.models.StepGroup]
      :ivar status: The current status of the rollout.
      :vartype status: str
      :ivar total_retry_attempts: The cardinal count of total number of retries
       performed on the rollout at a given time.
      :vartype total_retry_attempts: int
      :ivar operation_info: Operational information of the rollout.
      :vartype operation_info:
       ~azure.mgmt.deploymentmanager.models.RolloutOperationInfo
      :ivar services: The detailed information on the services being deployed.
      :vartype services: list[~azure.mgmt.deploymentmanager.models.Service]
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'build_version': {'required': True},
          'target_service_topology_id': {'required': True},
          'step_groups': {'required': True},
          'status': {'readonly': True},
          'total_retry_attempts': {'readonly': True},
          'operation_info': {'readonly': True},
          'services': {'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'},
          'identity': {'key': 'identity', 'type': 'Identity'},
          'build_version': {'key': 'properties.buildVersion', 'type': 'str'},
          'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'},
          'target_service_topology_id': {'key': 'properties.targetServiceTopologyId', 'type': 'str'},
          'step_groups': {'key': 'properties.stepGroups', 'type': '[StepGroup]'},
          'status': {'key': 'properties.status', 'type': 'str'},
          'total_retry_attempts': {'key': 'properties.totalRetryAttempts', 'type': 'int'},
          'operation_info': {'key': 'properties.operationInfo', 'type': 'RolloutOperationInfo'},
          'services': {'key': 'properties.services', 'type': '[Service]'},
      }
  
      def __init__(self, *, location: str, build_version: str, target_service_topology_id: str, step_groups, tags=None, identity=None, artifact_source_id: str=None, **kwargs) -> None:
          super(Rollout, self).__init__(tags=tags, location=location, **kwargs)
          self.identity = identity
          self.build_version = build_version
          self.artifact_source_id = artifact_source_id
          self.target_service_topology_id = target_service_topology_id
          self.step_groups = step_groups
          self.status = None
          self.total_retry_attempts = None
          self.operation_info = None
          self.services = None
  
  
  class RolloutIdentityAuthentication(RestRequestAuthentication):
      """RolloutIdentity uses the user-assigned managed identity authentication
      context specified in the Identity property during rollout creation.
  
      All required parameters must be populated in order to send to Azure.
  
      :param type: Required. Constant filled by server.
      :type type: str
      """
  
      _validation = {
          'type': {'required': True},
      }
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
      }
  
      def __init__(self, **kwargs) -> None:
          super(RolloutIdentityAuthentication, self).__init__(**kwargs)
          self.type = 'RolloutIdentity'
  
  
  class RolloutOperationInfo(Model):
      """Detailed runtime information of the rollout.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      :ivar retry_attempt: The ordinal count of the number of retry attempts on
       a rollout. 0 if no retries of the rollout have been performed. If the
       rollout is updated with a PUT, this count is reset to 0.
      :vartype retry_attempt: int
      :ivar skip_succeeded_on_retry: True, if all steps that succeeded on the
       previous run/attempt were chosen to be skipped in this retry attempt.
       False, otherwise.
      :vartype skip_succeeded_on_retry: bool
      :ivar start_time: The start time of the rollout in UTC.
      :vartype start_time: datetime
      :ivar end_time: The start time of the rollout in UTC. This property will
       not be set if the rollout has not completed yet.
      :vartype end_time: datetime
      :ivar error: The detailed error information for any failure.
      :vartype error: ~azure.mgmt.deploymentmanager.models.CloudErrorBody
      """
  
      _validation = {
          'retry_attempt': {'readonly': True},
          'skip_succeeded_on_retry': {'readonly': True},
          'start_time': {'readonly': True},
          'end_time': {'readonly': True},
          'error': {'readonly': True},
      }
  
      _attribute_map = {
          'retry_attempt': {'key': 'retryAttempt', 'type': 'int'},
          'skip_succeeded_on_retry': {'key': 'skipSucceededOnRetry', 'type': 'bool'},
          'start_time': {'key': 'startTime', 'type': 'iso-8601'},
          'end_time': {'key': 'endTime', 'type': 'iso-8601'},
          'error': {'key': 'error', 'type': 'CloudErrorBody'},
      }
  
      def __init__(self, **kwargs) -> None:
          super(RolloutOperationInfo, self).__init__(**kwargs)
          self.retry_attempt = None
          self.skip_succeeded_on_retry = None
          self.start_time = None
          self.end_time = None
          self.error = None
  
  
  class RolloutPropertiesModel(Model):
      """Defines the properties of a rollout.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      :ivar status: The current status of the rollout.
      :vartype status: str
      :ivar total_retry_attempts: The cardinal count of total number of retries
       performed on the rollout at a given time.
      :vartype total_retry_attempts: int
      :ivar operation_info: Operational information of the rollout.
      :vartype operation_info:
       ~azure.mgmt.deploymentmanager.models.RolloutOperationInfo
      :ivar services: The detailed information on the services being deployed.
      :vartype services: list[~azure.mgmt.deploymentmanager.models.Service]
      """
  
      _validation = {
          'status': {'readonly': True},
          'total_retry_attempts': {'readonly': True},
          'operation_info': {'readonly': True},
          'services': {'readonly': True},
      }
  
      _attribute_map = {
          'status': {'key': 'status', 'type': 'str'},
          'total_retry_attempts': {'key': 'totalRetryAttempts', 'type': 'int'},
          'operation_info': {'key': 'operationInfo', 'type': 'RolloutOperationInfo'},
          'services': {'key': 'services', 'type': '[Service]'},
      }
  
      def __init__(self, **kwargs) -> None:
          super(RolloutPropertiesModel, self).__init__(**kwargs)
          self.status = None
          self.total_retry_attempts = None
          self.operation_info = None
          self.services = None
  
  
  class RolloutRequest(TrackedResource):
      """Defines the PUT rollout request body.
  
      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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param tags: Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives
      :type location: str
      :param identity: Required. Identity for the resource.
      :type identity: ~azure.mgmt.deploymentmanager.models.Identity
      :param build_version: Required. The version of the build being deployed.
      :type build_version: str
      :param artifact_source_id: The reference to the artifact source resource
       Id where the payload is located.
      :type artifact_source_id: str
      :param target_service_topology_id: Required. The resource Id of the
       service topology from which service units are being referenced in step
       groups to be deployed.
      :type target_service_topology_id: str
      :param step_groups: Required. The list of step groups that define the
       orchestration.
      :type step_groups: list[~azure.mgmt.deploymentmanager.models.StepGroup]
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'identity': {'required': True},
          'build_version': {'required': True},
          'target_service_topology_id': {'required': True},
          'step_groups': {'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'},
          'identity': {'key': 'identity', 'type': 'Identity'},
          'build_version': {'key': 'properties.buildVersion', 'type': 'str'},
          'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'},
          'target_service_topology_id': {'key': 'properties.targetServiceTopologyId', 'type': 'str'},
          'step_groups': {'key': 'properties.stepGroups', 'type': '[StepGroup]'},
      }
  
      def __init__(self, *, location: str, identity, build_version: str, target_service_topology_id: str, step_groups, tags=None, artifact_source_id: str=None, **kwargs) -> None:
          super(RolloutRequest, self).__init__(tags=tags, location=location, **kwargs)
          self.identity = identity
          self.build_version = build_version
          self.artifact_source_id = artifact_source_id
          self.target_service_topology_id = target_service_topology_id
          self.step_groups = step_groups
  
  
  class RolloutStep(Model):
      """Defines a specific step on a target service unit.
  
      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 name: Required. Name of the step.
      :type name: str
      :ivar status: Current state of the step.
      :vartype status: str
      :param step_group: The step group the current step is part of.
      :type step_group: str
      :ivar operation_info: Detailed information of specific action execution.
      :vartype operation_info:
       ~azure.mgmt.deploymentmanager.models.StepOperationInfo
      :ivar resource_operations: Set of resource operations that were performed,
       if any, on an Azure resource.
      :vartype resource_operations:
       list[~azure.mgmt.deploymentmanager.models.ResourceOperation]
      :ivar messages: Supplementary informative messages during rollout.
      :vartype messages: list[~azure.mgmt.deploymentmanager.models.Message]
      """
  
      _validation = {
          'name': {'required': True},
          'status': {'readonly': True},
          'operation_info': {'readonly': True},
          'resource_operations': {'readonly': True},
          'messages': {'readonly': True},
      }
  
      _attribute_map = {
          'name': {'key': 'name', 'type': 'str'},
          'status': {'key': 'status', 'type': 'str'},
          'step_group': {'key': 'stepGroup', 'type': 'str'},
          'operation_info': {'key': 'operationInfo', 'type': 'StepOperationInfo'},
          'resource_operations': {'key': 'resourceOperations', 'type': '[ResourceOperation]'},
          'messages': {'key': 'messages', 'type': '[Message]'},
      }
  
      def __init__(self, *, name: str, step_group: str=None, **kwargs) -> None:
          super(RolloutStep, self).__init__(**kwargs)
          self.name = name
          self.status = None
          self.step_group = step_group
          self.operation_info = None
          self.resource_operations = None
          self.messages = None
  
  
  class SasAuthentication(Authentication):
      """Defines the properties to access the artifacts using an Azure Storage SAS
      URI.
  
      All required parameters must be populated in order to send to Azure.
  
      :param type: Required. Constant filled by server.
      :type type: str
      :param sas_uri: Required. The SAS URI to the Azure Storage blob container.
       Any offset from the root of the container to where the artifacts are
       located can be defined in the artifactRoot.
      :type sas_uri: str
      """
  
      _validation = {
          'type': {'required': True},
          'sas_uri': {'required': True},
      }
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
          'sas_uri': {'key': 'properties.sasUri', 'type': 'str'},
      }
  
      def __init__(self, *, sas_uri: str, **kwargs) -> None:
          super(SasAuthentication, self).__init__(**kwargs)
          self.sas_uri = sas_uri
          self.type = 'Sas'
  
  
  class ServiceProperties(Model):
      """The properties of a service.
  
      All required parameters must be populated in order to send to Azure.
  
      :param target_location: Required. The Azure location to which the
       resources in the service belong to or should be deployed to.
      :type target_location: str
      :param target_subscription_id: Required. The subscription to which the
       resources in the service belong to or should be deployed to.
      :type target_subscription_id: str
      """
  
      _validation = {
          'target_location': {'required': True},
          'target_subscription_id': {'required': True},
      }
  
      _attribute_map = {
          'target_location': {'key': 'targetLocation', 'type': 'str'},
          'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'},
      }
  
      def __init__(self, *, target_location: str, target_subscription_id: str, **kwargs) -> None:
          super(ServiceProperties, self).__init__(**kwargs)
          self.target_location = target_location
          self.target_subscription_id = target_subscription_id
  
  
  class Service(ServiceProperties):
      """Defines a service.
  
      All required parameters must be populated in order to send to Azure.
  
      :param target_location: Required. The Azure location to which the
       resources in the service belong to or should be deployed to.
      :type target_location: str
      :param target_subscription_id: Required. The subscription to which the
       resources in the service belong to or should be deployed to.
      :type target_subscription_id: str
      :param name: Name of the service.
      :type name: str
      :param service_units: The detailed information about the units that make
       up the service.
      :type service_units:
       list[~azure.mgmt.deploymentmanager.models.ServiceUnit]
      """
  
      _validation = {
          'target_location': {'required': True},
          'target_subscription_id': {'required': True},
      }
  
      _attribute_map = {
          'target_location': {'key': 'targetLocation', 'type': 'str'},
          'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'},
          'name': {'key': 'name', 'type': 'str'},
          'service_units': {'key': 'serviceUnits', 'type': '[ServiceUnit]'},
      }
  
      def __init__(self, *, target_location: str, target_subscription_id: str, name: str=None, service_units=None, **kwargs) -> None:
          super(Service, self).__init__(target_location=target_location, target_subscription_id=target_subscription_id, **kwargs)
          self.name = name
          self.service_units = service_units
  
  
  class ServiceResource(TrackedResource):
      """The resource representation of a service in a service topology.
  
      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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param tags: Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives
      :type location: str
      :param target_location: Required. The Azure location to which the
       resources in the service belong to or should be deployed to.
      :type target_location: str
      :param target_subscription_id: Required. The subscription to which the
       resources in the service belong to or should be deployed to.
      :type target_subscription_id: str
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'target_location': {'required': True},
          'target_subscription_id': {'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'},
          'target_location': {'key': 'properties.targetLocation', 'type': 'str'},
          'target_subscription_id': {'key': 'properties.targetSubscriptionId', 'type': 'str'},
      }
  
      def __init__(self, *, location: str, target_location: str, target_subscription_id: str, tags=None, **kwargs) -> None:
          super(ServiceResource, self).__init__(tags=tags, location=location, **kwargs)
          self.target_location = target_location
          self.target_subscription_id = target_subscription_id
  
  
  class ServiceTopologyProperties(Model):
      """The properties of a service topology.
  
      :param artifact_source_id: The resource Id of the artifact source that
       contains the artifacts that can be referenced in the service units.
      :type artifact_source_id: str
      """
  
      _attribute_map = {
          'artifact_source_id': {'key': 'artifactSourceId', 'type': 'str'},
      }
  
      def __init__(self, *, artifact_source_id: str=None, **kwargs) -> None:
          super(ServiceTopologyProperties, self).__init__(**kwargs)
          self.artifact_source_id = artifact_source_id
  
  
  class ServiceTopologyResource(TrackedResource):
      """The resource representation of a service topology.
  
      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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param tags: Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives
      :type location: str
      :param artifact_source_id: The resource Id of the artifact source that
       contains the artifacts that can be referenced in the service units.
      :type artifact_source_id: 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'},
          'artifact_source_id': {'key': 'properties.artifactSourceId', 'type': 'str'},
      }
  
      def __init__(self, *, location: str, tags=None, artifact_source_id: str=None, **kwargs) -> None:
          super(ServiceTopologyResource, self).__init__(tags=tags, location=location, **kwargs)
          self.artifact_source_id = artifact_source_id
  
  
  class ServiceUnitProperties(Model):
      """Defines the properties of a service unit.
  
      All required parameters must be populated in order to send to Azure.
  
      :param target_resource_group: Required. The Azure Resource Group to which
       the resources in the service unit belong to or should be deployed to.
      :type target_resource_group: str
      :param deployment_mode: Required. Describes the type of ARM deployment to
       be performed on the resource. Possible values include: 'Incremental',
       'Complete'
      :type deployment_mode: str or
       ~azure.mgmt.deploymentmanager.models.DeploymentMode
      :param artifacts: The artifacts for the service unit.
      :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts
      """
  
      _validation = {
          'target_resource_group': {'required': True},
          'deployment_mode': {'required': True},
      }
  
      _attribute_map = {
          'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'},
          'deployment_mode': {'key': 'deploymentMode', 'type': 'DeploymentMode'},
          'artifacts': {'key': 'artifacts', 'type': 'ServiceUnitArtifacts'},
      }
  
      def __init__(self, *, target_resource_group: str, deployment_mode, artifacts=None, **kwargs) -> None:
          super(ServiceUnitProperties, self).__init__(**kwargs)
          self.target_resource_group = target_resource_group
          self.deployment_mode = deployment_mode
          self.artifacts = artifacts
  
  
  class ServiceUnit(ServiceUnitProperties):
      """Defines a service unit.
  
      All required parameters must be populated in order to send to Azure.
  
      :param target_resource_group: Required. The Azure Resource Group to which
       the resources in the service unit belong to or should be deployed to.
      :type target_resource_group: str
      :param deployment_mode: Required. Describes the type of ARM deployment to
       be performed on the resource. Possible values include: 'Incremental',
       'Complete'
      :type deployment_mode: str or
       ~azure.mgmt.deploymentmanager.models.DeploymentMode
      :param artifacts: The artifacts for the service unit.
      :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts
      :param name: Name of the service unit.
      :type name: str
      :param steps: Detailed step information, if present.
      :type steps: list[~azure.mgmt.deploymentmanager.models.RolloutStep]
      """
  
      _validation = {
          'target_resource_group': {'required': True},
          'deployment_mode': {'required': True},
      }
  
      _attribute_map = {
          'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'},
          'deployment_mode': {'key': 'deploymentMode', 'type': 'DeploymentMode'},
          'artifacts': {'key': 'artifacts', 'type': 'ServiceUnitArtifacts'},
          'name': {'key': 'name', 'type': 'str'},
          'steps': {'key': 'steps', 'type': '[RolloutStep]'},
      }
  
      def __init__(self, *, target_resource_group: str, deployment_mode, artifacts=None, name: str=None, steps=None, **kwargs) -> None:
          super(ServiceUnit, self).__init__(target_resource_group=target_resource_group, deployment_mode=deployment_mode, artifacts=artifacts, **kwargs)
          self.name = name
          self.steps = steps
  
  
  class ServiceUnitArtifacts(Model):
      """Defines the artifacts of a service unit.
  
      :param template_uri: The full URI of the ARM template file with the SAS
       token.
      :type template_uri: str
      :param parameters_uri: The full URI of the ARM parameters file with the
       SAS token.
      :type parameters_uri: str
      :param template_artifact_source_relative_path: The path to the ARM
       template file relative to the artifact source.
      :type template_artifact_source_relative_path: str
      :param parameters_artifact_source_relative_path: The path to the ARM
       parameters file relative to the artifact source.
      :type parameters_artifact_source_relative_path: str
      """
  
      _attribute_map = {
          'template_uri': {'key': 'templateUri', 'type': 'str'},
          'parameters_uri': {'key': 'parametersUri', 'type': 'str'},
          'template_artifact_source_relative_path': {'key': 'templateArtifactSourceRelativePath', 'type': 'str'},
          'parameters_artifact_source_relative_path': {'key': 'parametersArtifactSourceRelativePath', 'type': 'str'},
      }
  
      def __init__(self, *, template_uri: str=None, parameters_uri: str=None, template_artifact_source_relative_path: str=None, parameters_artifact_source_relative_path: str=None, **kwargs) -> None:
          super(ServiceUnitArtifacts, self).__init__(**kwargs)
          self.template_uri = template_uri
          self.parameters_uri = parameters_uri
          self.template_artifact_source_relative_path = template_artifact_source_relative_path
          self.parameters_artifact_source_relative_path = parameters_artifact_source_relative_path
  
  
  class ServiceUnitResource(TrackedResource):
      """Represents the response of a service unit 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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param tags: Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives
      :type location: str
      :param target_resource_group: Required. The Azure Resource Group to which
       the resources in the service unit belong to or should be deployed to.
      :type target_resource_group: str
      :param deployment_mode: Required. Describes the type of ARM deployment to
       be performed on the resource. Possible values include: 'Incremental',
       'Complete'
      :type deployment_mode: str or
       ~azure.mgmt.deploymentmanager.models.DeploymentMode
      :param artifacts: The artifacts for the service unit.
      :type artifacts: ~azure.mgmt.deploymentmanager.models.ServiceUnitArtifacts
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'target_resource_group': {'required': True},
          'deployment_mode': {'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'},
          'target_resource_group': {'key': 'properties.targetResourceGroup', 'type': 'str'},
          'deployment_mode': {'key': 'properties.deploymentMode', 'type': 'DeploymentMode'},
          'artifacts': {'key': 'properties.artifacts', 'type': 'ServiceUnitArtifacts'},
      }
  
      def __init__(self, *, location: str, target_resource_group: str, deployment_mode, tags=None, artifacts=None, **kwargs) -> None:
          super(ServiceUnitResource, self).__init__(tags=tags, location=location, **kwargs)
          self.target_resource_group = target_resource_group
          self.deployment_mode = deployment_mode
          self.artifacts = artifacts
  
  
  class StepGroup(Model):
      """The properties that define a Step group in a rollout.
  
      All required parameters must be populated in order to send to Azure.
  
      :param name: Required. The name of the step group.
      :type name: str
      :param depends_on_step_groups: The list of step group names on which this
       step group depends on.
      :type depends_on_step_groups: list[str]
      :param pre_deployment_steps: The list of steps to be run before deploying
       the target.
      :type pre_deployment_steps:
       list[~azure.mgmt.deploymentmanager.models.PrePostStep]
      :param deployment_target_id: Required. The resource Id of service unit to
       be deployed. The service unit should be from the service topology
       referenced in targetServiceTopologyId
      :type deployment_target_id: str
      :param post_deployment_steps: The list of steps to be run after deploying
       the target.
      :type post_deployment_steps:
       list[~azure.mgmt.deploymentmanager.models.PrePostStep]
      """
  
      _validation = {
          'name': {'required': True},
          'deployment_target_id': {'required': True},
      }
  
      _attribute_map = {
          'name': {'key': 'name', 'type': 'str'},
          'depends_on_step_groups': {'key': 'dependsOnStepGroups', 'type': '[str]'},
          'pre_deployment_steps': {'key': 'preDeploymentSteps', 'type': '[PrePostStep]'},
          'deployment_target_id': {'key': 'deploymentTargetId', 'type': 'str'},
          'post_deployment_steps': {'key': 'postDeploymentSteps', 'type': '[PrePostStep]'},
      }
  
      def __init__(self, *, name: str, deployment_target_id: str, depends_on_step_groups=None, pre_deployment_steps=None, post_deployment_steps=None, **kwargs) -> None:
          super(StepGroup, self).__init__(**kwargs)
          self.name = name
          self.depends_on_step_groups = depends_on_step_groups
          self.pre_deployment_steps = pre_deployment_steps
          self.deployment_target_id = deployment_target_id
          self.post_deployment_steps = post_deployment_steps
  
  
  class StepOperationInfo(Model):
      """Detailed information of a specific step run.
  
      Variables are only populated by the server, and will be ignored when
      sending a request.
  
      :ivar deployment_name: The name of the ARM deployment initiated as part of
       the step.
      :vartype deployment_name: str
      :ivar correlation_id: Unique identifier to track the request for ARM-based
       resources.
      :vartype correlation_id: str
      :ivar start_time: Start time of the action in UTC.
      :vartype start_time: datetime
      :ivar end_time: End time of the action in UTC.
      :vartype end_time: datetime
      :ivar last_updated_time: Last time in UTC this operation was updated.
      :vartype last_updated_time: datetime
      :param error: The errors, if any, for the action.
      :type error: ~azure.mgmt.deploymentmanager.models.CloudErrorBody
      """
  
      _validation = {
          'deployment_name': {'readonly': True},
          'correlation_id': {'readonly': True},
          'start_time': {'readonly': True},
          'end_time': {'readonly': True},
          'last_updated_time': {'readonly': True},
      }
  
      _attribute_map = {
          'deployment_name': {'key': 'deploymentName', 'type': 'str'},
          'correlation_id': {'key': 'correlationId', 'type': 'str'},
          'start_time': {'key': 'startTime', 'type': 'iso-8601'},
          'end_time': {'key': 'endTime', 'type': 'iso-8601'},
          'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'},
          'error': {'key': 'error', 'type': 'CloudErrorBody'},
      }
  
      def __init__(self, *, error=None, **kwargs) -> None:
          super(StepOperationInfo, self).__init__(**kwargs)
          self.deployment_name = None
          self.correlation_id = None
          self.start_time = None
          self.end_time = None
          self.last_updated_time = None
          self.error = error
  
  
  class StepResource(TrackedResource):
      """The resource representation of a rollout step.
  
      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. Ex-
       Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
      :vartype type: str
      :param tags: Resource tags.
      :type tags: dict[str, str]
      :param location: Required. The geo-location where the resource lives
      :type location: str
      :param properties: Required. The properties that define the step.
      :type properties: ~azure.mgmt.deploymentmanager.models.StepProperties
      """
  
      _validation = {
          'id': {'readonly': True},
          'name': {'readonly': True},
          'type': {'readonly': True},
          'location': {'required': True},
          'properties': {'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'},
          'properties': {'key': 'properties', 'type': 'StepProperties'},
      }
  
      def __init__(self, *, location: str, properties, tags=None, **kwargs) -> None:
          super(StepResource, self).__init__(tags=tags, location=location, **kwargs)
          self.properties = properties
  
  
  class WaitStepAttributes(Model):
      """The parameters for the wait step.
  
      All required parameters must be populated in order to send to Azure.
  
      :param duration: Required. The duration in ISO 8601 format of how long the
       wait should be.
      :type duration: str
      """
  
      _validation = {
          'duration': {'required': True},
      }
  
      _attribute_map = {
          'duration': {'key': 'duration', 'type': 'str'},
      }
  
      def __init__(self, *, duration: str, **kwargs) -> None:
          super(WaitStepAttributes, self).__init__(**kwargs)
          self.duration = duration
  
  
  class WaitStepProperties(StepProperties):
      """Defines the properties of a Wait step.
  
      All required parameters must be populated in order to send to Azure.
  
      :param step_type: Required. Constant filled by server.
      :type step_type: str
      :param attributes: Required. The Wait attributes
      :type attributes: ~azure.mgmt.deploymentmanager.models.WaitStepAttributes
      """
  
      _validation = {
          'step_type': {'required': True},
          'attributes': {'required': True},
      }
  
      _attribute_map = {
          'step_type': {'key': 'stepType', 'type': 'str'},
          'attributes': {'key': 'attributes', 'type': 'WaitStepAttributes'},
      }
  
      def __init__(self, *, attributes, **kwargs) -> None:
          super(WaitStepProperties, self).__init__(**kwargs)
          self.attributes = attributes
          self.step_type = 'Wait'
  