# generated by datamodel-codegen:
#   filename:  openapi.yaml
#   timestamp: 2021-12-31T02:53:11+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, Extra, Field, SecretStr


class ThrottlingException(BaseModel):
    __root__: Any


class ServiceQuotaExceededException(ThrottlingException):
    pass


class ValidationException(ThrottlingException):
    pass


class PreconditionFailedException(ThrottlingException):
    pass


class ConflictException(ThrottlingException):
    pass


class InternalServerException(ThrottlingException):
    pass


class ChildDirected(BaseModel):
    __root__: bool


class TagValue(BaseModel):
    __root__: Annotated[str, Field(max_length=256, min_length=0)]


class Boolean(ChildDirected):
    pass


class VoiceId(BaseModel):
    __root__: str


class ResourceNotFoundException(ThrottlingException):
    pass


class BoxedBoolean(ChildDirected):
    pass


class KendraIndexArn(BaseModel):
    __root__: Annotated[
        str,
        Field(
            max_length=2048,
            min_length=32,
            regex='^arn:aws:kendra:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:index\\/[a-zA-Z0-9][a-zA-Z0-9_-]*$',
        ),
    ]


class QueryFilterString(BaseModel):
    __root__: Annotated[str, Field(max_length=5000, min_length=1)]


class Operation(BaseModel):
    __root__: Annotated[
        str, Field(max_length=50, min_length=5, regex='lex:[a-zA-Z*]+$')
    ]


class ConditionKeyValueMap(BaseModel):
    pass

    class Config:
        extra = Extra.allow


class SlotConstraint(Enum):
    Required = 'Required'
    Optional = 'Optional'


class ObfuscationSettingType(Enum):
    None_ = 'None'
    DefaultObfuscation = 'DefaultObfuscation'


class SlotValueResolutionStrategy(Enum):
    OriginalValue = 'OriginalValue'
    TopResolution = 'TopResolution'


class BotLocaleSortAttribute(Enum):
    BotLocaleName = 'BotLocaleName'


class SortOrder(Enum):
    Ascending = 'Ascending'
    Descending = 'Descending'


class BotVersionSortAttribute(Enum):
    BotVersion = 'BotVersion'


class BotSortAttribute(Enum):
    BotName = 'BotName'


class BuiltInIntentSortAttribute(Enum):
    IntentSignature = 'IntentSignature'


class BuiltInSlotTypeSortAttribute(Enum):
    SlotTypeSignature = 'SlotTypeSignature'


class ExportSortAttribute(Enum):
    LastUpdatedDateTime = 'LastUpdatedDateTime'


class IntentSortAttribute(Enum):
    IntentName = 'IntentName'
    LastUpdatedDateTime = 'LastUpdatedDateTime'


class SlotTypeSortAttribute(Enum):
    SlotTypeName = 'SlotTypeName'
    LastUpdatedDateTime = 'LastUpdatedDateTime'


class SlotSortAttribute(Enum):
    SlotName = 'SlotName'
    LastUpdatedDateTime = 'LastUpdatedDateTime'


class TagResourceResponse(BaseModel):
    pass


class UntagResourceResponse(TagResourceResponse):
    pass


class TagKey(BaseModel):
    __root__: Annotated[str, Field(max_length=128, min_length=1)]


class AmazonResourceName(BaseModel):
    __root__: Annotated[str, Field(max_length=1011, min_length=1)]


class AttachmentTitle(BaseModel):
    __root__: Annotated[str, Field(max_length=250, min_length=1)]


class AttachmentUrl(AttachmentTitle):
    pass


class BotVersion(BaseModel):
    __root__: Annotated[
        str, Field(max_length=5, min_length=1, regex='^(DRAFT|[0-9]+)$')
    ]


class Timestamp(BaseModel):
    __root__: datetime


class BotAliasHistoryEvent(BaseModel):
    """
    Provides a record of an event that affects a bot alias. For example, when the version of a bot that the alias points to changes.
    """

    botVersion: Optional[BotVersion] = None
    startDate: Optional[Timestamp] = None
    endDate: Optional[Timestamp] = None


class BotAliasHistoryEventsList(BaseModel):
    __root__: List[BotAliasHistoryEvent]


class BotAliasId(BaseModel):
    __root__: Annotated[
        str,
        Field(max_length=10, min_length=10, regex='^(\\bTSTALIASID\\b|[0-9a-zA-Z]+)$'),
    ]


class BotAliasLocaleSettingsMap(BaseModel):
    pass

    class Config:
        extra = Extra.allow


class BotAliasStatus(Enum):
    Creating = 'Creating'
    Available = 'Available'
    Deleting = 'Deleting'
    Failed = 'Failed'


class Name(BaseModel):
    __root__: Annotated[
        str, Field(max_length=100, min_length=1, regex='^([0-9a-zA-Z][_-]?)+$')
    ]


class Description(BaseModel):
    __root__: Annotated[str, Field(max_length=200, min_length=0)]


class BotAliasSummary(BaseModel):
    """
    Summary information about bot aliases returned from the <a>ListBotAliases</a> operation.
    """

    botAliasId: Optional[BotAliasId] = None
    botAliasName: Optional[Name] = None
    description: Optional[Description] = None
    botVersion: Optional[BotVersion] = None
    botAliasStatus: Optional[BotAliasStatus] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class BotAliasSummaryList(BaseModel):
    __root__: List[BotAliasSummary]


class Id(BaseModel):
    __root__: Annotated[
        str, Field(max_length=10, min_length=10, regex='^[0-9a-zA-Z]+$')
    ]


class BotFilterOperator(Enum):
    CO = 'CO'
    EQ = 'EQ'


class RoleArn(BaseModel):
    __root__: Annotated[
        str,
        Field(max_length=2048, min_length=32, regex='^arn:aws:iam::[0-9]{12}:role/.*$'),
    ]


class DataPrivacy(BaseModel):
    """
    By default, data stored by Amazon Lex is encrypted. The <code>DataPrivacy</code> structure provides settings that determine how Amazon Lex handles special cases of securing the data for your bot.
    """

    childDirected: ChildDirected


class SessionTTL(BaseModel):
    __root__: Annotated[int, Field(ge=60.0, le=86400.0)]


class TagMap(BaseModel):
    pass

    class Config:
        extra = Extra.allow


class LocaleId(VoiceId):
    pass


class BotLocaleHistoryEventDescription(VoiceId):
    pass


class BotLocaleHistoryEvent(BaseModel):
    """
    Provides information about an event that occurred affecting the bot locale.
    """

    event: BotLocaleHistoryEventDescription
    eventDate: Timestamp


class BotLocaleHistoryEventsList(BaseModel):
    __root__: List[BotLocaleHistoryEvent]


class DraftBotVersion(BaseModel):
    __root__: Annotated[str, Field(max_length=5, min_length=5, regex='^DRAFT$')]


class ConfidenceThreshold(BaseModel):
    __root__: Annotated[float, Field(ge=0.0, le=1.0)]


class VoiceSettings(BaseModel):
    """
    Defines settings for using an Amazon Polly voice to communicate with a user.
    """

    voiceId: VoiceId


class BotLocaleSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of bot locales.
    """

    attribute: BotLocaleSortAttribute
    order: SortOrder


class BotLocaleStatus(Enum):
    Creating = 'Creating'
    Building = 'Building'
    Built = 'Built'
    ReadyExpressTesting = 'ReadyExpressTesting'
    Failed = 'Failed'
    Deleting = 'Deleting'
    NotBuilt = 'NotBuilt'
    Importing = 'Importing'


class LocaleName(VoiceId):
    pass


class BotLocaleSummary(BaseModel):
    """
    Summary information about bot locales returned by the <a>ListBotLocales</a> operation.
    """

    localeId: Optional[LocaleId] = None
    localeName: Optional[LocaleName] = None
    description: Optional[Description] = None
    botLocaleStatus: Optional[BotLocaleStatus] = None
    lastUpdatedDateTime: Optional[Timestamp] = None
    lastBuildSubmittedDateTime: Optional[Timestamp] = None


class BotLocaleSummaryList(BaseModel):
    __root__: List[BotLocaleSummary]


class BotSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of bots.
    """

    attribute: BotSortAttribute
    order: SortOrder


class BotStatus(Enum):
    Creating = 'Creating'
    Available = 'Available'
    Inactive = 'Inactive'
    Deleting = 'Deleting'
    Failed = 'Failed'
    Versioning = 'Versioning'
    Importing = 'Importing'


class NumericalBotVersion(BaseModel):
    __root__: Annotated[str, Field(max_length=5, min_length=1, regex='^[0-9]+$')]


class BotSummary(BaseModel):
    """
    Summary information about a bot returned by the <a>ListBots</a> operation.
    """

    botId: Optional[Id] = None
    botName: Optional[Name] = None
    description: Optional[Description] = None
    botStatus: Optional[BotStatus] = None
    latestBotVersion: Optional[NumericalBotVersion] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class BotSummaryList(BaseModel):
    __root__: List[BotSummary]


class BotVersionLocaleSpecification(BaseModel):
    pass

    class Config:
        extra = Extra.allow


class BotVersionSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of bot versions.
    """

    attribute: BotVersionSortAttribute
    order: SortOrder


class BotVersionSummary(BaseModel):
    """
    Summary information about a bot version returned by the <a>ListBotVersions</a> operation.
    """

    botName: Optional[Name] = None
    botVersion: Optional[BotVersion] = None
    description: Optional[Description] = None
    botStatus: Optional[BotStatus] = None
    creationDateTime: Optional[Timestamp] = None


class BotVersionSummaryList(BaseModel):
    __root__: List[BotVersionSummary]


class BuildBotLocaleRequest(BaseModel):
    pass


class BuiltInIntentSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of built-in intents.
    """

    attribute: BuiltInIntentSortAttribute
    order: SortOrder


class IntentSignature(VoiceId):
    pass


class BuiltInIntentSummary(BaseModel):
    """
    Provides summary information about a built-in intent for the <a>ListBuiltInIntents</a> operation.
    """

    intentSignature: Optional[IntentSignature] = None
    description: Optional[Description] = None


class BuiltInIntentSummaryList(BaseModel):
    __root__: List[BuiltInIntentSummary]


class BuiltInOrCustomSlotTypeId(BaseModel):
    __root__: Annotated[
        str,
        Field(
            max_length=25, min_length=1, regex='^((AMAZON\\.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$'
        ),
    ]


class BuiltInSlotTypeSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of built-in slot types.
    """

    attribute: BuiltInSlotTypeSortAttribute
    order: SortOrder


class SlotTypeSignature(VoiceId):
    pass


class BuiltInSlotTypeSummary(BaseModel):
    """
    Provides summary information about a built-in slot type for the <a>ListBuiltInSlotTypes</a> operation.
    """

    slotTypeSignature: Optional[SlotTypeSignature] = None
    description: Optional[Description] = None


class BuiltInSlotTypeSummaryList(BaseModel):
    __root__: List[BuiltInSlotTypeSummary]


class BuiltInsMaxResults(BaseModel):
    __root__: Annotated[int, Field(ge=20.0, le=20.0)]


class ButtonText(BaseModel):
    __root__: Annotated[str, Field(max_length=50, min_length=1)]


class ButtonValue(ButtonText):
    pass


class Button(BaseModel):
    """
    Describes a button to use on a response card used to gather slot values from a user.
    """

    text: ButtonText
    value: ButtonValue


class ButtonsList(BaseModel):
    __root__: Annotated[List[Button], Field(max_items=5, min_items=0)]


class CloudWatchLogGroupArn(BaseModel):
    __root__: Annotated[
        str,
        Field(
            max_length=2048,
            min_length=1,
            regex='^arn:[\\w\\-]+:logs:[\\w\\-]+:[\\d]{12}:log-group:[\\.\\-_/#A-Za-z0-9]{1,512}(?::\\*)?$',
        ),
    ]


class LogPrefix(BaseModel):
    __root__: Annotated[str, Field(max_length=1024)]


class CloudWatchLogGroupLogDestination(BaseModel):
    """
    The Amazon CloudWatch Logs log group where the text and metadata logs are delivered. The log group must exist before you enable logging.
    """

    cloudWatchLogGroupArn: CloudWatchLogGroupArn
    logPrefix: LogPrefix


class CodeHookInterfaceVersion(BaseModel):
    __root__: Annotated[str, Field(max_length=5, min_length=1)]


class ConditionKey(BaseModel):
    __root__: Annotated[str, Field(max_length=1024, min_length=1)]


class ConditionValue(ConditionKey):
    pass


class ConditionMap(BaseModel):
    pass

    class Config:
        extra = Extra.allow


class ConditionOperator(BaseModel):
    __root__: Annotated[str, Field(min_length=1)]


class ContextTimeToLiveInSeconds(BaseModel):
    __root__: Annotated[int, Field(ge=5.0, le=86400.0)]


class ContextTurnsToLive(BaseModel):
    __root__: Annotated[int, Field(ge=1.0, le=20.0)]


class SentimentAnalysisSettings(BaseModel):
    """
    Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
    """

    detectSentiment: Boolean


class CreateBotLocaleRequest(BaseModel):
    localeId: LocaleId
    description: Optional[Description] = None
    nluIntentConfidenceThreshold: ConfidenceThreshold
    voiceSettings: Optional[VoiceSettings] = None


class CreateBotRequest(BaseModel):
    botName: Name
    description: Optional[Description] = None
    roleArn: RoleArn
    dataPrivacy: DataPrivacy
    idleSessionTTLInSeconds: SessionTTL
    botTags: Optional[TagMap] = None
    testBotAliasTags: Optional[TagMap] = None


class CreateBotVersionRequest(BaseModel):
    description: Optional[Description] = None
    botVersionLocaleSpecification: BotVersionLocaleSpecification


class ImportExportFileFormat(Enum):
    LexJson = 'LexJson'


class ImportExportFilePassword(BaseModel):
    __root__: Annotated[SecretStr, Field(max_length=1024, min_length=1)]


class ExportStatus(Enum):
    InProgress = 'InProgress'
    Completed = 'Completed'
    Failed = 'Failed'
    Deleting = 'Deleting'


class DialogCodeHookSettings(BaseModel):
    """
    Settings that determine the Lambda function that Amazon Lex uses for processing user responses.
    """

    enabled: Boolean


class FulfillmentCodeHookSettings(DialogCodeHookSettings):
    """
    Determines if a Lambda function should be invoked for a specific intent.
    """

    pass


class KendraConfiguration(BaseModel):
    """
    Provides configuration information for the AMAZON.KendraSearchIntent intent. When you use this intent, Amazon Lex searches the specified Amazon Kendra index and returns documents from the index that match the user's utterance.
    """

    kendraIndex: KendraIndexArn
    queryFilterStringEnabled: Optional[Boolean] = None
    queryFilterString: Optional[QueryFilterString] = None


class Policy(BaseModel):
    __root__: Annotated[str, Field(min_length=2)]


class CreateResourcePolicyRequest(BaseModel):
    policy: Policy


class RevisionId(NumericalBotVersion):
    pass


class Effect(Enum):
    Allow = 'Allow'
    Deny = 'Deny'


class OperationList(BaseModel):
    __root__: List[Operation]


class ObfuscationSetting(BaseModel):
    """
    Determines whether Amazon Lex obscures slot values in conversation logs.
    """

    obfuscationSettingType: ObfuscationSettingType


class MultipleValuesSetting(BaseModel):
    """
    Indicates whether a slot can return multiple values.
    """

    allowMultipleValues: Optional[Boolean] = None


class CreateUploadUrlRequest(BaseModel):
    pass


class PresignedS3Url(ConditionKey):
    pass


class CustomPayloadValue(BaseModel):
    __root__: Annotated[str, Field(max_length=1000, min_length=1)]


class CustomPayload(BaseModel):
    """
    A custom response string that Amazon Lex sends to your application. You define the content and structure the string.
    """

    value: CustomPayloadValue


class SkipResourceInUseCheck(ChildDirected):
    pass


class DeleteBotAliasRequest(BaseModel):
    pass


class DeleteBotLocaleRequest(BaseModel):
    pass


class DeleteBotRequest(BaseModel):
    pass


class DeleteBotVersionRequest(BaseModel):
    pass


class DeleteExportRequest(BaseModel):
    pass


class DeleteImportRequest(BaseModel):
    pass


class DeleteIntentRequest(BaseModel):
    pass


class DeleteResourcePolicyRequest(BaseModel):
    pass


class DeleteResourcePolicyStatementRequest(BaseModel):
    pass


class DeleteSlotRequest(BaseModel):
    pass


class DeleteSlotTypeRequest(BaseModel):
    pass


class DescribeBotAliasRequest(BaseModel):
    pass


class DescribeBotLocaleRequest(BaseModel):
    pass


class ResourceCount(BaseModel):
    __root__: int


class DescribeBotRequest(BaseModel):
    pass


class DescribeBotVersionRequest(BaseModel):
    pass


class DescribeExportRequest(BaseModel):
    pass


class DescribeImportRequest(BaseModel):
    pass


class ImportedResourceId(BaseModel):
    __root__: Annotated[
        str, Field(max_length=10, min_length=5, regex='^([0-9a-zA-Z_])+$')
    ]


class MergeStrategy(Enum):
    Overwrite = 'Overwrite'
    FailOnConflict = 'FailOnConflict'


class DescribeIntentRequest(BaseModel):
    pass


class DescribeResourcePolicyRequest(BaseModel):
    pass


class DescribeSlotRequest(BaseModel):
    pass


class DescribeSlotTypeRequest(BaseModel):
    pass


class ExportFilterName(Enum):
    ExportResourceType = 'ExportResourceType'


class ExportSortBy(BaseModel):
    """
    Provides information about sorting a list of exports.
    """

    attribute: ExportSortAttribute
    order: SortOrder


class FailureReason(VoiceId):
    pass


class FilterValue(BaseModel):
    __root__: Annotated[
        str, Field(max_length=100, min_length=1, regex='^[0-9a-zA-Z_()\\s-]+$')
    ]


class ImageResponseCard(BaseModel):
    """
    <p>A card that is shown to the user by a messaging platform. You define the contents of the card, the card is displayed by the platform. </p> <p>When you use a response card, the response from the user is constrained to the text associated with a button on the card.</p>
    """

    title: AttachmentTitle
    subtitle: Optional[AttachmentTitle] = None
    imageUrl: Optional[AttachmentUrl] = None
    buttons: Optional[ButtonsList] = None


class ImportFilterName(Enum):
    ImportResourceType = 'ImportResourceType'


class ImportSortBy(ExportSortBy):
    """
    Provides information for sorting a list of imports.
    """

    pass


class ImportSummary(BaseModel):
    """
    Provides summary information about an import in an import list.
    """

    importId: Optional[Id] = None
    importedResourceId: Optional[ImportedResourceId] = None
    importedResourceName: Optional[Name] = None
    importStatus: Optional[ExportStatus] = None
    mergeStrategy: Optional[MergeStrategy] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class ImportSummaryList(BaseModel):
    __root__: List[ImportSummary]


class IntentFilterName(Enum):
    IntentName = 'IntentName'


class IntentSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of intents.
    """

    attribute: IntentSortAttribute
    order: SortOrder


class KmsKeyArn(BaseModel):
    __root__: Annotated[
        str,
        Field(
            max_length=2048,
            min_length=20,
            regex='^arn:[\\w\\-]+:kms:[\\w\\-]+:[\\d]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$',
        ),
    ]


class LambdaARN(BaseModel):
    __root__: Annotated[
        str,
        Field(
            max_length=2048,
            min_length=20,
            regex='arn:aws:lambda:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:function:[a-zA-Z0-9-_]+(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?',
        ),
    ]


class MaxResults(BaseModel):
    __root__: Annotated[int, Field(ge=1.0, le=1000.0)]


class NextToken(VoiceId):
    pass


class ListBotAliasesRequest(BaseModel):
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class ListBotVersionsRequest(BaseModel):
    sortBy: Optional[BotVersionSortBy] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class ListBuiltInIntentsRequest(BaseModel):
    sortBy: Optional[BuiltInIntentSortBy] = None
    maxResults: Optional[BuiltInsMaxResults] = None
    nextToken: Optional[NextToken] = None


class ListBuiltInSlotTypesRequest(BaseModel):
    sortBy: Optional[BuiltInSlotTypeSortBy] = None
    maxResults: Optional[BuiltInsMaxResults] = None
    nextToken: Optional[NextToken] = None


class SlotTypeSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of slot types.
    """

    attribute: SlotTypeSortAttribute
    order: SortOrder


class SlotSortBy(BaseModel):
    """
    Specifies attributes for sorting a list of bots.
    """

    attribute: SlotSortAttribute
    order: SortOrder


class ListTagsForResourceRequest(BaseModel):
    pass


class PlainTextMessageValue(CustomPayloadValue):
    pass


class ServicePrincipal(BaseModel):
    __root__: Annotated[
        str, Field(max_length=1024, min_length=15, regex='^[0-9a-zA-Z_.]+$')
    ]


class PrincipalArn(BaseModel):
    __root__: Annotated[
        str,
        Field(
            max_length=1024,
            min_length=30,
            regex='^arn:aws:iam::[0-9]{12}:(root|(user|role)/.*)$',
        ),
    ]


class PriorityValue(BaseModel):
    __root__: Annotated[int, Field(ge=0.0, le=100.0)]


class PromptMaxRetries(BaseModel):
    __root__: Annotated[int, Field(ge=0.0, le=5.0)]


class RegexPattern(BaseModel):
    __root__: Annotated[str, Field(max_length=100, min_length=1)]


class S3BucketArn(BaseModel):
    __root__: Annotated[
        str,
        Field(
            max_length=2048,
            min_length=1,
            regex='^arn:[\\w\\-]+:s3:::[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$',
        ),
    ]


class SSMLMessageValue(CustomPayloadValue):
    pass


class Utterance(VoiceId):
    pass


class Value4(BaseModel):
    __root__: Annotated[str, Field(max_length=140, min_length=1)]


class SampleValue(BaseModel):
    """
    Defines one of the values for a slot type.
    """

    value: Value4


class SlotDefaultValueString(BaseModel):
    __root__: Annotated[str, Field(max_length=202, min_length=1)]


class SlotDefaultValue(BaseModel):
    """
    Specifies the default value to use when a user doesn't provide a value for a slot.
    """

    defaultValue: SlotDefaultValueString


class SlotDefaultValueList(BaseModel):
    __root__: Annotated[List[SlotDefaultValue], Field(max_items=10, min_items=0)]


class SlotFilterName(Enum):
    SlotName = 'SlotName'


class SlotTypeFilterName(Enum):
    SlotTypeName = 'SlotTypeName'


class SlotTypeSummary(BaseModel):
    """
    Provides summary information about a slot type.
    """

    slotTypeId: Optional[Id] = None
    slotTypeName: Optional[Name] = None
    description: Optional[Description] = None
    parentSlotTypeSignature: Optional[SlotTypeSignature] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class SynonymList(BaseModel):
    __root__: Annotated[List[SampleValue], Field(max_items=10000, min_items=1)]


class StillWaitingResponseFrequency(BaseModel):
    __root__: Annotated[int, Field(ge=1.0, le=300.0)]


class StillWaitingResponseTimeout(BaseModel):
    __root__: Annotated[int, Field(ge=1.0, le=900.0)]


class TagKeyList(BaseModel):
    __root__: Annotated[List[TagKey], Field(max_items=200, min_items=0)]


class TagResourceRequest(BaseModel):
    tags: TagMap


class TextLogDestination(BaseModel):
    """
    Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
    """

    cloudWatch: CloudWatchLogGroupLogDestination


class TextLogSetting(BaseModel):
    """
    Defines settings to enable text conversation logs.
    """

    enabled: Boolean
    destination: TextLogDestination


class UntagResourceRequest(BaseModel):
    pass


class UpdateBotLocaleRequest(BaseModel):
    description: Optional[Description] = None
    nluIntentConfidenceThreshold: ConfidenceThreshold
    voiceSettings: Optional[VoiceSettings] = None


class UpdateBotRequest(BaseModel):
    botName: Name
    description: Optional[Description] = None
    roleArn: RoleArn
    dataPrivacy: DataPrivacy
    idleSessionTTLInSeconds: SessionTTL


class UpdateExportRequest(BaseModel):
    filePassword: Optional[ImportExportFilePassword] = None


class UpdateResourcePolicyRequest(BaseModel):
    policy: Policy


class BuildBotLocaleResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    botLocaleStatus: Optional[BotLocaleStatus] = None
    lastBuildSubmittedDateTime: Optional[Timestamp] = None


class CreateBotResponse(BaseModel):
    botId: Optional[Id] = None
    botName: Optional[Name] = None
    description: Optional[Description] = None
    roleArn: Optional[RoleArn] = None
    dataPrivacy: Optional[DataPrivacy] = None
    idleSessionTTLInSeconds: Optional[SessionTTL] = None
    botStatus: Optional[BotStatus] = None
    creationDateTime: Optional[Timestamp] = None
    botTags: Optional[TagMap] = None
    testBotAliasTags: Optional[TagMap] = None


class TextLogSettingsList(BaseModel):
    __root__: Annotated[List[TextLogSetting], Field(max_items=1, min_items=1)]


class CreateBotLocaleResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeName: Optional[LocaleName] = None
    localeId: Optional[LocaleId] = None
    description: Optional[Description] = None
    nluIntentConfidenceThreshold: Optional[ConfidenceThreshold] = None
    voiceSettings: Optional[VoiceSettings] = None
    botLocaleStatus: Optional[BotLocaleStatus] = None
    creationDateTime: Optional[Timestamp] = None


class CreateBotVersionResponse(BaseModel):
    botId: Optional[Id] = None
    description: Optional[Description] = None
    botVersion: Optional[NumericalBotVersion] = None
    botVersionLocaleSpecification: Optional[BotVersionLocaleSpecification] = None
    botStatus: Optional[BotStatus] = None
    creationDateTime: Optional[Timestamp] = None


class BotVersionLocaleDetails(BaseModel):
    """
    The version of a bot used for a bot locale.
    """

    sourceBotVersion: BotVersion


class BotExportSpecification(BaseModel):
    """
    Provides the identity of a the bot that was exported.
    """

    botId: Id
    botVersion: BotVersion


class BotLocaleExportSpecification(BaseModel):
    """
    Provides the bot locale parameters required for exporting a bot locale.
    """

    botId: Id
    botVersion: BotVersion
    localeId: LocaleId


class SampleUtterance(BaseModel):
    """
    A sample utterance that invokes an intent or respond to a slot elicitation prompt.
    """

    utterance: Utterance


class InputContext(BaseModel):
    """
    The name of a context that must be active for an intent to be selected by Amazon Lex.
    """

    name: Name


class OutputContext(BaseModel):
    """
    Describes a session context that is activated when an intent is fulfilled.
    """

    name: Name
    timeToLiveInSeconds: ContextTimeToLiveInSeconds
    turnsToLive: ContextTurnsToLive


class CreateResourcePolicyResponse(BaseModel):
    resourceArn: Optional[AmazonResourceName] = None
    revisionId: Optional[RevisionId] = None


class CreateResourcePolicyStatementResponse(CreateResourcePolicyResponse):
    pass


class Principal(BaseModel):
    """
    The IAM principal that you allowing or denying access to an Amazon Lex action. You must provide a <code>service</code> or an <code>arn</code>, but not both in the same statement. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html"> AWS JSON policy elements: Principal </a>.
    """

    service: Optional[ServicePrincipal] = None
    arn: Optional[PrincipalArn] = None


class SlotDefaultValueSpecification(BaseModel):
    """
    Defines a list of values that Amazon Lex should use as the default value for a slot.
    """

    defaultValueList: SlotDefaultValueList


class SampleUtterancesList(BaseModel):
    __root__: List[SampleUtterance]


class SlotTypeValue(BaseModel):
    """
    Each slot type can have a set of values. Each <code>SlotTypeValue</code> represents a value that the slot type can take.
    """

    sampleValue: Optional[SampleValue] = None
    synonyms: Optional[SynonymList] = None


class SlotValueRegexFilter(BaseModel):
    """
    Provides a regular expression used to validate the value of a slot.
    """

    pattern: RegexPattern


class CreateUploadUrlResponse(BaseModel):
    importId: Optional[Id] = None
    uploadUrl: Optional[PresignedS3Url] = None


class DeleteBotResponse(BaseModel):
    botId: Optional[Id] = None
    botStatus: Optional[BotStatus] = None


class DeleteBotAliasResponse(BaseModel):
    botAliasId: Optional[BotAliasId] = None
    botId: Optional[Id] = None
    botAliasStatus: Optional[BotAliasStatus] = None


class DeleteBotLocaleResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    botLocaleStatus: Optional[BotLocaleStatus] = None


class DeleteBotVersionResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[NumericalBotVersion] = None
    botStatus: Optional[BotStatus] = None


class DeleteExportResponse(BaseModel):
    exportId: Optional[Id] = None
    exportStatus: Optional[ExportStatus] = None


class DeleteImportResponse(BaseModel):
    importId: Optional[Id] = None
    importStatus: Optional[ExportStatus] = None


class DeleteResourcePolicyResponse(CreateResourcePolicyResponse):
    pass


class DeleteResourcePolicyStatementResponse(CreateResourcePolicyResponse):
    pass


class DescribeBotResponse(BaseModel):
    botId: Optional[Id] = None
    botName: Optional[Name] = None
    description: Optional[Description] = None
    roleArn: Optional[RoleArn] = None
    dataPrivacy: Optional[DataPrivacy] = None
    idleSessionTTLInSeconds: Optional[SessionTTL] = None
    botStatus: Optional[BotStatus] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class DescribeResourcePolicyResponse(BaseModel):
    resourceArn: Optional[AmazonResourceName] = None
    policy: Optional[Policy] = None
    revisionId: Optional[RevisionId] = None


class ListBotAliasesResponse(BaseModel):
    botAliasSummaries: Optional[BotAliasSummaryList] = None
    nextToken: Optional[NextToken] = None
    botId: Optional[Id] = None


class ListBotLocalesResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    nextToken: Optional[NextToken] = None
    botLocaleSummaries: Optional[BotLocaleSummaryList] = None


class ListBotVersionsResponse(BaseModel):
    botId: Optional[Id] = None
    botVersionSummaries: Optional[BotVersionSummaryList] = None
    nextToken: Optional[NextToken] = None


class ListBotsResponse(BaseModel):
    botSummaries: Optional[BotSummaryList] = None
    nextToken: Optional[NextToken] = None


class ListBuiltInIntentsResponse(BaseModel):
    builtInIntentSummaries: Optional[BuiltInIntentSummaryList] = None
    nextToken: Optional[NextToken] = None
    localeId: Optional[LocaleId] = None


class ListBuiltInSlotTypesResponse(BaseModel):
    builtInSlotTypeSummaries: Optional[BuiltInSlotTypeSummaryList] = None
    nextToken: Optional[NextToken] = None
    localeId: Optional[LocaleId] = None


class ListImportsResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    importSummaries: Optional[ImportSummaryList] = None
    nextToken: Optional[NextToken] = None


class ListTagsForResourceResponse(BaseModel):
    tags: Optional[TagMap] = None


class BotImportSpecification(BaseModel):
    """
    Provides the bot parameters required for importing a bot.
    """

    botName: Name
    roleArn: RoleArn
    dataPrivacy: DataPrivacy
    idleSessionTTLInSeconds: Optional[SessionTTL] = None
    botTags: Optional[TagMap] = None
    testBotAliasTags: Optional[TagMap] = None


class BotLocaleImportSpecification(BaseModel):
    """
    Provides the bot locale parameters required for importing a bot locale.
    """

    botId: Id
    botVersion: DraftBotVersion
    localeId: LocaleId
    nluIntentConfidenceThreshold: Optional[ConfidenceThreshold] = None
    voiceSettings: Optional[VoiceSettings] = None


class UpdateBotResponse(DescribeBotResponse):
    pass


class SlotPriority(BaseModel):
    """
    Sets the priority that Amazon Lex should use when eliciting slot values from a user.
    """

    priority: PriorityValue
    slotId: Id


class UpdateResourcePolicyResponse(CreateResourcePolicyResponse):
    pass


class S3BucketLogDestination(BaseModel):
    """
    Specifies an Amazon S3 bucket for logging audio conversations
    """

    kmsKeyArn: Optional[KmsKeyArn] = None
    s3BucketArn: S3BucketArn
    logPrefix: LogPrefix


class AudioLogDestination(BaseModel):
    """
    The location of audio log files collected when conversation logging is enabled for a bot.
    """

    s3Bucket: S3BucketLogDestination


class AudioLogSetting(BaseModel):
    """
    Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.
    """

    enabled: Boolean
    destination: AudioLogDestination


class FilterValues(BaseModel):
    __root__: Annotated[List[FilterValue], Field(max_items=1, min_items=1)]


class LambdaCodeHook(BaseModel):
    """
    Specifies a Lambda function that verifies requests to a bot or fulfilles the user's request to a bot.
    """

    lambdaARN: LambdaARN
    codeHookInterfaceVersion: CodeHookInterfaceVersion


class ExportResourceSpecification(BaseModel):
    """
    Provides information about the bot or bot locale that you want to export. You can specify the <code>botExportSpecification</code> or the <code>botLocaleExportSpecification</code>, but not both.
    """

    botExportSpecification: Optional[BotExportSpecification] = None
    botLocaleExportSpecification: Optional[BotLocaleExportSpecification] = None


class CreateExportRequest(BaseModel):
    resourceSpecification: ExportResourceSpecification
    fileFormat: ImportExportFileFormat
    filePassword: Optional[ImportExportFilePassword] = None


class InputContextsList(BaseModel):
    __root__: Annotated[List[InputContext], Field(max_items=5, min_items=0)]


class OutputContextsList(BaseModel):
    __root__: Annotated[List[OutputContext], Field(max_items=10, min_items=0)]


class PrincipalList(BaseModel):
    __root__: List[Principal]


class CreateResourcePolicyStatementRequest(BaseModel):
    statementId: Name
    effect: Effect
    principal: PrincipalList
    action: OperationList
    condition: Optional[ConditionMap] = None


class SlotTypeValues(BaseModel):
    __root__: Annotated[List[SlotTypeValue], Field(max_items=10000, min_items=1)]


class SlotValueSelectionSetting(BaseModel):
    """
    Contains settings used by Amazon Lex to select a slot value.
    """

    resolutionStrategy: SlotValueResolutionStrategy
    regexFilter: Optional[SlotValueRegexFilter] = None


class CreateSlotTypeRequest(BaseModel):
    slotTypeName: Name
    description: Optional[Description] = None
    slotTypeValues: Optional[SlotTypeValues] = None
    valueSelectionSetting: SlotValueSelectionSetting
    parentSlotTypeSignature: Optional[SlotTypeSignature] = None


class FailureReasons(BaseModel):
    __root__: List[FailureReason]


class ImportResourceSpecification(BaseModel):
    """
    Provides information about the bot or bot locale that you want to import. You can sepcifiy the <code>botImportSpecification</code> or the <code>botLocaleImportSpecification</code>, but not both.
    """

    botImportSpecification: Optional[BotImportSpecification] = None
    botLocaleImportSpecification: Optional[BotLocaleImportSpecification] = None


class SlotPrioritiesList(BaseModel):
    __root__: List[SlotPriority]


class ExportSummary(BaseModel):
    """
    Provides summary information about an export in an export list.
    """

    exportId: Optional[Id] = None
    resourceSpecification: Optional[ExportResourceSpecification] = None
    fileFormat: Optional[ImportExportFileFormat] = None
    exportStatus: Optional[ExportStatus] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class ExportSummaryList(BaseModel):
    __root__: List[ExportSummary]


class IntentSummary(BaseModel):
    """
    Summary information about an intent returned by the <code>ListIntents</code> operation.
    """

    intentId: Optional[Id] = None
    intentName: Optional[Name] = None
    description: Optional[Description] = None
    parentIntentSignature: Optional[IntentSignature] = None
    inputContexts: Optional[InputContextsList] = None
    outputContexts: Optional[OutputContextsList] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class IntentSummaryList(BaseModel):
    __root__: List[IntentSummary]


class SlotTypeSummaryList(BaseModel):
    __root__: List[SlotTypeSummary]


class PlainTextMessage(BaseModel):
    """
    Defines an ASCII text message to send to the user.
    """

    value: PlainTextMessageValue


class SSMLMessage(BaseModel):
    """
    Defines a Speech Synthesis Markup Language (SSML) prompt.
    """

    value: SSMLMessageValue


class Message(BaseModel):
    """
    The object that provides message text and it's type.
    """

    plainTextMessage: Optional[PlainTextMessage] = None
    customPayload: Optional[CustomPayload] = None
    ssmlMessage: Optional[SSMLMessage] = None
    imageResponseCard: Optional[ImageResponseCard] = None


class MessageVariationsList(BaseModel):
    __root__: Annotated[List[Message], Field(max_items=2, min_items=0)]


class MessageGroup(BaseModel):
    """
    Provides one or more messages that Amazon Lex should send to the user.
    """

    message: Message
    variations: Optional[MessageVariationsList] = None


class MessageGroupsList(BaseModel):
    __root__: Annotated[List[MessageGroup], Field(max_items=5, min_items=1)]


class StartImportRequest(BaseModel):
    importId: Id
    resourceSpecification: ImportResourceSpecification
    mergeStrategy: MergeStrategy
    filePassword: Optional[ImportExportFilePassword] = None


class StillWaitingResponseSpecification(BaseModel):
    """
    Defines the messages that Amazon Lex sends to a user to remind them that the bot is waiting for a response.
    """

    messageGroups: MessageGroupsList
    frequencyInSeconds: StillWaitingResponseFrequency
    timeoutInSeconds: StillWaitingResponseTimeout
    allowInterrupt: Optional[BoxedBoolean] = None


class UpdateSlotTypeRequest(BaseModel):
    slotTypeName: Name
    description: Optional[Description] = None
    slotTypeValues: Optional[SlotTypeValues] = None
    valueSelectionSetting: SlotValueSelectionSetting
    parentSlotTypeSignature: Optional[SlotTypeSignature] = None


class AudioLogSettingsList(BaseModel):
    __root__: Annotated[List[AudioLogSetting], Field(max_items=1, min_items=1)]


class CreateExportResponse(BaseModel):
    exportId: Optional[Id] = None
    resourceSpecification: Optional[ExportResourceSpecification] = None
    fileFormat: Optional[ImportExportFileFormat] = None
    exportStatus: Optional[ExportStatus] = None
    creationDateTime: Optional[Timestamp] = None


class PromptSpecification(BaseModel):
    """
    Specifies a list of message groups that Amazon Lex sends to a user to elicit a response.
    """

    messageGroups: MessageGroupsList
    maxRetries: PromptMaxRetries
    allowInterrupt: Optional[BoxedBoolean] = None


class ResponseSpecification(BaseModel):
    """
    Specifies a list of message groups that Amazon Lex uses to respond the user input.
    """

    messageGroups: MessageGroupsList
    allowInterrupt: Optional[BoxedBoolean] = None


class WaitAndContinueSpecification(BaseModel):
    """
    Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
    """

    waitingResponse: ResponseSpecification
    continueResponse: ResponseSpecification
    stillWaitingResponse: Optional[StillWaitingResponseSpecification] = None
    active: Optional[BoxedBoolean] = None


class CreateSlotTypeResponse(BaseModel):
    slotTypeId: Optional[Id] = None
    slotTypeName: Optional[Name] = None
    description: Optional[Description] = None
    slotTypeValues: Optional[SlotTypeValues] = None
    valueSelectionSetting: Optional[SlotValueSelectionSetting] = None
    parentSlotTypeSignature: Optional[SlotTypeSignature] = None
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    creationDateTime: Optional[Timestamp] = None


class DescribeBotLocaleResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    localeId: Optional[LocaleId] = None
    localeName: Optional[LocaleName] = None
    description: Optional[Description] = None
    nluIntentConfidenceThreshold: Optional[ConfidenceThreshold] = None
    voiceSettings: Optional[VoiceSettings] = None
    intentsCount: Optional[ResourceCount] = None
    slotTypesCount: Optional[ResourceCount] = None
    botLocaleStatus: Optional[BotLocaleStatus] = None
    failureReasons: Optional[FailureReasons] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None
    lastBuildSubmittedDateTime: Optional[Timestamp] = None
    botLocaleHistoryEvents: Optional[BotLocaleHistoryEventsList] = None


class DescribeBotVersionResponse(BaseModel):
    botId: Optional[Id] = None
    botName: Optional[Name] = None
    botVersion: Optional[NumericalBotVersion] = None
    description: Optional[Description] = None
    roleArn: Optional[RoleArn] = None
    dataPrivacy: Optional[DataPrivacy] = None
    idleSessionTTLInSeconds: Optional[SessionTTL] = None
    botStatus: Optional[BotStatus] = None
    failureReasons: Optional[FailureReasons] = None
    creationDateTime: Optional[Timestamp] = None


class DescribeExportResponse(BaseModel):
    exportId: Optional[Id] = None
    resourceSpecification: Optional[ExportResourceSpecification] = None
    fileFormat: Optional[ImportExportFileFormat] = None
    exportStatus: Optional[ExportStatus] = None
    failureReasons: Optional[FailureReasons] = None
    downloadUrl: Optional[PresignedS3Url] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class DescribeImportResponse(BaseModel):
    importId: Optional[Id] = None
    resourceSpecification: Optional[ImportResourceSpecification] = None
    importedResourceId: Optional[ImportedResourceId] = None
    importedResourceName: Optional[Name] = None
    mergeStrategy: Optional[MergeStrategy] = None
    importStatus: Optional[ExportStatus] = None
    failureReasons: Optional[FailureReasons] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class DescribeSlotTypeResponse(BaseModel):
    slotTypeId: Optional[Id] = None
    slotTypeName: Optional[Name] = None
    description: Optional[Description] = None
    slotTypeValues: Optional[SlotTypeValues] = None
    valueSelectionSetting: Optional[SlotValueSelectionSetting] = None
    parentSlotTypeSignature: Optional[SlotTypeSignature] = None
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    localeId: Optional[LocaleId] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class BotLocaleFilter(BaseModel):
    """
    Filters responses returned by the <code>ListBotLocales</code> operation.
    """

    name: BotLocaleSortAttribute
    values: FilterValues
    operator: BotFilterOperator


class BotFilter(BaseModel):
    """
    Filters the responses returned by the <code>ListBots</code> operation.
    """

    name: BotSortAttribute
    values: FilterValues
    operator: BotFilterOperator


class ListExportsResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    exportSummaries: Optional[ExportSummaryList] = None
    nextToken: Optional[NextToken] = None


class ExportFilter(BaseModel):
    """
    Filtes the response form the operation
    """

    name: ExportFilterName
    values: FilterValues
    operator: BotFilterOperator


class ImportFilter(BaseModel):
    """
    Filters the response from the operation.
    """

    name: ImportFilterName
    values: FilterValues
    operator: BotFilterOperator


class ListIntentsResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    localeId: Optional[LocaleId] = None
    intentSummaries: Optional[IntentSummaryList] = None
    nextToken: Optional[NextToken] = None


class IntentFilter(BaseModel):
    """
    Filters the response from the <code>ListIntents</code> operation.
    """

    name: IntentFilterName
    values: FilterValues
    operator: BotFilterOperator


class ListSlotTypesResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    localeId: Optional[LocaleId] = None
    slotTypeSummaries: Optional[SlotTypeSummaryList] = None
    nextToken: Optional[NextToken] = None


class SlotTypeFilter(BaseModel):
    """
    Filters the response from the <code>ListSlotTypes</code> operation.
    """

    name: SlotTypeFilterName
    values: FilterValues
    operator: BotFilterOperator


class SlotFilter(BaseModel):
    """
    Filters the response from the <code>ListSlots</code> operation.
    """

    name: SlotFilterName
    values: FilterValues
    operator: BotFilterOperator


class StartImportResponse(BaseModel):
    importId: Optional[Id] = None
    resourceSpecification: Optional[ImportResourceSpecification] = None
    mergeStrategy: Optional[MergeStrategy] = None
    importStatus: Optional[ExportStatus] = None
    creationDateTime: Optional[Timestamp] = None


class UpdateBotLocaleResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    localeName: Optional[LocaleName] = None
    description: Optional[Description] = None
    nluIntentConfidenceThreshold: Optional[ConfidenceThreshold] = None
    voiceSettings: Optional[VoiceSettings] = None
    botLocaleStatus: Optional[BotLocaleStatus] = None
    failureReasons: Optional[FailureReasons] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class UpdateExportResponse(ExportSummary):
    pass


class UpdateSlotTypeResponse(BaseModel):
    slotTypeId: Optional[Id] = None
    slotTypeName: Optional[Name] = None
    description: Optional[Description] = None
    slotTypeValues: Optional[SlotTypeValues] = None
    valueSelectionSetting: Optional[SlotValueSelectionSetting] = None
    parentSlotTypeSignature: Optional[SlotTypeSignature] = None
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class CodeHookSpecification(BaseModel):
    """
    Contains information about code hooks that Amazon Lex calls during a conversation.
    """

    lambdaCodeHook: LambdaCodeHook


class BotFilters(BaseModel):
    __root__: Annotated[List[BotFilter], Field(max_items=1, min_items=1)]


class BotLocaleFilters(BaseModel):
    __root__: Annotated[List[BotLocaleFilter], Field(max_items=1, min_items=1)]


class ConversationLogSettings(BaseModel):
    """
    Configures conversation logging that saves audio, text, and metadata for the conversations with your users.
    """

    textLogSettings: Optional[TextLogSettingsList] = None
    audioLogSettings: Optional[AudioLogSettingsList] = None


class CreateBotAliasRequest(BaseModel):
    botAliasName: Name
    description: Optional[Description] = None
    botVersion: Optional[NumericalBotVersion] = None
    botAliasLocaleSettings: Optional[BotAliasLocaleSettingsMap] = None
    conversationLogSettings: Optional[ConversationLogSettings] = None
    sentimentAnalysisSettings: Optional[SentimentAnalysisSettings] = None
    tags: Optional[TagMap] = None


class IntentConfirmationSetting(BaseModel):
    """
    Provides a prompt for making sure that the user is ready for the intent to be fulfilled.
    """

    promptSpecification: PromptSpecification
    declinationResponse: ResponseSpecification
    active: Optional[BoxedBoolean] = None


class IntentClosingSetting(BaseModel):
    """
    Provides a statement the Amazon Lex conveys to the user when the intent is successfully fulfilled.
    """

    closingResponse: ResponseSpecification
    active: Optional[BoxedBoolean] = None


class CreateIntentRequest(BaseModel):
    intentName: Name
    description: Optional[Description] = None
    parentIntentSignature: Optional[IntentSignature] = None
    sampleUtterances: Optional[SampleUtterancesList] = None
    dialogCodeHook: Optional[DialogCodeHookSettings] = None
    fulfillmentCodeHook: Optional[FulfillmentCodeHookSettings] = None
    intentConfirmationSetting: Optional[IntentConfirmationSetting] = None
    intentClosingSetting: Optional[IntentClosingSetting] = None
    inputContexts: Optional[InputContextsList] = None
    outputContexts: Optional[OutputContextsList] = None
    kendraConfiguration: Optional[KendraConfiguration] = None


class SlotValueElicitationSetting(BaseModel):
    """
    Settings that you can use for eliciting a slot value.
    """

    defaultValueSpecification: Optional[SlotDefaultValueSpecification] = None
    slotConstraint: SlotConstraint
    promptSpecification: Optional[PromptSpecification] = None
    sampleUtterances: Optional[SampleUtterancesList] = None
    waitAndContinueSpecification: Optional[WaitAndContinueSpecification] = None


class CreateSlotRequest(BaseModel):
    slotName: Name
    description: Optional[Description] = None
    slotTypeId: BuiltInOrCustomSlotTypeId
    valueElicitationSetting: SlotValueElicitationSetting
    obfuscationSetting: Optional[ObfuscationSetting] = None
    multipleValuesSetting: Optional[MultipleValuesSetting] = None


class ExportFilters(BaseModel):
    __root__: Annotated[List[ExportFilter], Field(max_items=1, min_items=1)]


class ImportFilters(BaseModel):
    __root__: Annotated[List[ImportFilter], Field(max_items=1, min_items=1)]


class IntentFilters(BaseModel):
    __root__: Annotated[List[IntentFilter], Field(max_items=1, min_items=1)]


class ListBotLocalesRequest(BaseModel):
    sortBy: Optional[BotLocaleSortBy] = None
    filters: Optional[BotLocaleFilters] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class ListBotsRequest(BaseModel):
    sortBy: Optional[BotSortBy] = None
    filters: Optional[BotFilters] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class ListExportsRequest(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    sortBy: Optional[ExportSortBy] = None
    filters: Optional[ExportFilters] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class ListImportsRequest(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    sortBy: Optional[ImportSortBy] = None
    filters: Optional[ImportFilters] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class ListIntentsRequest(BaseModel):
    sortBy: Optional[IntentSortBy] = None
    filters: Optional[IntentFilters] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class SlotTypeFilters(BaseModel):
    __root__: Annotated[List[SlotTypeFilter], Field(max_items=1, min_items=1)]


class ListSlotTypesRequest(BaseModel):
    sortBy: Optional[SlotTypeSortBy] = None
    filters: Optional[SlotTypeFilters] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class SlotFilters(BaseModel):
    __root__: Annotated[List[SlotFilter], Field(max_items=1, min_items=1)]


class ListSlotsRequest(BaseModel):
    sortBy: Optional[SlotSortBy] = None
    filters: Optional[SlotFilters] = None
    maxResults: Optional[MaxResults] = None
    nextToken: Optional[NextToken] = None


class SlotSummary(BaseModel):
    """
    Summary information about a slot, a value that the bot elicits from the user.
    """

    slotId: Optional[Id] = None
    slotName: Optional[Name] = None
    description: Optional[Description] = None
    slotConstraint: Optional[SlotConstraint] = None
    slotTypeId: Optional[BuiltInOrCustomSlotTypeId] = None
    valueElicitationPromptSpecification: Optional[PromptSpecification] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class UpdateBotAliasRequest(BaseModel):
    botAliasName: Name
    description: Optional[Description] = None
    botVersion: Optional[BotVersion] = None
    botAliasLocaleSettings: Optional[BotAliasLocaleSettingsMap] = None
    conversationLogSettings: Optional[ConversationLogSettings] = None
    sentimentAnalysisSettings: Optional[SentimentAnalysisSettings] = None


class UpdateIntentRequest(BaseModel):
    intentName: Name
    description: Optional[Description] = None
    parentIntentSignature: Optional[IntentSignature] = None
    sampleUtterances: Optional[SampleUtterancesList] = None
    dialogCodeHook: Optional[DialogCodeHookSettings] = None
    fulfillmentCodeHook: Optional[FulfillmentCodeHookSettings] = None
    slotPriorities: Optional[SlotPrioritiesList] = None
    intentConfirmationSetting: Optional[IntentConfirmationSetting] = None
    intentClosingSetting: Optional[IntentClosingSetting] = None
    inputContexts: Optional[InputContextsList] = None
    outputContexts: Optional[OutputContextsList] = None
    kendraConfiguration: Optional[KendraConfiguration] = None


class UpdateSlotRequest(BaseModel):
    slotName: Name
    description: Optional[Description] = None
    slotTypeId: BuiltInOrCustomSlotTypeId
    valueElicitationSetting: SlotValueElicitationSetting
    obfuscationSetting: Optional[ObfuscationSetting] = None
    multipleValuesSetting: Optional[MultipleValuesSetting] = None


class CreateBotAliasResponse(BaseModel):
    botAliasId: Optional[BotAliasId] = None
    botAliasName: Optional[Name] = None
    description: Optional[Description] = None
    botVersion: Optional[NumericalBotVersion] = None
    botAliasLocaleSettings: Optional[BotAliasLocaleSettingsMap] = None
    conversationLogSettings: Optional[ConversationLogSettings] = None
    sentimentAnalysisSettings: Optional[SentimentAnalysisSettings] = None
    botAliasStatus: Optional[BotAliasStatus] = None
    botId: Optional[Id] = None
    creationDateTime: Optional[Timestamp] = None
    tags: Optional[TagMap] = None


class BotAliasLocaleSettings1(BaseModel):
    """
    Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.
    """

    enabled: Boolean
    codeHookSpecification: Optional[CodeHookSpecification] = None


class CreateIntentResponse(BaseModel):
    intentId: Optional[Id] = None
    intentName: Optional[Name] = None
    description: Optional[Description] = None
    parentIntentSignature: Optional[IntentSignature] = None
    sampleUtterances: Optional[SampleUtterancesList] = None
    dialogCodeHook: Optional[DialogCodeHookSettings] = None
    fulfillmentCodeHook: Optional[FulfillmentCodeHookSettings] = None
    intentConfirmationSetting: Optional[IntentConfirmationSetting] = None
    intentClosingSetting: Optional[IntentClosingSetting] = None
    inputContexts: Optional[InputContextsList] = None
    outputContexts: Optional[OutputContextsList] = None
    kendraConfiguration: Optional[KendraConfiguration] = None
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    creationDateTime: Optional[Timestamp] = None


class CreateSlotResponse(BaseModel):
    slotId: Optional[Id] = None
    slotName: Optional[Name] = None
    description: Optional[Description] = None
    slotTypeId: Optional[BuiltInOrCustomSlotTypeId] = None
    valueElicitationSetting: Optional[SlotValueElicitationSetting] = None
    obfuscationSetting: Optional[ObfuscationSetting] = None
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    intentId: Optional[Id] = None
    creationDateTime: Optional[Timestamp] = None
    multipleValuesSetting: Optional[MultipleValuesSetting] = None


class DescribeBotAliasResponse(BaseModel):
    botAliasId: Optional[BotAliasId] = None
    botAliasName: Optional[Name] = None
    description: Optional[Description] = None
    botVersion: Optional[BotVersion] = None
    botAliasLocaleSettings: Optional[BotAliasLocaleSettingsMap] = None
    conversationLogSettings: Optional[ConversationLogSettings] = None
    sentimentAnalysisSettings: Optional[SentimentAnalysisSettings] = None
    botAliasHistoryEvents: Optional[BotAliasHistoryEventsList] = None
    botAliasStatus: Optional[BotAliasStatus] = None
    botId: Optional[Id] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class DescribeIntentResponse(BaseModel):
    intentId: Optional[Id] = None
    intentName: Optional[Name] = None
    description: Optional[Description] = None
    parentIntentSignature: Optional[IntentSignature] = None
    sampleUtterances: Optional[SampleUtterancesList] = None
    dialogCodeHook: Optional[DialogCodeHookSettings] = None
    fulfillmentCodeHook: Optional[FulfillmentCodeHookSettings] = None
    slotPriorities: Optional[SlotPrioritiesList] = None
    intentConfirmationSetting: Optional[IntentConfirmationSetting] = None
    intentClosingSetting: Optional[IntentClosingSetting] = None
    inputContexts: Optional[InputContextsList] = None
    outputContexts: Optional[OutputContextsList] = None
    kendraConfiguration: Optional[KendraConfiguration] = None
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class DescribeSlotResponse(BaseModel):
    slotId: Optional[Id] = None
    slotName: Optional[Name] = None
    description: Optional[Description] = None
    slotTypeId: Optional[BuiltInOrCustomSlotTypeId] = None
    valueElicitationSetting: Optional[SlotValueElicitationSetting] = None
    obfuscationSetting: Optional[ObfuscationSetting] = None
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    localeId: Optional[LocaleId] = None
    intentId: Optional[Id] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None
    multipleValuesSetting: Optional[MultipleValuesSetting] = None


class UpdateBotAliasResponse(BaseModel):
    botAliasId: Optional[BotAliasId] = None
    botAliasName: Optional[Name] = None
    description: Optional[Description] = None
    botVersion: Optional[BotVersion] = None
    botAliasLocaleSettings: Optional[BotAliasLocaleSettingsMap] = None
    conversationLogSettings: Optional[ConversationLogSettings] = None
    sentimentAnalysisSettings: Optional[SentimentAnalysisSettings] = None
    botAliasStatus: Optional[BotAliasStatus] = None
    botId: Optional[Id] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None


class UpdateIntentResponse(DescribeIntentResponse):
    pass


class UpdateSlotResponse(BaseModel):
    slotId: Optional[Id] = None
    slotName: Optional[Name] = None
    description: Optional[Description] = None
    slotTypeId: Optional[BuiltInOrCustomSlotTypeId] = None
    valueElicitationSetting: Optional[SlotValueElicitationSetting] = None
    obfuscationSetting: Optional[ObfuscationSetting] = None
    botId: Optional[Id] = None
    botVersion: Optional[DraftBotVersion] = None
    localeId: Optional[LocaleId] = None
    intentId: Optional[Id] = None
    creationDateTime: Optional[Timestamp] = None
    lastUpdatedDateTime: Optional[Timestamp] = None
    multipleValuesSetting: Optional[MultipleValuesSetting] = None


class SlotSummaryList(BaseModel):
    __root__: List[SlotSummary]


class ListSlotsResponse(BaseModel):
    botId: Optional[Id] = None
    botVersion: Optional[BotVersion] = None
    localeId: Optional[LocaleId] = None
    intentId: Optional[Id] = None
    slotSummaries: Optional[SlotSummaryList] = None
    nextToken: Optional[NextToken] = None
