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 azure.core.exceptions import HttpResponseError
  import msrest.serialization
  
  
  class AnalyzeDocumentRequest(msrest.serialization.Model):
      """Document analysis parameters.
  
      :param url_source: Document URL to analyze.
      :type url_source: str
      :param base64_source: Base64 encoding of the document to analyze.
      :type base64_source: bytearray
      """
  
      _attribute_map = {
          'url_source': {'key': 'urlSource', 'type': 'str'},
          'base64_source': {'key': 'base64Source', 'type': 'bytearray'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(AnalyzeDocumentRequest, self).__init__(**kwargs)
          self.url_source = kwargs.get('url_source', None)
          self.base64_source = kwargs.get('base64_source', None)
  
  
  class AnalyzeResult(msrest.serialization.Model):
      """Document analysis result.
  
      All required parameters must be populated in order to send to Azure.
  
      :param api_version: Required. API version used to produce this result. Possible values include:
       "2021-09-30-preview".
      :type api_version: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.ApiVersion
      :param model_id: Required. Model ID used to produce this result.
      :type model_id: str
      :param string_index_type: Required. Method used to compute string offset and length. Possible
       values include: "textElements", "unicodeCodePoint", "utf16CodeUnit".
      :type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType
      :param content: Required. Concatenate string representation of all textual and visual elements
       in reading order.
      :type content: str
      :param pages: Required. Analyzed pages.
      :type pages: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentPage]
      :param tables: Extracted tables.
      :type tables: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTable]
      :param key_value_pairs: Extracted key-value pairs.
      :type key_value_pairs:
       list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValuePair]
      :param entities: Extracted entities.
      :type entities: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentEntity]
      :param styles: Extracted font styles.
      :type styles: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentStyle]
      :param documents: Extracted documents.
      :type documents: list[~azure.ai.formrecognizer.v3_0_preview_1.models.Document]
      """
  
      _validation = {
          'api_version': {'required': True},
          'model_id': {'required': True},
          'string_index_type': {'required': True},
          'content': {'required': True},
          'pages': {'required': True},
      }
  
      _attribute_map = {
          'api_version': {'key': 'apiVersion', 'type': 'str'},
          'model_id': {'key': 'modelId', 'type': 'str'},
          'string_index_type': {'key': 'stringIndexType', 'type': 'str'},
          'content': {'key': 'content', 'type': 'str'},
          'pages': {'key': 'pages', 'type': '[DocumentPage]'},
          'tables': {'key': 'tables', 'type': '[DocumentTable]'},
          'key_value_pairs': {'key': 'keyValuePairs', 'type': '[DocumentKeyValuePair]'},
          'entities': {'key': 'entities', 'type': '[DocumentEntity]'},
          'styles': {'key': 'styles', 'type': '[DocumentStyle]'},
          'documents': {'key': 'documents', 'type': '[Document]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(AnalyzeResult, self).__init__(**kwargs)
          self.api_version = kwargs['api_version']
          self.model_id = kwargs['model_id']
          self.string_index_type = kwargs['string_index_type']
          self.content = kwargs['content']
          self.pages = kwargs['pages']
          self.tables = kwargs.get('tables', None)
          self.key_value_pairs = kwargs.get('key_value_pairs', None)
          self.entities = kwargs.get('entities', None)
          self.styles = kwargs.get('styles', None)
          self.documents = kwargs.get('documents', None)
  
  
  class AnalyzeResultOperation(msrest.serialization.Model):
      """Status and result of the analyze operation.
  
      All required parameters must be populated in order to send to Azure.
  
      :param status: Required. Operation status. Possible values include: "notStarted", "running",
       "failed", "succeeded".
      :type status: str or
       ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperationStatus
      :param created_date_time: Required. Date and time (UTC) when the analyze operation was
       submitted.
      :type created_date_time: ~datetime.datetime
      :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated.
      :type last_updated_date_time: ~datetime.datetime
      :param error: Encountered error during document analysis.
      :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error
      :param analyze_result: Document analysis result.
      :type analyze_result: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResult
      """
  
      _validation = {
          'status': {'required': True},
          'created_date_time': {'required': True},
          'last_updated_date_time': {'required': True},
      }
  
      _attribute_map = {
          'status': {'key': 'status', 'type': 'str'},
          'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'},
          'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'},
          'error': {'key': 'error', 'type': 'Error'},
          'analyze_result': {'key': 'analyzeResult', 'type': 'AnalyzeResult'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(AnalyzeResultOperation, self).__init__(**kwargs)
          self.status = kwargs['status']
          self.created_date_time = kwargs['created_date_time']
          self.last_updated_date_time = kwargs['last_updated_date_time']
          self.error = kwargs.get('error', None)
          self.analyze_result = kwargs.get('analyze_result', None)
  
  
  class AuthorizeCopyRequest(msrest.serialization.Model):
      """Request body to authorize model copy.
  
      All required parameters must be populated in order to send to Azure.
  
      :param model_id: Required. Unique model name.
      :type model_id: str
      :param description: Model description.
      :type description: str
      """
  
      _validation = {
          'model_id': {'required': True},
          'description': {'max_length': 4096, 'min_length': 0},
      }
  
      _attribute_map = {
          'model_id': {'key': 'modelId', 'type': 'str'},
          'description': {'key': 'description', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(AuthorizeCopyRequest, self).__init__(**kwargs)
          self.model_id = kwargs['model_id']
          self.description = kwargs.get('description', None)
  
  
  class AzureBlobContentSource(msrest.serialization.Model):
      """Azure Blob Storage content.
  
      All required parameters must be populated in order to send to Azure.
  
      :param container_url: Required. Azure Blob Storage container URL.
      :type container_url: str
      :param prefix: Blob name prefix.
      :type prefix: str
      """
  
      _validation = {
          'container_url': {'required': True},
      }
  
      _attribute_map = {
          'container_url': {'key': 'containerUrl', 'type': 'str'},
          'prefix': {'key': 'prefix', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(AzureBlobContentSource, self).__init__(**kwargs)
          self.container_url = kwargs['container_url']
          self.prefix = kwargs.get('prefix', None)
  
  
  class BoundingRegion(msrest.serialization.Model):
      """Bounding box on a specific page of the input.
  
      All required parameters must be populated in order to send to Azure.
  
      :param page_number: Required. 1-based page number of page containing the bounding region.
      :type page_number: int
      :param bounding_box: Required. Bounding box on the page, or the entire page if not specified.
      :type bounding_box: list[float]
      """
  
      _validation = {
          'page_number': {'required': True, 'minimum': 1},
          'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8},
      }
  
      _attribute_map = {
          'page_number': {'key': 'pageNumber', 'type': 'int'},
          'bounding_box': {'key': 'boundingBox', 'type': '[float]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(BoundingRegion, self).__init__(**kwargs)
          self.page_number = kwargs['page_number']
          self.bounding_box = kwargs['bounding_box']
  
  
  class BuildDocumentModelRequest(msrest.serialization.Model):
      """Request body to build a new custom model.
  
      All required parameters must be populated in order to send to Azure.
  
      :param model_id: Required. Unique model name.
      :type model_id: str
      :param description: Model description.
      :type description: str
      :param azure_blob_source: Azure Blob Storage location containing the training data.
      :type azure_blob_source: ~azure.ai.formrecognizer.v3_0_preview_1.models.AzureBlobContentSource
      """
  
      _validation = {
          'model_id': {'required': True},
          'description': {'max_length': 4096, 'min_length': 0},
      }
  
      _attribute_map = {
          'model_id': {'key': 'modelId', 'type': 'str'},
          'description': {'key': 'description', 'type': 'str'},
          'azure_blob_source': {'key': 'azureBlobSource', 'type': 'AzureBlobContentSource'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(BuildDocumentModelRequest, self).__init__(**kwargs)
          self.model_id = kwargs['model_id']
          self.description = kwargs.get('description', None)
          self.azure_blob_source = kwargs.get('azure_blob_source', None)
  
  
  class ComponentModelInfo(msrest.serialization.Model):
      """A component of a composed model.
  
      All required parameters must be populated in order to send to Azure.
  
      :param model_id: Required. Unique model name.
      :type model_id: str
      """
  
      _validation = {
          'model_id': {'required': True},
      }
  
      _attribute_map = {
          'model_id': {'key': 'modelId', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(ComponentModelInfo, self).__init__(**kwargs)
          self.model_id = kwargs['model_id']
  
  
  class ComposeDocumentModelRequest(msrest.serialization.Model):
      """Request body to create a composed model from component models.
  
      All required parameters must be populated in order to send to Azure.
  
      :param model_id: Required. Unique model name.
      :type model_id: str
      :param description: Model description.
      :type description: str
      :param component_models: Required. List of component models to compose.
      :type component_models: list[~azure.ai.formrecognizer.v3_0_preview_1.models.ComponentModelInfo]
      """
  
      _validation = {
          'model_id': {'required': True},
          'description': {'max_length': 4096, 'min_length': 0},
          'component_models': {'required': True, 'unique': True},
      }
  
      _attribute_map = {
          'model_id': {'key': 'modelId', 'type': 'str'},
          'description': {'key': 'description', 'type': 'str'},
          'component_models': {'key': 'componentModels', 'type': '[ComponentModelInfo]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(ComposeDocumentModelRequest, self).__init__(**kwargs)
          self.model_id = kwargs['model_id']
          self.description = kwargs.get('description', None)
          self.component_models = kwargs['component_models']
  
  
  class CopyAuthorization(msrest.serialization.Model):
      """Authorization to copy a model to the specified target resource and modelId.
  
      All required parameters must be populated in order to send to Azure.
  
      :param target_resource_id: Required. ID of the target Azure resource where the model should be
       copied to.
      :type target_resource_id: str
      :param target_resource_region: Required. Location of the target Azure resource where the model
       should be copied to.
      :type target_resource_region: str
      :param target_model_id: Required. Identifier of the target model.
      :type target_model_id: str
      :param target_model_location: Required. URL of the copied model in the target account.
      :type target_model_location: str
      :param access_token: Required. Token used to authorize the request.
      :type access_token: str
      :param expiration_date_time: Required. Date/time when the access token expires.
      :type expiration_date_time: ~datetime.datetime
      """
  
      _validation = {
          'target_resource_id': {'required': True},
          'target_resource_region': {'required': True},
          'target_model_id': {'required': True},
          'target_model_location': {'required': True},
          'access_token': {'required': True},
          'expiration_date_time': {'required': True},
      }
  
      _attribute_map = {
          'target_resource_id': {'key': 'targetResourceId', 'type': 'str'},
          'target_resource_region': {'key': 'targetResourceRegion', 'type': 'str'},
          'target_model_id': {'key': 'targetModelId', 'type': 'str'},
          'target_model_location': {'key': 'targetModelLocation', 'type': 'str'},
          'access_token': {'key': 'accessToken', 'type': 'str'},
          'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(CopyAuthorization, self).__init__(**kwargs)
          self.target_resource_id = kwargs['target_resource_id']
          self.target_resource_region = kwargs['target_resource_region']
          self.target_model_id = kwargs['target_model_id']
          self.target_model_location = kwargs['target_model_location']
          self.access_token = kwargs['access_token']
          self.expiration_date_time = kwargs['expiration_date_time']
  
  
  class CustomDocumentModelsInfo(msrest.serialization.Model):
      """Info regarding custom document models.
  
      All required parameters must be populated in order to send to Azure.
  
      :param count: Required. Number of custom models in the current resource.
      :type count: int
      :param limit: Required. Maximum number of custom models supported in the current resource.
      :type limit: int
      """
  
      _validation = {
          'count': {'required': True},
          'limit': {'required': True},
      }
  
      _attribute_map = {
          'count': {'key': 'count', 'type': 'int'},
          'limit': {'key': 'limit', 'type': 'int'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(CustomDocumentModelsInfo, self).__init__(**kwargs)
          self.count = kwargs['count']
          self.limit = kwargs['limit']
  
  
  class DocTypeInfo(msrest.serialization.Model):
      """DocTypeInfo.
  
      All required parameters must be populated in order to send to Azure.
  
      :param description: Model description.
      :type description: str
      :param field_schema: Required. Description of the document semantic schema using a JSON Schema
       style syntax.
      :type field_schema: dict[str,
       ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema]
      :param field_confidence: Estimated confidence for each field.
      :type field_confidence: dict[str, float]
      """
  
      _validation = {
          'description': {'max_length': 4096, 'min_length': 0},
          'field_schema': {'required': True},
      }
  
      _attribute_map = {
          'description': {'key': 'description', 'type': 'str'},
          'field_schema': {'key': 'fieldSchema', 'type': '{DocumentFieldSchema}'},
          'field_confidence': {'key': 'fieldConfidence', 'type': '{float}'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocTypeInfo, self).__init__(**kwargs)
          self.description = kwargs.get('description', None)
          self.field_schema = kwargs['field_schema']
          self.field_confidence = kwargs.get('field_confidence', None)
  
  
  class Document(msrest.serialization.Model):
      """An object describing the location and semantic content of a document.
  
      All required parameters must be populated in order to send to Azure.
  
      :param doc_type: Required. Document type.
      :type doc_type: str
      :param bounding_regions: Bounding regions covering the document.
      :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion]
      :param spans: Required. Location of the document in the reading order concatenated content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      :param fields: Required. Dictionary of named field values.
      :type fields: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField]
      :param confidence: Required. Confidence of correctly extracting the document.
      :type confidence: float
      """
  
      _validation = {
          'doc_type': {'required': True, 'max_length': 64, 'min_length': 2},
          'spans': {'required': True},
          'fields': {'required': True},
          'confidence': {'required': True, 'maximum': 1, 'minimum': 0},
      }
  
      _attribute_map = {
          'doc_type': {'key': 'docType', 'type': 'str'},
          'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
          'fields': {'key': 'fields', 'type': '{DocumentField}'},
          'confidence': {'key': 'confidence', 'type': 'float'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(Document, self).__init__(**kwargs)
          self.doc_type = kwargs['doc_type']
          self.bounding_regions = kwargs.get('bounding_regions', None)
          self.spans = kwargs['spans']
          self.fields = kwargs['fields']
          self.confidence = kwargs['confidence']
  
  
  class DocumentEntity(msrest.serialization.Model):
      """An object representing various categories of entities.
  
      All required parameters must be populated in order to send to Azure.
  
      :param category: Required. Entity type.
      :type category: str
      :param sub_category: Entity sub type.
      :type sub_category: str
      :param content: Required. Entity content.
      :type content: str
      :param bounding_regions: Bounding regions covering the entity.
      :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion]
      :param spans: Required. Location of the entity in the reading order concatenated content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      :param confidence: Required. Confidence of correctly extracting the entity.
      :type confidence: float
      """
  
      _validation = {
          'category': {'required': True},
          'content': {'required': True},
          'spans': {'required': True},
          'confidence': {'required': True, 'maximum': 1, 'minimum': 0},
      }
  
      _attribute_map = {
          'category': {'key': 'category', 'type': 'str'},
          'sub_category': {'key': 'subCategory', 'type': 'str'},
          'content': {'key': 'content', 'type': 'str'},
          'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
          'confidence': {'key': 'confidence', 'type': 'float'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentEntity, self).__init__(**kwargs)
          self.category = kwargs['category']
          self.sub_category = kwargs.get('sub_category', None)
          self.content = kwargs['content']
          self.bounding_regions = kwargs.get('bounding_regions', None)
          self.spans = kwargs['spans']
          self.confidence = kwargs['confidence']
  
  
  class DocumentField(msrest.serialization.Model):
      """An object representing the content and location of a field value.
  
      All required parameters must be populated in order to send to Azure.
  
      :param type: Required. Data type of the field value. Possible values include: "string", "date",
       "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "currency",
       "signature", "array", "object".
      :type type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldType
      :param value_string: String value.
      :type value_string: str
      :param value_date: Date value in YYYY-MM-DD format (ISO 8601).
      :type value_date: ~datetime.date
      :param value_time: Time value in hh:mm:ss format (ISO 8601).
      :type value_time: ~datetime.time
      :param value_phone_number: Phone number value in E.164 format (ex. +19876543210).
      :type value_phone_number: str
      :param value_number: Floating point value.
      :type value_number: float
      :param value_integer: Integer value.
      :type value_integer: int
      :param value_selection_mark: Selection mark value. Possible values include: "selected",
       "unselected".
      :type value_selection_mark: str or
       ~azure.ai.formrecognizer.v3_0_preview_1.models.SelectionMarkState
      :param value_signature: Presence of signature. Possible values include: "signed", "unsigned".
      :type value_signature: str or
       ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSignatureType
      :param value_country_region: 3-letter country code value (ISO 3166-1 alpha-3).
      :type value_country_region: str
      :param value_currency: 3-letter currency code value (ISO 4217).
      :type value_currency: str
      :param value_array: Array of field values.
      :type value_array: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField]
      :param value_object: Dictionary of named field values.
      :type value_object: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField]
      :param content: Field content.
      :type content: str
      :param bounding_regions: Bounding regions covering the field.
      :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion]
      :param spans: Location of the field in the reading order concatenated content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      :param confidence: Confidence of correctly extracting the field.
      :type confidence: float
      """
  
      _validation = {
          'type': {'required': True},
          'confidence': {'maximum': 1, 'minimum': 0},
      }
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
          'value_string': {'key': 'valueString', 'type': 'str'},
          'value_date': {'key': 'valueDate', 'type': 'date'},
          'value_time': {'key': 'valueTime', 'type': 'time'},
          'value_phone_number': {'key': 'valuePhoneNumber', 'type': 'str'},
          'value_number': {'key': 'valueNumber', 'type': 'float'},
          'value_integer': {'key': 'valueInteger', 'type': 'int'},
          'value_selection_mark': {'key': 'valueSelectionMark', 'type': 'str'},
          'value_signature': {'key': 'valueSignature', 'type': 'str'},
          'value_country_region': {'key': 'valueCountryRegion', 'type': 'str'},
          'value_currency': {'key': 'valueCurrency', 'type': 'str'},
          'value_array': {'key': 'valueArray', 'type': '[DocumentField]'},
          'value_object': {'key': 'valueObject', 'type': '{DocumentField}'},
          'content': {'key': 'content', 'type': 'str'},
          'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
          'confidence': {'key': 'confidence', 'type': 'float'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentField, self).__init__(**kwargs)
          self.type = kwargs['type']
          self.value_string = kwargs.get('value_string', None)
          self.value_date = kwargs.get('value_date', None)
          self.value_time = kwargs.get('value_time', None)
          self.value_phone_number = kwargs.get('value_phone_number', None)
          self.value_number = kwargs.get('value_number', None)
          self.value_integer = kwargs.get('value_integer', None)
          self.value_selection_mark = kwargs.get('value_selection_mark', None)
          self.value_signature = kwargs.get('value_signature', None)
          self.value_country_region = kwargs.get('value_country_region', None)
          self.value_currency = kwargs.get('value_currency', None)
          self.value_array = kwargs.get('value_array', None)
          self.value_object = kwargs.get('value_object', None)
          self.content = kwargs.get('content', None)
          self.bounding_regions = kwargs.get('bounding_regions', None)
          self.spans = kwargs.get('spans', None)
          self.confidence = kwargs.get('confidence', None)
  
  
  class DocumentFieldSchema(msrest.serialization.Model):
      """Description of the field semantic schema using a JSON Schema style syntax.
  
      :param type: Semantic data type of the field value. Possible values include: "string", "date",
       "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "currency",
       "signature", "array", "object".
      :type type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldType
      :param description: Field description.
      :type description: str
      :param example: Example field content.
      :type example: str
      :param items: Field type schema of each array element.
      :type items: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema
      :param properties: Named sub-fields of the object field.
      :type properties: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema]
      """
  
      _attribute_map = {
          'type': {'key': 'type', 'type': 'str'},
          'description': {'key': 'description', 'type': 'str'},
          'example': {'key': 'example', 'type': 'str'},
          'items': {'key': 'items', 'type': 'DocumentFieldSchema'},
          'properties': {'key': 'properties', 'type': '{DocumentFieldSchema}'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentFieldSchema, self).__init__(**kwargs)
          self.type = kwargs.get('type', None)
          self.description = kwargs.get('description', None)
          self.example = kwargs.get('example', None)
          self.items = kwargs.get('items', None)
          self.properties = kwargs.get('properties', None)
  
  
  class DocumentKeyValueElement(msrest.serialization.Model):
      """An object representing the field key or value in a key-value pair.
  
      All required parameters must be populated in order to send to Azure.
  
      :param content: Required. Concatenated content of the key-value element in reading order.
      :type content: str
      :param bounding_regions: Bounding regions covering the key-value element.
      :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion]
      :param spans: Required. Location of the key-value element in the reading order concatenated
       content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      """
  
      _validation = {
          'content': {'required': True},
          'spans': {'required': True},
      }
  
      _attribute_map = {
          'content': {'key': 'content', 'type': 'str'},
          'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentKeyValueElement, self).__init__(**kwargs)
          self.content = kwargs['content']
          self.bounding_regions = kwargs.get('bounding_regions', None)
          self.spans = kwargs['spans']
  
  
  class DocumentKeyValuePair(msrest.serialization.Model):
      """An object representing a form field with distinct field label (key) and field value (may be empty).
  
      All required parameters must be populated in order to send to Azure.
  
      :param key: Required. Field label of the key-value pair.
      :type key: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValueElement
      :param value: Field value of the key-value pair.
      :type value: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValueElement
      :param confidence: Required. Confidence of correctly extracting the key-value pair.
      :type confidence: float
      """
  
      _validation = {
          'key': {'required': True},
          'confidence': {'required': True, 'maximum': 1, 'minimum': 0},
      }
  
      _attribute_map = {
          'key': {'key': 'key', 'type': 'DocumentKeyValueElement'},
          'value': {'key': 'value', 'type': 'DocumentKeyValueElement'},
          'confidence': {'key': 'confidence', 'type': 'float'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentKeyValuePair, self).__init__(**kwargs)
          self.key = kwargs['key']
          self.value = kwargs.get('value', None)
          self.confidence = kwargs['confidence']
  
  
  class DocumentLine(msrest.serialization.Model):
      """A content line object consisting of an adjacent sequence of content elements, such as words and selection marks.
  
      All required parameters must be populated in order to send to Azure.
  
      :param content: Required. Concatenated content of the contained elements in reading order.
      :type content: str
      :param bounding_box: Bounding box of the line.
      :type bounding_box: list[float]
      :param spans: Required. Location of the line in the reading order concatenated content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      """
  
      _validation = {
          'content': {'required': True},
          'bounding_box': {'max_items': 8, 'min_items': 8},
          'spans': {'required': True},
      }
  
      _attribute_map = {
          'content': {'key': 'content', 'type': 'str'},
          'bounding_box': {'key': 'boundingBox', 'type': '[float]'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentLine, self).__init__(**kwargs)
          self.content = kwargs['content']
          self.bounding_box = kwargs.get('bounding_box', None)
          self.spans = kwargs['spans']
  
  
  class DocumentPage(msrest.serialization.Model):
      """Content and layout elements extracted from a page from the input.
  
      All required parameters must be populated in order to send to Azure.
  
      :param page_number: Required. 1-based page number in the input document.
      :type page_number: int
      :param angle: Required. The general orientation of the content in clockwise direction, measured
       in degrees between (-180, 180].
      :type angle: float
      :param width: Required. The width of the image/PDF in pixels/inches, respectively.
      :type width: float
      :param height: Required. The height of the image/PDF in pixels/inches, respectively.
      :type height: float
      :param unit: Required. The unit used by the width, height, and boundingBox properties. For
       images, the unit is "pixel". For PDF, the unit is "inch". Possible values include: "pixel",
       "inch".
      :type unit: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.LengthUnit
      :param spans: Required. Location of the page in the reading order concatenated content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      :param words: Required. Extracted words from the page.
      :type words: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentWord]
      :param selection_marks: Extracted selection marks from the page.
      :type selection_marks:
       list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSelectionMark]
      :param lines: Required. Extracted lines from the page, potentially containing both textual and
       visual elements.
      :type lines: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentLine]
      """
  
      _validation = {
          'page_number': {'required': True, 'minimum': 1},
          'angle': {'required': True, 'maximum': 180, 'minimum_ex': -180},
          'width': {'required': True, 'minimum': 0},
          'height': {'required': True, 'minimum': 0},
          'unit': {'required': True},
          'spans': {'required': True},
          'words': {'required': True},
          'lines': {'required': True},
      }
  
      _attribute_map = {
          'page_number': {'key': 'pageNumber', 'type': 'int'},
          'angle': {'key': 'angle', 'type': 'float'},
          'width': {'key': 'width', 'type': 'float'},
          'height': {'key': 'height', 'type': 'float'},
          'unit': {'key': 'unit', 'type': 'str'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
          'words': {'key': 'words', 'type': '[DocumentWord]'},
          'selection_marks': {'key': 'selectionMarks', 'type': '[DocumentSelectionMark]'},
          'lines': {'key': 'lines', 'type': '[DocumentLine]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentPage, self).__init__(**kwargs)
          self.page_number = kwargs['page_number']
          self.angle = kwargs['angle']
          self.width = kwargs['width']
          self.height = kwargs['height']
          self.unit = kwargs['unit']
          self.spans = kwargs['spans']
          self.words = kwargs['words']
          self.selection_marks = kwargs.get('selection_marks', None)
          self.lines = kwargs['lines']
  
  
  class DocumentSelectionMark(msrest.serialization.Model):
      """A selection mark object representing check boxes, radio buttons, and other elements indicating a selection.
  
      All required parameters must be populated in order to send to Azure.
  
      :param state: Required. State of the selection mark. Possible values include: "selected",
       "unselected".
      :type state: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.SelectionMarkState
      :param bounding_box: Bounding box of the selection mark.
      :type bounding_box: list[float]
      :param span: Required. Location of the selection mark in the reading order concatenated
       content.
      :type span: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan
      :param confidence: Required. Confidence of correctly extracting the selection mark.
      :type confidence: float
      """
  
      _validation = {
          'state': {'required': True},
          'bounding_box': {'max_items': 8, 'min_items': 8},
          'span': {'required': True},
          'confidence': {'required': True, 'maximum': 1, 'minimum': 0},
      }
  
      _attribute_map = {
          'state': {'key': 'state', 'type': 'str'},
          'bounding_box': {'key': 'boundingBox', 'type': '[float]'},
          'span': {'key': 'span', 'type': 'DocumentSpan'},
          'confidence': {'key': 'confidence', 'type': 'float'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentSelectionMark, self).__init__(**kwargs)
          self.state = kwargs['state']
          self.bounding_box = kwargs.get('bounding_box', None)
          self.span = kwargs['span']
          self.confidence = kwargs['confidence']
  
  
  class DocumentSpan(msrest.serialization.Model):
      """Contiguous region of the concatenated content property, specified as an offset and length.
  
      All required parameters must be populated in order to send to Azure.
  
      :param offset: Required. Zero-based index of the content represented by the span.
      :type offset: int
      :param length: Required. Number of characters in the content represented by the span.
      :type length: int
      """
  
      _validation = {
          'offset': {'required': True, 'minimum': 0},
          'length': {'required': True, 'minimum': 0},
      }
  
      _attribute_map = {
          'offset': {'key': 'offset', 'type': 'int'},
          'length': {'key': 'length', 'type': 'int'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentSpan, self).__init__(**kwargs)
          self.offset = kwargs['offset']
          self.length = kwargs['length']
  
  
  class DocumentStyle(msrest.serialization.Model):
      """An object representing observed text styles.
  
      All required parameters must be populated in order to send to Azure.
  
      :param is_handwritten: Is content handwritten?.
      :type is_handwritten: bool
      :param spans: Required. Location of the text elements in the concatenated content the style
       applies to.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      :param confidence: Required. Confidence of correctly identifying the style.
      :type confidence: float
      """
  
      _validation = {
          'spans': {'required': True},
          'confidence': {'required': True, 'maximum': 1, 'minimum': 0},
      }
  
      _attribute_map = {
          'is_handwritten': {'key': 'isHandwritten', 'type': 'bool'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
          'confidence': {'key': 'confidence', 'type': 'float'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentStyle, self).__init__(**kwargs)
          self.is_handwritten = kwargs.get('is_handwritten', None)
          self.spans = kwargs['spans']
          self.confidence = kwargs['confidence']
  
  
  class DocumentTable(msrest.serialization.Model):
      """A table object consisting table cells arranged in a rectangular layout.
  
      All required parameters must be populated in order to send to Azure.
  
      :param row_count: Required. Number of rows in the table.
      :type row_count: int
      :param column_count: Required. Number of columns in the table.
      :type column_count: int
      :param cells: Required. Cells contained within the table.
      :type cells: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTableCell]
      :param bounding_regions: Bounding regions covering the table.
      :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion]
      :param spans: Required. Location of the table in the reading order concatenated content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      """
  
      _validation = {
          'row_count': {'required': True, 'minimum': 1},
          'column_count': {'required': True, 'minimum': 1},
          'cells': {'required': True},
          'spans': {'required': True},
      }
  
      _attribute_map = {
          'row_count': {'key': 'rowCount', 'type': 'int'},
          'column_count': {'key': 'columnCount', 'type': 'int'},
          'cells': {'key': 'cells', 'type': '[DocumentTableCell]'},
          'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentTable, self).__init__(**kwargs)
          self.row_count = kwargs['row_count']
          self.column_count = kwargs['column_count']
          self.cells = kwargs['cells']
          self.bounding_regions = kwargs.get('bounding_regions', None)
          self.spans = kwargs['spans']
  
  
  class DocumentTableCell(msrest.serialization.Model):
      """An object representing the location and content of a table cell.
  
      All required parameters must be populated in order to send to Azure.
  
      :param kind: Table cell kind. Possible values include: "content", "rowHeader", "columnHeader",
       "stubHead", "description". Default value: "content".
      :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTableCellKind
      :param row_index: Required. Row index of the cell.
      :type row_index: int
      :param column_index: Required. Column index of the cell.
      :type column_index: int
      :param row_span: Number of rows spanned by this cell.
      :type row_span: int
      :param column_span: Number of columns spanned by this cell.
      :type column_span: int
      :param content: Required. Concatenated content of the table cell in reading order.
      :type content: str
      :param bounding_regions: Bounding regions covering the table cell.
      :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion]
      :param spans: Required. Location of the table cell in the reading order concatenated content.
      :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan]
      """
  
      _validation = {
          'row_index': {'required': True},
          'column_index': {'required': True},
          'row_span': {'minimum': 1},
          'column_span': {'minimum': 1},
          'content': {'required': True},
          'spans': {'required': True},
      }
  
      _attribute_map = {
          'kind': {'key': 'kind', 'type': 'str'},
          'row_index': {'key': 'rowIndex', 'type': 'int'},
          'column_index': {'key': 'columnIndex', 'type': 'int'},
          'row_span': {'key': 'rowSpan', 'type': 'int'},
          'column_span': {'key': 'columnSpan', 'type': 'int'},
          'content': {'key': 'content', 'type': 'str'},
          'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'},
          'spans': {'key': 'spans', 'type': '[DocumentSpan]'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentTableCell, self).__init__(**kwargs)
          self.kind = kwargs.get('kind', "content")
          self.row_index = kwargs['row_index']
          self.column_index = kwargs['column_index']
          self.row_span = kwargs.get('row_span', 1)
          self.column_span = kwargs.get('column_span', 1)
          self.content = kwargs['content']
          self.bounding_regions = kwargs.get('bounding_regions', None)
          self.spans = kwargs['spans']
  
  
  class DocumentWord(msrest.serialization.Model):
      """A word object consisting of a contiguous sequence of characters.  For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word.
  
      All required parameters must be populated in order to send to Azure.
  
      :param content: Required. Text content of the word.
      :type content: str
      :param bounding_box: Bounding box of the word.
      :type bounding_box: list[float]
      :param span: Required. Location of the word in the reading order concatenated content.
      :type span: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan
      :param confidence: Required. Confidence of correctly extracting the word.
      :type confidence: float
      """
  
      _validation = {
          'content': {'required': True},
          'bounding_box': {'max_items': 8, 'min_items': 8},
          'span': {'required': True},
          'confidence': {'required': True, 'maximum': 1, 'minimum': 0},
      }
  
      _attribute_map = {
          'content': {'key': 'content', 'type': 'str'},
          'bounding_box': {'key': 'boundingBox', 'type': '[float]'},
          'span': {'key': 'span', 'type': 'DocumentSpan'},
          'confidence': {'key': 'confidence', 'type': 'float'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(DocumentWord, self).__init__(**kwargs)
          self.content = kwargs['content']
          self.bounding_box = kwargs.get('bounding_box', None)
          self.span = kwargs['span']
          self.confidence = kwargs['confidence']
  
  
  class Error(msrest.serialization.Model):
      """Error info.
  
      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.
      :type message: str
      :param target: Target of the error.
      :type target: str
      :param details: List of detailed errors.
      :type details: list[~azure.ai.formrecognizer.v3_0_preview_1.models.Error]
      :param innererror: Detailed error.
      :type innererror: ~azure.ai.formrecognizer.v3_0_preview_1.models.InnerError
      """
  
      _validation = {
          'code': {'required': True},
          'message': {'required': True},
      }
  
      _attribute_map = {
          'code': {'key': 'code', 'type': 'str'},
          'message': {'key': 'message', 'type': 'str'},
          'target': {'key': 'target', 'type': 'str'},
          'details': {'key': 'details', 'type': '[Error]'},
          'innererror': {'key': 'innererror', 'type': 'InnerError'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(Error, self).__init__(**kwargs)
          self.code = kwargs['code']
          self.message = kwargs['message']
          self.target = kwargs.get('target', None)
          self.details = kwargs.get('details', None)
          self.innererror = kwargs.get('innererror', None)
  
  
  class ErrorResponse(msrest.serialization.Model):
      """Error response object.
  
      All required parameters must be populated in order to send to Azure.
  
      :param error: Required. Error info.
      :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error
      """
  
      _validation = {
          'error': {'required': True},
      }
  
      _attribute_map = {
          'error': {'key': 'error', 'type': 'Error'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(ErrorResponse, self).__init__(**kwargs)
          self.error = kwargs['error']
  
  
  class GetInfoResponse(msrest.serialization.Model):
      """General information regarding the current resource.
  
      All required parameters must be populated in order to send to Azure.
  
      :param custom_document_models: Required. Info regarding custom document models.
      :type custom_document_models:
       ~azure.ai.formrecognizer.v3_0_preview_1.models.CustomDocumentModelsInfo
      """
  
      _validation = {
          'custom_document_models': {'required': True},
      }
  
      _attribute_map = {
          'custom_document_models': {'key': 'customDocumentModels', 'type': 'CustomDocumentModelsInfo'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(GetInfoResponse, self).__init__(**kwargs)
          self.custom_document_models = kwargs['custom_document_models']
  
  
  class GetModelsResponse(msrest.serialization.Model):
      """GetModelsResponse.
  
      All required parameters must be populated in order to send to Azure.
  
      :param value: Required. List of models.
      :type value: list[~azure.ai.formrecognizer.v3_0_preview_1.models.ModelSummary]
      :param next_link: Link to the next page of models.
      :type next_link: str
      """
  
      _validation = {
          'value': {'required': True},
      }
  
      _attribute_map = {
          'value': {'key': 'value', 'type': '[ModelSummary]'},
          'next_link': {'key': 'nextLink', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(GetModelsResponse, self).__init__(**kwargs)
          self.value = kwargs['value']
          self.next_link = kwargs.get('next_link', None)
  
  
  class OperationInfo(msrest.serialization.Model):
      """Operation info.
  
      All required parameters must be populated in order to send to Azure.
  
      :param operation_id: Required. Operation ID.
      :type operation_id: str
      :param status: Required. Operation status. Possible values include: "notStarted", "running",
       "failed", "succeeded", "canceled".
      :type status: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationStatus
      :param percent_completed: Operation progress (0-100).
      :type percent_completed: int
      :param created_date_time: Required. Date and time (UTC) when the operation was created.
      :type created_date_time: ~datetime.datetime
      :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated.
      :type last_updated_date_time: ~datetime.datetime
      :param kind: Type of operation. Possible values include: "documentModelBuild",
       "documentModelCompose", "documentModelCopyTo".
      :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationKind
      :param resource_location: Required. URL of the resource targeted by this operation.
      :type resource_location: str
      """
  
      _validation = {
          'operation_id': {'required': True},
          'status': {'required': True},
          'percent_completed': {'maximum': 100, 'minimum': 0},
          'created_date_time': {'required': True},
          'last_updated_date_time': {'required': True},
          'resource_location': {'required': True},
      }
  
      _attribute_map = {
          'operation_id': {'key': 'operationId', 'type': 'str'},
          'status': {'key': 'status', 'type': 'str'},
          'percent_completed': {'key': 'percentCompleted', 'type': 'int'},
          'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'},
          'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'},
          'kind': {'key': 'kind', 'type': 'str'},
          'resource_location': {'key': 'resourceLocation', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(OperationInfo, self).__init__(**kwargs)
          self.operation_id = kwargs['operation_id']
          self.status = kwargs['status']
          self.percent_completed = kwargs.get('percent_completed', None)
          self.created_date_time = kwargs['created_date_time']
          self.last_updated_date_time = kwargs['last_updated_date_time']
          self.kind = kwargs.get('kind', None)
          self.resource_location = kwargs['resource_location']
  
  
  class GetOperationResponse(OperationInfo):
      """Get Operation response object.
  
      All required parameters must be populated in order to send to Azure.
  
      :param operation_id: Required. Operation ID.
      :type operation_id: str
      :param status: Required. Operation status. Possible values include: "notStarted", "running",
       "failed", "succeeded", "canceled".
      :type status: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationStatus
      :param percent_completed: Operation progress (0-100).
      :type percent_completed: int
      :param created_date_time: Required. Date and time (UTC) when the operation was created.
      :type created_date_time: ~datetime.datetime
      :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated.
      :type last_updated_date_time: ~datetime.datetime
      :param kind: Type of operation. Possible values include: "documentModelBuild",
       "documentModelCompose", "documentModelCopyTo".
      :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationKind
      :param resource_location: Required. URL of the resource targeted by this operation.
      :type resource_location: str
      :param error: Encountered error.
      :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error
      :param result: Operation result upon success.
      :type result: any
      """
  
      _validation = {
          'operation_id': {'required': True},
          'status': {'required': True},
          'percent_completed': {'maximum': 100, 'minimum': 0},
          'created_date_time': {'required': True},
          'last_updated_date_time': {'required': True},
          'resource_location': {'required': True},
      }
  
      _attribute_map = {
          'operation_id': {'key': 'operationId', 'type': 'str'},
          'status': {'key': 'status', 'type': 'str'},
          'percent_completed': {'key': 'percentCompleted', 'type': 'int'},
          'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'},
          'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'},
          'kind': {'key': 'kind', 'type': 'str'},
          'resource_location': {'key': 'resourceLocation', 'type': 'str'},
          'error': {'key': 'error', 'type': 'Error'},
          'result': {'key': 'result', 'type': 'object'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(GetOperationResponse, self).__init__(**kwargs)
          self.error = kwargs.get('error', None)
          self.result = kwargs.get('result', None)
  
  
  class GetOperationsResponse(msrest.serialization.Model):
      """List Operations response object.
  
      All required parameters must be populated in order to send to Azure.
  
      :param value: Required. List of operations.
      :type value: list[~azure.ai.formrecognizer.v3_0_preview_1.models.OperationInfo]
      :param next_link: Link to the next page of operations.
      :type next_link: str
      """
  
      _validation = {
          'value': {'required': True},
      }
  
      _attribute_map = {
          'value': {'key': 'value', 'type': '[OperationInfo]'},
          'next_link': {'key': 'nextLink', 'type': 'str'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(GetOperationsResponse, self).__init__(**kwargs)
          self.value = kwargs['value']
          self.next_link = kwargs.get('next_link', None)
  
  
  class InnerError(msrest.serialization.Model):
      """Detailed error.
  
      All required parameters must be populated in order to send to Azure.
  
      :param code: Required. Error code.
      :type code: str
      :param message: Error message.
      :type message: str
      :param innererror: Detailed error.
      :type innererror: ~azure.ai.formrecognizer.v3_0_preview_1.models.InnerError
      """
  
      _validation = {
          'code': {'required': True},
      }
  
      _attribute_map = {
          'code': {'key': 'code', 'type': 'str'},
          'message': {'key': 'message', 'type': 'str'},
          'innererror': {'key': 'innererror', 'type': 'InnerError'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(InnerError, self).__init__(**kwargs)
          self.code = kwargs['code']
          self.message = kwargs.get('message', None)
          self.innererror = kwargs.get('innererror', None)
  
  
  class ModelSummary(msrest.serialization.Model):
      """Model summary.
  
      All required parameters must be populated in order to send to Azure.
  
      :param model_id: Required. Unique model name.
      :type model_id: str
      :param description: Model description.
      :type description: str
      :param created_date_time: Required. Date and time (UTC) when the model was created.
      :type created_date_time: ~datetime.datetime
      """
  
      _validation = {
          'model_id': {'required': True},
          'description': {'max_length': 4096, 'min_length': 0},
          'created_date_time': {'required': True},
      }
  
      _attribute_map = {
          'model_id': {'key': 'modelId', 'type': 'str'},
          'description': {'key': 'description', 'type': 'str'},
          'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(ModelSummary, self).__init__(**kwargs)
          self.model_id = kwargs['model_id']
          self.description = kwargs.get('description', None)
          self.created_date_time = kwargs['created_date_time']
  
  
  class ModelInfo(ModelSummary):
      """Model info.
  
      All required parameters must be populated in order to send to Azure.
  
      :param model_id: Required. Unique model name.
      :type model_id: str
      :param description: Model description.
      :type description: str
      :param created_date_time: Required. Date and time (UTC) when the model was created.
      :type created_date_time: ~datetime.datetime
      :param doc_types: Supported document types.
      :type doc_types: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocTypeInfo]
      """
  
      _validation = {
          'model_id': {'required': True},
          'description': {'max_length': 4096, 'min_length': 0},
          'created_date_time': {'required': True},
      }
  
      _attribute_map = {
          'model_id': {'key': 'modelId', 'type': 'str'},
          'description': {'key': 'description', 'type': 'str'},
          'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'},
          'doc_types': {'key': 'docTypes', 'type': '{DocTypeInfo}'},
      }
  
      def __init__(
          self,
          **kwargs
      ):
          super(ModelInfo, self).__init__(**kwargs)
          self.doc_types = kwargs.get('doc_types', None)
  