text: # generated by datamodel-codegen:
  #   filename:  openapi.yaml
  #   timestamp: 2021-12-31T02:46:52+00:00
  
  from __future__ import annotations
  
  from datetime import datetime
  from enum import Enum
  from typing import Annotated, Any, List, Optional
  
  from pydantic import BaseModel, Field, SecretStr
  
  
  class InvalidRequestException(BaseModel):
      __root__: Any
  
  
  class TextSizeLimitExceededException(InvalidRequestException):
      pass
  
  
  class BatchSizeLimitExceededException(InvalidRequestException):
      pass
  
  
  class InternalServerException(InvalidRequestException):
      pass
  
  
  class UnsupportedLanguageException(InvalidRequestException):
      pass
  
  
  class ResourceUnavailableException(InvalidRequestException):
      pass
  
  
  class ResourceInUseException(InvalidRequestException):
      pass
  
  
  class TooManyTagsException(InvalidRequestException):
      pass
  
  
  class TooManyRequestsException(InvalidRequestException):
      pass
  
  
  class ResourceLimitExceededException(InvalidRequestException):
      pass
  
  
  class KmsKeyValidationException(InvalidRequestException):
      pass
  
  
  class ResourceNotFoundException(InvalidRequestException):
      pass
  
  
  class DeleteDocumentClassifierResponse(BaseModel):
      pass
  
  
  class DeleteEndpointResponse(DeleteDocumentClassifierResponse):
      pass
  
  
  class DeleteEntityRecognizerResponse(DeleteDocumentClassifierResponse):
      pass
  
  
  class JobNotFoundException(InvalidRequestException):
      pass
  
  
  class InvalidFilterException(InvalidRequestException):
      pass
  
  
  class StopTrainingDocumentClassifierResponse(DeleteDocumentClassifierResponse):
      pass
  
  
  class StopTrainingEntityRecognizerResponse(DeleteDocumentClassifierResponse):
      pass
  
  
  class TagResourceResponse(DeleteDocumentClassifierResponse):
      pass
  
  
  class ConcurrentModificationException(InvalidRequestException):
      pass
  
  
  class UntagResourceResponse(DeleteDocumentClassifierResponse):
      pass
  
  
  class TooManyTagKeysException(InvalidRequestException):
      pass
  
  
  class UpdateEndpointResponse(DeleteDocumentClassifierResponse):
      pass
  
  
  class AnyLengthString(BaseModel):
      __root__: str
  
  
  class AttributeNamesListItem(BaseModel):
      __root__: Annotated[
          str, Field(max_length=63, min_length=1, regex='^[a-zA-Z0-9](-*[a-zA-Z0-9])*')
      ]
  
  
  class AttributeNamesList(BaseModel):
      __root__: List[AttributeNamesListItem]
  
  
  class AugmentedManifestsDocumentTypeFormat(Enum):
      PLAIN_TEXT_DOCUMENT = 'PLAIN_TEXT_DOCUMENT'
      SEMI_STRUCTURED_DOCUMENT = 'SEMI_STRUCTURED_DOCUMENT'
  
  
  class S3Uri(BaseModel):
      __root__: Annotated[
          str,
          Field(max_length=1024, regex='s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?'),
      ]
  
  
  class AugmentedManifestsListItem(BaseModel):
      """
      An augmented manifest file that provides training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.
      """
  
      S3Uri: S3Uri
      AttributeNames: AttributeNamesList
      AnnotationDataS3Uri: Optional[S3Uri] = None
      SourceDocumentsS3Uri: Optional[S3Uri] = None
      DocumentType: Optional[AugmentedManifestsDocumentTypeFormat] = None
  
  
  class Integer(BaseModel):
      __root__: int
  
  
  class LanguageCode(Enum):
      en = 'en'
      es = 'es'
      fr = 'fr'
      de = 'de'
      it = 'it'
      pt = 'pt'
      ar = 'ar'
      hi = 'hi'
      ja = 'ja'
      ko = 'ko'
      zh = 'zh'
      zh_TW = 'zh-TW'
  
  
  class SentimentType(Enum):
      POSITIVE = 'POSITIVE'
      NEGATIVE = 'NEGATIVE'
      NEUTRAL = 'NEUTRAL'
      MIXED = 'MIXED'
  
  
  class SyntaxLanguageCode(Enum):
      en = 'en'
      es = 'es'
      fr = 'fr'
      de = 'de'
      it = 'it'
      pt = 'pt'
  
  
  class String(BaseModel):
      __root__: Annotated[str, Field(min_length=1)]
  
  
  class BatchItemError(BaseModel):
      """
      Describes an error that occurred while processing a document in a batch. The operation returns on <code>BatchItemError</code> object for each document that contained an error.
      """
  
      Index: Optional[Integer] = None
      ErrorCode: Optional[String] = None
      ErrorMessage: Optional[String] = None
  
  
  class Double(BaseModel):
      __root__: float
  
  
  class ClassifierEvaluationMetrics(BaseModel):
      """
      Describes the result metrics for the test data associated with an documentation classifier.
      """
  
      Accuracy: Optional[Double] = None
      Precision: Optional[Double] = None
      Recall: Optional[Double] = None
      F1Score: Optional[Double] = None
      MicroPrecision: Optional[Double] = None
      MicroRecall: Optional[Double] = None
      MicroF1Score: Optional[Double] = None
      HammingLoss: Optional[Double] = None
  
  
  class ClassifierMetadata(BaseModel):
      """
      Provides information about a document classifier.
      """
  
      NumberOfLabels: Optional[Integer] = None
      NumberOfTrainedDocuments: Optional[Integer] = None
      NumberOfTestDocuments: Optional[Integer] = None
      EvaluationMetrics: Optional[ClassifierEvaluationMetrics] = None
  
  
  class CustomerInputString(BaseModel):
      __root__: Annotated[SecretStr, Field(min_length=1)]
  
  
  class DocumentClassifierEndpointArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256,
              regex='arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier-endpoint/[a-zA-Z0-9](-*[a-zA-Z0-9])*',
          ),
      ]
  
  
  class ClientRequestTokenString(BaseModel):
      __root__: Annotated[
          str, Field(max_length=64, min_length=1, regex='^[a-zA-Z0-9-]+$')
      ]
  
  
  class ComprehendArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256,
              regex='arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-*[a-zA-Z0-9])*',
          ),
      ]
  
  
  class ComprehendArnName(BaseModel):
      __root__: Annotated[
          str, Field(max_length=63, regex='^[a-zA-Z0-9](-*[a-zA-Z0-9])*$')
      ]
  
  
  class ComprehendEndpointArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256,
              regex='arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier-endpoint|entity-recognizer-endpoint)/[a-zA-Z0-9](-*[a-zA-Z0-9])*',
          ),
      ]
  
  
  class ComprehendEndpointName(BaseModel):
      __root__: Annotated[
          str, Field(max_length=40, regex='^[a-zA-Z0-9](-*[a-zA-Z0-9])*$')
      ]
  
  
  class ComprehendModelArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256,
              regex='arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*',
          ),
      ]
  
  
  class IamRoleArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=2048,
              min_length=20,
              regex='arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+',
          ),
      ]
  
  
  class KmsKeyId(BaseModel):
      __root__: Annotated[str, Field(max_length=2048, regex='.*')]
  
  
  class DocumentClassifierMode(Enum):
      MULTI_CLASS = 'MULTI_CLASS'
      MULTI_LABEL = 'MULTI_LABEL'
  
  
  class DocumentClassifierArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256,
              regex='arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?',
          ),
      ]
  
  
  class InferenceUnitsInteger(BaseModel):
      __root__: Annotated[int, Field(ge=1.0)]
  
  
  class EntityRecognizerArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256,
              regex='arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?',
          ),
      ]
  
  
  class JobId(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=32, min_length=1, regex='^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$'
          ),
      ]
  
  
  class EntityRecognizerEndpointArn(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256,
              regex='arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer-endpoint/[a-zA-Z0-9](-*[a-zA-Z0-9])*',
          ),
      ]
  
  
  class Float(Double):
      pass
  
  
  class DocumentClass(BaseModel):
      """
      Specifies the class that categorizes the document being analyzed
      """
  
      Name: Optional[String] = None
      Score: Optional[Float] = None
  
  
  class JobName(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=256, min_length=1, regex='^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$'
          ),
      ]
  
  
  class JobStatus(Enum):
      SUBMITTED = 'SUBMITTED'
      IN_PROGRESS = 'IN_PROGRESS'
      COMPLETED = 'COMPLETED'
      FAILED = 'FAILED'
      STOP_REQUESTED = 'STOP_REQUESTED'
      STOPPED = 'STOPPED'
  
  
  class Timestamp(BaseModel):
      __root__: datetime
  
  
  class DocumentClassificationJobFilter(BaseModel):
      """
      Provides information for filtering a list of document classification jobs. For more information, see the operation. You can provide only one filter parameter in each request.
      """
  
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      SubmitTimeBefore: Optional[Timestamp] = None
      SubmitTimeAfter: Optional[Timestamp] = None
  
  
  class OutputDataConfig(BaseModel):
      """
      <p>Provides configuration parameters for the output of topic detection jobs.</p> <p/>
      """
  
      S3Uri: S3Uri
      KmsKeyId: Optional[KmsKeyId] = None
  
  
  class DocumentClassifierAugmentedManifestsList(BaseModel):
      __root__: List[AugmentedManifestsListItem]
  
  
  class DocumentClassifierDataFormat(Enum):
      COMPREHEND_CSV = 'COMPREHEND_CSV'
      AUGMENTED_MANIFEST = 'AUGMENTED_MANIFEST'
  
  
  class ModelStatus(Enum):
      SUBMITTED = 'SUBMITTED'
      TRAINING = 'TRAINING'
      DELETING = 'DELETING'
      STOP_REQUESTED = 'STOP_REQUESTED'
      STOPPED = 'STOPPED'
      IN_ERROR = 'IN_ERROR'
      TRAINED = 'TRAINED'
  
  
  class DocumentClassifierFilter(BaseModel):
      """
      Provides information for filtering a list of document classifiers. You can only specify one filtering parameter in a request. For more information, see the operation.
      """
  
      Status: Optional[ModelStatus] = None
      SubmitTimeBefore: Optional[Timestamp] = None
      SubmitTimeAfter: Optional[Timestamp] = None
  
  
  class LabelDelimiter(BaseModel):
      __root__: Annotated[
          str, Field(max_length=1, min_length=1, regex='^[ ~!@#$%^*\\-_+=|\\\\:;\\t>?/]$')
      ]
  
  
  class DocumentLabel(DocumentClass):
      """
      Specifies one of the label or labels that categorize the document being analyzed.
      """
  
      pass
  
  
  class DocumentReadAction(Enum):
      TEXTRACT_DETECT_DOCUMENT_TEXT = 'TEXTRACT_DETECT_DOCUMENT_TEXT'
      TEXTRACT_ANALYZE_DOCUMENT = 'TEXTRACT_ANALYZE_DOCUMENT'
  
  
  class DocumentReadFeatureTypes(Enum):
      """
      <p>A list of the types of analyses to perform. This field specifies what feature types need to be extracted from the document where entity recognition is expected.</p> <ul> <li> <p> <code>TABLES</code> - Add TABLES to the list to return information about the tables that are detected in the input document. </p> </li> <li> <p> <code>FORMS</code> - Add FORMS to return detected form data. </p> </li> </ul>
      """
  
      TABLES = 'TABLES'
      FORMS = 'FORMS'
  
  
  class DocumentReadMode(Enum):
      SERVICE_DEFAULT = 'SERVICE_DEFAULT'
      FORCE_DOCUMENT_READ_ACTION = 'FORCE_DOCUMENT_READ_ACTION'
  
  
  class ListOfDocumentReadFeatureTypes(BaseModel):
      __root__: Annotated[List[DocumentReadFeatureTypes], Field(max_items=2, min_items=1)]
  
  
  class DocumentReaderConfig(BaseModel):
      """
      The input properties for a topic detection job.
      """
  
      DocumentReadAction: DocumentReadAction
      DocumentReadMode: Optional[DocumentReadMode] = None
      FeatureTypes: Optional[ListOfDocumentReadFeatureTypes] = None
  
  
  class DominantLanguage(BaseModel):
      """
      Returns the code for the dominant language in the input text and the level of confidence that Amazon Comprehend has in the accuracy of the detection.
      """
  
      LanguageCode: Optional[String] = None
      Score: Optional[Float] = None
  
  
  class DominantLanguageDetectionJobFilter(DocumentClassificationJobFilter):
      """
      Provides information for filtering a list of dominant language detection jobs. For more information, see the operation.
      """
  
      pass
  
  
  class EndpointStatus(Enum):
      CREATING = 'CREATING'
      DELETING = 'DELETING'
      FAILED = 'FAILED'
      IN_SERVICE = 'IN_SERVICE'
      UPDATING = 'UPDATING'
  
  
  class EndpointFilter(BaseModel):
      """
      The filter used to determine which endpoints are returned. You can filter jobs on their name, model, status, or the date and time that they were created. You can only set one filter at a time.
      """
  
      ModelArn: Optional[ComprehendModelArn] = None
      Status: Optional[EndpointStatus] = None
      CreationTimeBefore: Optional[Timestamp] = None
      CreationTimeAfter: Optional[Timestamp] = None
  
  
  class EntitiesDetectionJobFilter(DocumentClassificationJobFilter):
      """
      Provides information for filtering a list of dominant language detection jobs. For more information, see the operation.
      """
  
      pass
  
  
  class EntityType(Enum):
      PERSON = 'PERSON'
      LOCATION = 'LOCATION'
      ORGANIZATION = 'ORGANIZATION'
      COMMERCIAL_ITEM = 'COMMERCIAL_ITEM'
      EVENT = 'EVENT'
      DATE = 'DATE'
      QUANTITY = 'QUANTITY'
      TITLE = 'TITLE'
      OTHER = 'OTHER'
  
  
  class Entity(BaseModel):
      """
      <p>Provides information about an entity. </p> <p> </p>
      """
  
      Score: Optional[Float] = None
      Type: Optional[EntityType] = None
      Text: Optional[String] = None
      BeginOffset: Optional[Integer] = None
      EndOffset: Optional[Integer] = None
  
  
  class PiiEntityType(Enum):
      BANK_ACCOUNT_NUMBER = 'BANK_ACCOUNT_NUMBER'
      BANK_ROUTING = 'BANK_ROUTING'
      CREDIT_DEBIT_NUMBER = 'CREDIT_DEBIT_NUMBER'
      CREDIT_DEBIT_CVV = 'CREDIT_DEBIT_CVV'
      CREDIT_DEBIT_EXPIRY = 'CREDIT_DEBIT_EXPIRY'
      PIN = 'PIN'
      EMAIL = 'EMAIL'
      ADDRESS = 'ADDRESS'
      NAME = 'NAME'
      PHONE = 'PHONE'
      SSN = 'SSN'
      DATE_TIME = 'DATE_TIME'
      PASSPORT_NUMBER = 'PASSPORT_NUMBER'
      DRIVER_ID = 'DRIVER_ID'
      URL = 'URL'
      AGE = 'AGE'
      USERNAME = 'USERNAME'
      PASSWORD = 'PASSWORD'
      AWS_ACCESS_KEY = 'AWS_ACCESS_KEY'
      AWS_SECRET_KEY = 'AWS_SECRET_KEY'
      IP_ADDRESS = 'IP_ADDRESS'
      MAC_ADDRESS = 'MAC_ADDRESS'
      ALL = 'ALL'
  
  
  class EntityLabel(BaseModel):
      """
      Specifies one of the label or labels that categorize the personally identifiable information (PII) entity being analyzed.
      """
  
      Name: Optional[PiiEntityType] = None
      Score: Optional[Float] = None
  
  
  class EntityRecognizerAnnotations(BaseModel):
      """
      Describes the annotations associated with a entity recognizer.
      """
  
      S3Uri: S3Uri
  
  
  class EntityRecognizerAugmentedManifestsList(DocumentClassifierAugmentedManifestsList):
      pass
  
  
  class EntityRecognizerDocuments(EntityRecognizerAnnotations):
      """
      Describes the training documents submitted with an entity recognizer.
      """
  
      pass
  
  
  class EntityRecognizerEntityList(EntityRecognizerAnnotations):
      """
      Describes the entity recognizer submitted with an entity recognizer.
      """
  
      pass
  
  
  class EntityRecognizerEvaluationMetrics(BaseModel):
      """
      Detailed information about the accuracy of an entity recognizer.
      """
  
      Precision: Optional[Double] = None
      Recall: Optional[Double] = None
      F1Score: Optional[Double] = None
  
  
  class EntityRecognizerFilter(DocumentClassifierFilter):
      """
      Provides information for filtering a list of entity recognizers. You can only specify one filtering parameter in a request. For more information, see the operation./&gt;
      """
  
      pass
  
  
  class EntityTypesEvaluationMetrics(EntityRecognizerEvaluationMetrics):
      """
      Detailed information about the accuracy of an entity recognizer for a specific entity type.
      """
  
      pass
  
  
  class EntityTypeName(BaseModel):
      __root__: Annotated[
          str, Field(max_length=64, regex='^(?:(?!\\\\n+|\\\\t+|\\\\r+|[\\r\\t\\n,]).)+$')
      ]
  
  
  class EntityTypesListItem(BaseModel):
      """
      An entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer.
      """
  
      Type: EntityTypeName
  
  
  class EventTypeString(BaseModel):
      __root__: Annotated[str, Field(max_length=40, min_length=1, regex='[A-Z_]*')]
  
  
  class EventsDetectionJobFilter(DocumentClassificationJobFilter):
      """
      Provides information for filtering a list of event detection jobs.
      """
  
      pass
  
  
  class TargetEventTypes(BaseModel):
      __root__: Annotated[List[EventTypeString], Field(min_items=1)]
  
  
  class InputFormat(Enum):
      ONE_DOC_PER_FILE = 'ONE_DOC_PER_FILE'
      ONE_DOC_PER_LINE = 'ONE_DOC_PER_LINE'
  
  
  class KeyPhrase(BaseModel):
      """
      Describes a key noun phrase.
      """
  
      Score: Optional[Float] = None
      Text: Optional[String] = None
      BeginOffset: Optional[Integer] = None
      EndOffset: Optional[Integer] = None
  
  
  class KeyPhrasesDetectionJobFilter(DocumentClassificationJobFilter):
      """
      Provides information for filtering a list of dominant language detection jobs. For more information, see the operation.
      """
  
      pass
  
  
  class MaxResultsInteger(BaseModel):
      __root__: Annotated[int, Field(ge=1.0, le=500.0)]
  
  
  class PiiEntity(BaseModel):
      """
      Provides information about a PII entity.
      """
  
      Score: Optional[Float] = None
      Type: Optional[PiiEntityType] = None
      BeginOffset: Optional[Integer] = None
      EndOffset: Optional[Integer] = None
  
  
  class ListOfPiiEntityTypes(BaseModel):
      __root__: List[PiiEntityType]
  
  
  class PiiEntitiesDetectionJobFilter(DocumentClassificationJobFilter):
      """
      Provides information for filtering a list of PII entity detection jobs.
      """
  
      pass
  
  
  class SentimentDetectionJobFilter(DocumentClassificationJobFilter):
      """
      Provides information for filtering a list of dominant language detection jobs. For more information, see the operation.
      """
  
      pass
  
  
  class TopicsDetectionJobFilter(DocumentClassificationJobFilter):
      """
      Provides information for filtering topic detection jobs. For more information, see .
      """
  
      pass
  
  
  class MaskCharacter(BaseModel):
      __root__: Annotated[str, Field(max_length=1, min_length=1, regex='[!@#$%&*]')]
  
  
  class NumberOfTopicsInteger(BaseModel):
      __root__: Annotated[int, Field(ge=1.0, le=100.0)]
  
  
  class PartOfSpeechTagType(Enum):
      ADJ = 'ADJ'
      ADP = 'ADP'
      ADV = 'ADV'
      AUX = 'AUX'
      CONJ = 'CONJ'
      CCONJ = 'CCONJ'
      DET = 'DET'
      INTJ = 'INTJ'
      NOUN = 'NOUN'
      NUM = 'NUM'
      O = 'O'
      PART = 'PART'
      PRON = 'PRON'
      PROPN = 'PROPN'
      PUNCT = 'PUNCT'
      SCONJ = 'SCONJ'
      SYM = 'SYM'
      VERB = 'VERB'
  
  
  class PartOfSpeechTag(BaseModel):
      """
      Identifies the part of speech represented by the token and gives the confidence that Amazon Comprehend has that the part of speech was correctly identified. For more information about the parts of speech that Amazon Comprehend can identify, see <a>how-syntax</a>.
      """
  
      Tag: Optional[PartOfSpeechTagType] = None
      Score: Optional[Float] = None
  
  
  class PiiOutputDataConfig(OutputDataConfig):
      """
      Provides configuration parameters for the output of PII entity detection jobs.
      """
  
      pass
  
  
  class PiiEntitiesDetectionMode(Enum):
      ONLY_REDACTION = 'ONLY_REDACTION'
      ONLY_OFFSETS = 'ONLY_OFFSETS'
  
  
  class PiiEntitiesDetectionMaskMode(Enum):
      MASK = 'MASK'
      REPLACE_WITH_PII_ENTITY_TYPE = 'REPLACE_WITH_PII_ENTITY_TYPE'
  
  
  class SecurityGroupId(BaseModel):
      __root__: Annotated[str, Field(max_length=32, min_length=1, regex='[-0-9a-zA-Z]+')]
  
  
  class SecurityGroupIds(BaseModel):
      __root__: Annotated[List[SecurityGroupId], Field(max_items=5, min_items=1)]
  
  
  class SubnetId(SecurityGroupId):
      pass
  
  
  class Subnets(BaseModel):
      __root__: Annotated[List[SubnetId], Field(max_items=16, min_items=1)]
  
  
  class TagKey(BaseModel):
      __root__: Annotated[str, Field(max_length=128, min_length=1)]
  
  
  class TagValue(BaseModel):
      __root__: Annotated[str, Field(max_length=256, min_length=0)]
  
  
  class Tag(BaseModel):
      """
      A key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with the key-value pair ‘Department’:’Sales’ might be added to a resource to indicate its use by a particular department.
      """
  
      Key: TagKey
      Value: Optional[TagValue] = None
  
  
  class TagKeyList(BaseModel):
      __root__: List[TagKey]
  
  
  class ClassifyDocumentRequest(BaseModel):
      Text: CustomerInputString
      EndpointArn: DocumentClassifierEndpointArn
  
  
  class ContainsPiiEntitiesRequest(BaseModel):
      Text: String
      LanguageCode: LanguageCode
  
  
  class CreateDocumentClassifierResponse(BaseModel):
      DocumentClassifierArn: Optional[DocumentClassifierArn] = None
  
  
  class CreateEndpointResponse(BaseModel):
      EndpointArn: Optional[ComprehendEndpointArn] = None
  
  
  class CreateEntityRecognizerResponse(BaseModel):
      EntityRecognizerArn: Optional[EntityRecognizerArn] = None
  
  
  class DeleteDocumentClassifierRequest(BaseModel):
      DocumentClassifierArn: DocumentClassifierArn
  
  
  class DeleteEndpointRequest(BaseModel):
      EndpointArn: ComprehendEndpointArn
  
  
  class DeleteEntityRecognizerRequest(BaseModel):
      EntityRecognizerArn: EntityRecognizerArn
  
  
  class DescribeDocumentClassificationJobRequest(BaseModel):
      JobId: JobId
  
  
  class DescribeDocumentClassifierRequest(BaseModel):
      DocumentClassifierArn: DocumentClassifierArn
  
  
  class DescribeDominantLanguageDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class DescribeEndpointRequest(BaseModel):
      EndpointArn: ComprehendEndpointArn
  
  
  class DescribeEntitiesDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class DescribeEntityRecognizerRequest(BaseModel):
      EntityRecognizerArn: EntityRecognizerArn
  
  
  class DescribeEventsDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class DescribeKeyPhrasesDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class DescribePiiEntitiesDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class DescribeSentimentDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class DescribeTopicsDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class DetectDominantLanguageRequest(BaseModel):
      Text: CustomerInputString
  
  
  class DetectEntitiesRequest(BaseModel):
      Text: CustomerInputString
      LanguageCode: Optional[LanguageCode] = None
      EndpointArn: Optional[EntityRecognizerEndpointArn] = None
  
  
  class DetectKeyPhrasesRequest(BaseModel):
      Text: CustomerInputString
      LanguageCode: LanguageCode
  
  
  class DetectPiiEntitiesRequest(BaseModel):
      Text: String
      LanguageCode: LanguageCode
  
  
  class DetectSentimentRequest(BaseModel):
      Text: CustomerInputString
      LanguageCode: LanguageCode
  
  
  class DetectSyntaxRequest(BaseModel):
      Text: CustomerInputString
      LanguageCode: SyntaxLanguageCode
  
  
  class ListDocumentClassificationJobsRequest(BaseModel):
      Filter: Optional[DocumentClassificationJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListDocumentClassifiersRequest(BaseModel):
      Filter: Optional[DocumentClassifierFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListDominantLanguageDetectionJobsRequest(BaseModel):
      Filter: Optional[DominantLanguageDetectionJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListEndpointsRequest(BaseModel):
      Filter: Optional[EndpointFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListEntitiesDetectionJobsRequest(BaseModel):
      Filter: Optional[EntitiesDetectionJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListEntityRecognizersRequest(BaseModel):
      Filter: Optional[EntityRecognizerFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListEventsDetectionJobsRequest(BaseModel):
      Filter: Optional[EventsDetectionJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListKeyPhrasesDetectionJobsRequest(BaseModel):
      Filter: Optional[KeyPhrasesDetectionJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListPiiEntitiesDetectionJobsRequest(BaseModel):
      Filter: Optional[PiiEntitiesDetectionJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListSentimentDetectionJobsRequest(BaseModel):
      Filter: Optional[SentimentDetectionJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class ListTagsForResourceRequest(BaseModel):
      ResourceArn: ComprehendArn
  
  
  class ListTopicsDetectionJobsRequest(BaseModel):
      Filter: Optional[TopicsDetectionJobFilter] = None
      NextToken: Optional[String] = None
      MaxResults: Optional[MaxResultsInteger] = None
  
  
  class StartDocumentClassificationJobResponse(BaseModel):
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobStatus: Optional[JobStatus] = None
  
  
  class StartDominantLanguageDetectionJobResponse(StartDocumentClassificationJobResponse):
      pass
  
  
  class StartEntitiesDetectionJobResponse(StartDocumentClassificationJobResponse):
      pass
  
  
  class StartEventsDetectionJobResponse(StartDocumentClassificationJobResponse):
      pass
  
  
  class StartKeyPhrasesDetectionJobResponse(StartDocumentClassificationJobResponse):
      pass
  
  
  class StartPiiEntitiesDetectionJobResponse(StartDocumentClassificationJobResponse):
      pass
  
  
  class StartSentimentDetectionJobResponse(StartDocumentClassificationJobResponse):
      pass
  
  
  class StartTopicsDetectionJobResponse(StartDocumentClassificationJobResponse):
      pass
  
  
  class StopDominantLanguageDetectionJobResponse(BaseModel):
      JobId: Optional[JobId] = None
      JobStatus: Optional[JobStatus] = None
  
  
  class StopDominantLanguageDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class StopEntitiesDetectionJobResponse(StopDominantLanguageDetectionJobResponse):
      pass
  
  
  class StopEntitiesDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class StopEventsDetectionJobResponse(StopDominantLanguageDetectionJobResponse):
      pass
  
  
  class StopEventsDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class StopKeyPhrasesDetectionJobResponse(StopDominantLanguageDetectionJobResponse):
      pass
  
  
  class StopKeyPhrasesDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class StopPiiEntitiesDetectionJobResponse(StopDominantLanguageDetectionJobResponse):
      pass
  
  
  class StopPiiEntitiesDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class StopSentimentDetectionJobResponse(StopDominantLanguageDetectionJobResponse):
      pass
  
  
  class StopSentimentDetectionJobRequest(BaseModel):
      JobId: JobId
  
  
  class StopTrainingDocumentClassifierRequest(BaseModel):
      DocumentClassifierArn: DocumentClassifierArn
  
  
  class StopTrainingEntityRecognizerRequest(BaseModel):
      EntityRecognizerArn: EntityRecognizerArn
  
  
  class UntagResourceRequest(BaseModel):
      ResourceArn: ComprehendArn
      TagKeys: TagKeyList
  
  
  class UpdateEndpointRequest(BaseModel):
      EndpointArn: ComprehendEndpointArn
      DesiredInferenceUnits: InferenceUnitsInteger
  
  
  class ListOfDominantLanguages(BaseModel):
      __root__: List[DominantLanguage]
  
  
  class BatchDetectDominantLanguageItemResult(BaseModel):
      """
      The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
      """
  
      Index: Optional[Integer] = None
      Languages: Optional[ListOfDominantLanguages] = None
  
  
  class CustomerInputStringList(BaseModel):
      __root__: List[CustomerInputString]
  
  
  class ListOfDetectDominantLanguageResult(BaseModel):
      __root__: List[BatchDetectDominantLanguageItemResult]
  
  
  class BatchItemErrorList(BaseModel):
      __root__: List[BatchItemError]
  
  
  class ListOfEntities(BaseModel):
      __root__: List[Entity]
  
  
  class BatchDetectEntitiesItemResult(BaseModel):
      """
      The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
      """
  
      Index: Optional[Integer] = None
      Entities: Optional[ListOfEntities] = None
  
  
  class ListOfDetectEntitiesResult(BaseModel):
      __root__: List[BatchDetectEntitiesItemResult]
  
  
  class ListOfKeyPhrases(BaseModel):
      __root__: List[KeyPhrase]
  
  
  class BatchDetectKeyPhrasesItemResult(BaseModel):
      """
      The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
      """
  
      Index: Optional[Integer] = None
      KeyPhrases: Optional[ListOfKeyPhrases] = None
  
  
  class ListOfDetectKeyPhrasesResult(BaseModel):
      __root__: List[BatchDetectKeyPhrasesItemResult]
  
  
  class SentimentScore(BaseModel):
      """
      Describes the level of confidence that Amazon Comprehend has in the accuracy of its detection of sentiments.
      """
  
      Positive: Optional[Float] = None
      Negative: Optional[Float] = None
      Neutral: Optional[Float] = None
      Mixed: Optional[Float] = None
  
  
  class BatchDetectSentimentItemResult(BaseModel):
      """
      The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
      """
  
      Index: Optional[Integer] = None
      Sentiment: Optional[SentimentType] = None
      SentimentScore: Optional[SentimentScore] = None
  
  
  class ListOfDetectSentimentResult(BaseModel):
      __root__: List[BatchDetectSentimentItemResult]
  
  
  class ListOfClasses(BaseModel):
      __root__: List[DocumentClass]
  
  
  class ListOfLabels(BaseModel):
      __root__: List[DocumentLabel]
  
  
  class ListOfEntityLabels(BaseModel):
      __root__: List[EntityLabel]
  
  
  class TagList(BaseModel):
      __root__: List[Tag]
  
  
  class DocumentClassifierInputDataConfig(BaseModel):
      """
      <p>The input properties for training a document classifier. </p> <p>For more information on how the input file is formatted, see <a>how-document-classification-training-data</a>. </p>
      """
  
      DataFormat: Optional[DocumentClassifierDataFormat] = None
      S3Uri: Optional[S3Uri] = None
      LabelDelimiter: Optional[LabelDelimiter] = None
      AugmentedManifests: Optional[DocumentClassifierAugmentedManifestsList] = None
  
  
  class DocumentClassifierOutputDataConfig(BaseModel):
      """
      Provides output results configuration parameters for custom classifier jobs.
      """
  
      S3Uri: Optional[S3Uri] = None
      KmsKeyId: Optional[KmsKeyId] = None
  
  
  class VpcConfig(BaseModel):
      """
      Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon VPC</a>.
      """
  
      SecurityGroupIds: SecurityGroupIds
      Subnets: Subnets
  
  
  class DocumentClassifierProperties(BaseModel):
      """
      Provides information about a document classifier.
      """
  
      DocumentClassifierArn: Optional[DocumentClassifierArn] = None
      LanguageCode: Optional[LanguageCode] = None
      Status: Optional[ModelStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      TrainingStartTime: Optional[Timestamp] = None
      TrainingEndTime: Optional[Timestamp] = None
      InputDataConfig: Optional[DocumentClassifierInputDataConfig] = None
      OutputDataConfig: Optional[DocumentClassifierOutputDataConfig] = None
      ClassifierMetadata: Optional[ClassifierMetadata] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Mode: Optional[DocumentClassifierMode] = None
      ModelKmsKeyId: Optional[KmsKeyId] = None
  
  
  class EndpointProperties(BaseModel):
      """
      Specifies information about the specified endpoint.
      """
  
      EndpointArn: Optional[ComprehendEndpointArn] = None
      Status: Optional[EndpointStatus] = None
      Message: Optional[AnyLengthString] = None
      ModelArn: Optional[ComprehendModelArn] = None
      DesiredInferenceUnits: Optional[InferenceUnitsInteger] = None
      CurrentInferenceUnits: Optional[InferenceUnitsInteger] = None
      CreationTime: Optional[Timestamp] = None
      LastModifiedTime: Optional[Timestamp] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
  
  
  class ListOfPiiEntities(BaseModel):
      __root__: List[PiiEntity]
  
  
  class InputDataConfig(BaseModel):
      """
      The input properties for an inference job.
      """
  
      S3Uri: S3Uri
      InputFormat: Optional[InputFormat] = None
      DocumentReaderConfig: Optional[DocumentReaderConfig] = None
  
  
  class DocumentClassifierPropertiesList(BaseModel):
      __root__: List[DocumentClassifierProperties]
  
  
  class EndpointPropertiesList(BaseModel):
      __root__: List[EndpointProperties]
  
  
  class EntityTypesList(BaseModel):
      __root__: List[EntityTypesListItem]
  
  
  class EntityRecognizerMetadataEntityTypesListItem(BaseModel):
      """
      Individual item from the list of entity types in the metadata of an entity recognizer.
      """
  
      Type: Optional[AnyLengthString] = None
      EvaluationMetrics: Optional[EntityTypesEvaluationMetrics] = None
      NumberOfTrainMentions: Optional[Integer] = None
  
  
  class SyntaxToken(BaseModel):
      """
      Represents a work in the input text that was recognized and assigned a part of speech. There is one syntax token record for each word in the source text.
      """
  
      TokenId: Optional[Integer] = None
      Text: Optional[String] = None
      BeginOffset: Optional[Integer] = None
      EndOffset: Optional[Integer] = None
      PartOfSpeech: Optional[PartOfSpeechTag] = None
  
  
  class RedactionConfig(BaseModel):
      """
      Provides configuration parameters for PII entity redaction.
      """
  
      PiiEntityTypes: Optional[ListOfPiiEntityTypes] = None
      MaskMode: Optional[PiiEntitiesDetectionMaskMode] = None
      MaskCharacter: Optional[MaskCharacter] = None
  
  
  class BatchDetectDominantLanguageResponse(BaseModel):
      ResultList: ListOfDetectDominantLanguageResult
      ErrorList: BatchItemErrorList
  
  
  class BatchDetectDominantLanguageRequest(BaseModel):
      TextList: CustomerInputStringList
  
  
  class BatchDetectEntitiesResponse(BaseModel):
      ResultList: ListOfDetectEntitiesResult
      ErrorList: BatchItemErrorList
  
  
  class BatchDetectEntitiesRequest(BaseModel):
      TextList: CustomerInputStringList
      LanguageCode: LanguageCode
  
  
  class BatchDetectKeyPhrasesResponse(BaseModel):
      ResultList: ListOfDetectKeyPhrasesResult
      ErrorList: BatchItemErrorList
  
  
  class BatchDetectKeyPhrasesRequest(BaseModel):
      TextList: CustomerInputStringList
      LanguageCode: LanguageCode
  
  
  class BatchDetectSentimentResponse(BaseModel):
      ResultList: ListOfDetectSentimentResult
      ErrorList: BatchItemErrorList
  
  
  class BatchDetectSentimentRequest(BaseModel):
      TextList: CustomerInputStringList
      LanguageCode: LanguageCode
  
  
  class BatchDetectSyntaxRequest(BaseModel):
      TextList: CustomerInputStringList
      LanguageCode: SyntaxLanguageCode
  
  
  class ClassifyDocumentResponse(BaseModel):
      Classes: Optional[ListOfClasses] = None
      Labels: Optional[ListOfLabels] = None
  
  
  class ContainsPiiEntitiesResponse(BaseModel):
      Labels: Optional[ListOfEntityLabels] = None
  
  
  class CreateDocumentClassifierRequest(BaseModel):
      DocumentClassifierName: ComprehendArnName
      DataAccessRoleArn: IamRoleArn
      Tags: Optional[TagList] = None
      InputDataConfig: DocumentClassifierInputDataConfig
      OutputDataConfig: Optional[DocumentClassifierOutputDataConfig] = None
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      LanguageCode: LanguageCode
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Mode: Optional[DocumentClassifierMode] = None
      ModelKmsKeyId: Optional[KmsKeyId] = None
  
  
  class CreateEndpointRequest(BaseModel):
      EndpointName: ComprehendEndpointName
      ModelArn: ComprehendModelArn
      DesiredInferenceUnits: InferenceUnitsInteger
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      Tags: Optional[TagList] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
  
  
  class DescribeDocumentClassifierResponse(BaseModel):
      DocumentClassifierProperties: Optional[DocumentClassifierProperties] = None
  
  
  class DescribeEndpointResponse(BaseModel):
      EndpointProperties: Optional[EndpointProperties] = None
  
  
  class DetectDominantLanguageResponse(BaseModel):
      Languages: Optional[ListOfDominantLanguages] = None
  
  
  class DetectEntitiesResponse(BaseModel):
      Entities: Optional[ListOfEntities] = None
  
  
  class DetectKeyPhrasesResponse(BaseModel):
      KeyPhrases: Optional[ListOfKeyPhrases] = None
  
  
  class DetectPiiEntitiesResponse(BaseModel):
      Entities: Optional[ListOfPiiEntities] = None
  
  
  class DetectSentimentResponse(BaseModel):
      Sentiment: Optional[SentimentType] = None
      SentimentScore: Optional[SentimentScore] = None
  
  
  class ListDocumentClassifiersResponse(BaseModel):
      DocumentClassifierPropertiesList: Optional[DocumentClassifierPropertiesList] = None
      NextToken: Optional[String] = None
  
  
  class ListEndpointsResponse(BaseModel):
      EndpointPropertiesList: Optional[EndpointPropertiesList] = None
      NextToken: Optional[String] = None
  
  
  class ListTagsForResourceResponse(BaseModel):
      ResourceArn: Optional[ComprehendArn] = None
      Tags: Optional[TagList] = None
  
  
  class StartDocumentClassificationJobRequest(BaseModel):
      JobName: Optional[JobName] = None
      DocumentClassifierArn: DocumentClassifierArn
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      DataAccessRoleArn: IamRoleArn
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Tags: Optional[TagList] = None
  
  
  class StartDominantLanguageDetectionJobRequest(BaseModel):
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      DataAccessRoleArn: IamRoleArn
      JobName: Optional[JobName] = None
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Tags: Optional[TagList] = None
  
  
  class StartEntitiesDetectionJobRequest(BaseModel):
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      DataAccessRoleArn: IamRoleArn
      JobName: Optional[JobName] = None
      EntityRecognizerArn: Optional[EntityRecognizerArn] = None
      LanguageCode: LanguageCode
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Tags: Optional[TagList] = None
  
  
  class StartEventsDetectionJobRequest(BaseModel):
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      DataAccessRoleArn: IamRoleArn
      JobName: Optional[JobName] = None
      LanguageCode: LanguageCode
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      TargetEventTypes: TargetEventTypes
      Tags: Optional[TagList] = None
  
  
  class StartKeyPhrasesDetectionJobRequest(BaseModel):
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      DataAccessRoleArn: IamRoleArn
      JobName: Optional[JobName] = None
      LanguageCode: LanguageCode
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Tags: Optional[TagList] = None
  
  
  class StartPiiEntitiesDetectionJobRequest(BaseModel):
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      Mode: PiiEntitiesDetectionMode
      RedactionConfig: Optional[RedactionConfig] = None
      DataAccessRoleArn: IamRoleArn
      JobName: Optional[JobName] = None
      LanguageCode: LanguageCode
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      Tags: Optional[TagList] = None
  
  
  class StartSentimentDetectionJobRequest(BaseModel):
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      DataAccessRoleArn: IamRoleArn
      JobName: Optional[JobName] = None
      LanguageCode: LanguageCode
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Tags: Optional[TagList] = None
  
  
  class StartTopicsDetectionJobRequest(BaseModel):
      InputDataConfig: InputDataConfig
      OutputDataConfig: OutputDataConfig
      DataAccessRoleArn: IamRoleArn
      JobName: Optional[JobName] = None
      NumberOfTopics: Optional[NumberOfTopicsInteger] = None
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      Tags: Optional[TagList] = None
  
  
  class TagResourceRequest(BaseModel):
      ResourceArn: ComprehendArn
      Tags: TagList
  
  
  class ListOfSyntaxTokens(BaseModel):
      __root__: List[SyntaxToken]
  
  
  class BatchDetectSyntaxItemResult(BaseModel):
      """
      The result of calling the operation. The operation returns one object that is successfully processed by the operation.
      """
  
      Index: Optional[Integer] = None
      SyntaxTokens: Optional[ListOfSyntaxTokens] = None
  
  
  class ListOfDetectSyntaxResult(BaseModel):
      __root__: List[BatchDetectSyntaxItemResult]
  
  
  class EntityRecognizerInputDataConfig(BaseModel):
      """
      Specifies the format and location of the input data.
      """
  
      DataFormat: Optional[DocumentClassifierDataFormat] = None
      EntityTypes: EntityTypesList
      Documents: Optional[EntityRecognizerDocuments] = None
      Annotations: Optional[EntityRecognizerAnnotations] = None
      EntityList: Optional[EntityRecognizerEntityList] = None
      AugmentedManifests: Optional[EntityRecognizerAugmentedManifestsList] = None
  
  
  class DocumentClassificationJobProperties(BaseModel):
      """
      Provides information about a document classification job.
      """
  
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      DocumentClassifierArn: Optional[DocumentClassifierArn] = None
      InputDataConfig: Optional[InputDataConfig] = None
      OutputDataConfig: Optional[OutputDataConfig] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
  
  
  class DominantLanguageDetectionJobProperties(BaseModel):
      """
      Provides information about a dominant language detection job.
      """
  
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      InputDataConfig: Optional[InputDataConfig] = None
      OutputDataConfig: Optional[OutputDataConfig] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
  
  
  class EntitiesDetectionJobProperties(BaseModel):
      """
      Provides information about an entities detection job.
      """
  
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      EntityRecognizerArn: Optional[EntityRecognizerArn] = None
      InputDataConfig: Optional[InputDataConfig] = None
      OutputDataConfig: Optional[OutputDataConfig] = None
      LanguageCode: Optional[LanguageCode] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
  
  
  class EventsDetectionJobProperties(BaseModel):
      """
      Provides information about an events detection job.
      """
  
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      InputDataConfig: Optional[InputDataConfig] = None
      OutputDataConfig: Optional[OutputDataConfig] = None
      LanguageCode: Optional[LanguageCode] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      TargetEventTypes: Optional[TargetEventTypes] = None
  
  
  class KeyPhrasesDetectionJobProperties(BaseModel):
      """
      Provides information about a key phrases detection job.
      """
  
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      InputDataConfig: Optional[InputDataConfig] = None
      OutputDataConfig: Optional[OutputDataConfig] = None
      LanguageCode: Optional[LanguageCode] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
  
  
  class PiiEntitiesDetectionJobProperties(BaseModel):
      """
      Provides information about a PII entities detection job.
      """
  
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      InputDataConfig: Optional[InputDataConfig] = None
      OutputDataConfig: Optional[PiiOutputDataConfig] = None
      RedactionConfig: Optional[RedactionConfig] = None
      LanguageCode: Optional[LanguageCode] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      Mode: Optional[PiiEntitiesDetectionMode] = None
  
  
  class SentimentDetectionJobProperties(KeyPhrasesDetectionJobProperties):
      """
      Provides information about a sentiment detection job.
      """
  
      pass
  
  
  class TopicsDetectionJobProperties(BaseModel):
      """
      Provides information about a topic detection job.
      """
  
      JobId: Optional[JobId] = None
      JobArn: Optional[ComprehendArn] = None
      JobName: Optional[JobName] = None
      JobStatus: Optional[JobStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      InputDataConfig: Optional[InputDataConfig] = None
      OutputDataConfig: Optional[OutputDataConfig] = None
      NumberOfTopics: Optional[Integer] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
  
  
  class DocumentClassificationJobPropertiesList(BaseModel):
      __root__: List[DocumentClassificationJobProperties]
  
  
  class DominantLanguageDetectionJobPropertiesList(BaseModel):
      __root__: List[DominantLanguageDetectionJobProperties]
  
  
  class EntitiesDetectionJobPropertiesList(BaseModel):
      __root__: List[EntitiesDetectionJobProperties]
  
  
  class EntityRecognizerMetadataEntityTypesList(BaseModel):
      __root__: List[EntityRecognizerMetadataEntityTypesListItem]
  
  
  class EntityRecognizerMetadata(BaseModel):
      """
      Detailed information about an entity recognizer.
      """
  
      NumberOfTrainedDocuments: Optional[Integer] = None
      NumberOfTestDocuments: Optional[Integer] = None
      EvaluationMetrics: Optional[EntityRecognizerEvaluationMetrics] = None
      EntityTypes: Optional[EntityRecognizerMetadataEntityTypesList] = None
  
  
  class EventsDetectionJobPropertiesList(BaseModel):
      __root__: List[EventsDetectionJobProperties]
  
  
  class KeyPhrasesDetectionJobPropertiesList(BaseModel):
      __root__: List[KeyPhrasesDetectionJobProperties]
  
  
  class PiiEntitiesDetectionJobPropertiesList(BaseModel):
      __root__: List[PiiEntitiesDetectionJobProperties]
  
  
  class SentimentDetectionJobPropertiesList(BaseModel):
      __root__: List[SentimentDetectionJobProperties]
  
  
  class TopicsDetectionJobPropertiesList(BaseModel):
      __root__: List[TopicsDetectionJobProperties]
  
  
  class BatchDetectSyntaxResponse(BaseModel):
      ResultList: ListOfDetectSyntaxResult
      ErrorList: BatchItemErrorList
  
  
  class CreateEntityRecognizerRequest(BaseModel):
      RecognizerName: ComprehendArnName
      DataAccessRoleArn: IamRoleArn
      Tags: Optional[TagList] = None
      InputDataConfig: EntityRecognizerInputDataConfig
      ClientRequestToken: Optional[ClientRequestTokenString] = None
      LanguageCode: LanguageCode
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      ModelKmsKeyId: Optional[KmsKeyId] = None
  
  
  class DescribeDocumentClassificationJobResponse(BaseModel):
      DocumentClassificationJobProperties: Optional[
          DocumentClassificationJobProperties
      ] = None
  
  
  class DescribeDominantLanguageDetectionJobResponse(BaseModel):
      DominantLanguageDetectionJobProperties: Optional[
          DominantLanguageDetectionJobProperties
      ] = None
  
  
  class DescribeEntitiesDetectionJobResponse(BaseModel):
      EntitiesDetectionJobProperties: Optional[EntitiesDetectionJobProperties] = None
  
  
  class DescribeEventsDetectionJobResponse(BaseModel):
      EventsDetectionJobProperties: Optional[EventsDetectionJobProperties] = None
  
  
  class DescribeKeyPhrasesDetectionJobResponse(BaseModel):
      KeyPhrasesDetectionJobProperties: Optional[KeyPhrasesDetectionJobProperties] = None
  
  
  class DescribePiiEntitiesDetectionJobResponse(BaseModel):
      PiiEntitiesDetectionJobProperties: Optional[
          PiiEntitiesDetectionJobProperties
      ] = None
  
  
  class DescribeSentimentDetectionJobResponse(BaseModel):
      SentimentDetectionJobProperties: Optional[SentimentDetectionJobProperties] = None
  
  
  class DescribeTopicsDetectionJobResponse(BaseModel):
      TopicsDetectionJobProperties: Optional[TopicsDetectionJobProperties] = None
  
  
  class DetectSyntaxResponse(BaseModel):
      SyntaxTokens: Optional[ListOfSyntaxTokens] = None
  
  
  class ListDocumentClassificationJobsResponse(BaseModel):
      DocumentClassificationJobPropertiesList: Optional[
          DocumentClassificationJobPropertiesList
      ] = None
      NextToken: Optional[String] = None
  
  
  class ListDominantLanguageDetectionJobsResponse(BaseModel):
      DominantLanguageDetectionJobPropertiesList: Optional[
          DominantLanguageDetectionJobPropertiesList
      ] = None
      NextToken: Optional[String] = None
  
  
  class ListEntitiesDetectionJobsResponse(BaseModel):
      EntitiesDetectionJobPropertiesList: Optional[
          EntitiesDetectionJobPropertiesList
      ] = None
      NextToken: Optional[String] = None
  
  
  class ListEventsDetectionJobsResponse(BaseModel):
      EventsDetectionJobPropertiesList: Optional[EventsDetectionJobPropertiesList] = None
      NextToken: Optional[String] = None
  
  
  class ListKeyPhrasesDetectionJobsResponse(BaseModel):
      KeyPhrasesDetectionJobPropertiesList: Optional[
          KeyPhrasesDetectionJobPropertiesList
      ] = None
      NextToken: Optional[String] = None
  
  
  class ListPiiEntitiesDetectionJobsResponse(BaseModel):
      PiiEntitiesDetectionJobPropertiesList: Optional[
          PiiEntitiesDetectionJobPropertiesList
      ] = None
      NextToken: Optional[String] = None
  
  
  class ListSentimentDetectionJobsResponse(BaseModel):
      SentimentDetectionJobPropertiesList: Optional[
          SentimentDetectionJobPropertiesList
      ] = None
      NextToken: Optional[String] = None
  
  
  class ListTopicsDetectionJobsResponse(BaseModel):
      TopicsDetectionJobPropertiesList: Optional[TopicsDetectionJobPropertiesList] = None
      NextToken: Optional[String] = None
  
  
  class EntityRecognizerProperties(BaseModel):
      """
      Describes information about an entity recognizer.
      """
  
      EntityRecognizerArn: Optional[EntityRecognizerArn] = None
      LanguageCode: Optional[LanguageCode] = None
      Status: Optional[ModelStatus] = None
      Message: Optional[AnyLengthString] = None
      SubmitTime: Optional[Timestamp] = None
      EndTime: Optional[Timestamp] = None
      TrainingStartTime: Optional[Timestamp] = None
      TrainingEndTime: Optional[Timestamp] = None
      InputDataConfig: Optional[EntityRecognizerInputDataConfig] = None
      RecognizerMetadata: Optional[EntityRecognizerMetadata] = None
      DataAccessRoleArn: Optional[IamRoleArn] = None
      VolumeKmsKeyId: Optional[KmsKeyId] = None
      VpcConfig: Optional[VpcConfig] = None
      ModelKmsKeyId: Optional[KmsKeyId] = None
  
  
  class EntityRecognizerPropertiesList(BaseModel):
      __root__: List[EntityRecognizerProperties]
  
  
  class DescribeEntityRecognizerResponse(BaseModel):
      EntityRecognizerProperties: Optional[EntityRecognizerProperties] = None
  
  
  class ListEntityRecognizersResponse(BaseModel):
      EntityRecognizerPropertiesList: Optional[EntityRecognizerPropertiesList] = None
      NextToken: Optional[String] = None
  