import * as core from "@terrascript/core"; export interface MessageArgs extends core.SchemaArgs { content: string | core.StringOut; contentType: string | core.StringOut; groupNumber?: number | core.NumberOut; } export class Message extends core.Schema { @core.attr(String) public content!: string | core.StringOut; @core.attr(String) public contentType!: string | core.StringOut; @core.attr(Number) public groupNumber?: number | core.NumberOut; } export interface ClarificationPromptArgs extends core.SchemaArgs { maxAttempts: number | core.NumberOut; message: core.Array | core.ArrayOut; responseCard?: string | core.StringOut; } export class ClarificationPrompt extends core.Schema { @core.attr(Number) public maxAttempts!: number | core.NumberOut; @core.attr(Message, { kind: "array" }) public message!: core.Array | core.ArrayOut; @core.attr(String) public responseCard?: string | core.StringOut; } export interface IntentArgs extends core.SchemaArgs { intentName: string | core.StringOut; intentVersion: string | core.StringOut; } export class Intent extends core.Schema { @core.attr(String) public intentName!: string | core.StringOut; @core.attr(String) public intentVersion!: string | core.StringOut; } export interface AbortStatementArgs extends core.SchemaArgs { message: core.Array | core.ArrayOut; responseCard?: string | core.StringOut; } export class AbortStatement extends core.Schema { @core.attr(Message, { kind: "array" }) public message!: core.Array | core.ArrayOut; @core.attr(String) public responseCard?: string | core.StringOut; } export interface BotArgs extends core.ResourceArgs { /** * (Required) The message that Amazon Lex uses to abort a conversation. Attributes are documented under * [statement](#statement). */ abortStatement: AbortStatement; /** * (Required) By specifying true, you confirm that your use of Amazon Lex is related to a website, prog * ram, or other application that is directed or targeted, in whole or in part, to children under age 1 * 3 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faq * s#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_ * PutBot.html#lex-PutBot-request-childDirected). */ childDirected: boolean | core.BooleanOut; /** * (Required) The message that Amazon Lex uses when it doesn't understand the user's request. Attribute * s are documented under [prompt](#prompt). */ clarificationPrompt?: ClarificationPrompt; /** * (Optional) Determines if a new bot version is created when the initial resource is created and on ea * ch update. Defaults to `false`. */ createVersion?: boolean | core.BooleanOut; /** * (Optional) A description of the bot. Must be less than or equal to 200 characters in length. */ description?: string | core.StringOut; /** * (Optional) When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If * you don't specify detectSentiment, the default is `false`. */ detectSentiment?: boolean | core.BooleanOut; /** * (Optional) Set to `true` to enable access to natural language understanding improvements. When you s * et the `enable_model_improvements` parameter to true you can use the `nlu_intent_confidence_threshol * d` parameter to configure confidence scores. For more information, see [Confidence Scores](https://d * ocs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enable_model_improve * ments` parameter in certain Regions. If you set the parameter to true, your bot has access to accura * cy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amaz * on.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). */ enableModelImprovements?: boolean | core.BooleanOut; /** * (Optional) The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. * Default is `300`. Must be a number between 60 and 86400 (inclusive). */ idleSessionTtlInSeconds?: number | core.NumberOut; /** * (Required) A set of Intent objects. Each intent represents a command that a user can express. Attrib * utes are documented under [intent](#intent). Can have up to 250 Intent objects. */ intent: core.Array | core.ArrayOut; /** * (Optional) Specifies the target locale for the bot. Any intent used in the bot must be compatible wi * th the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.a * ws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. */ locale?: string | core.StringOut; /** * (Required) The name of the bot that you want to create, case sensitive. Must be between 2 and 50 cha * racters in length. */ name: string | core.StringOut; /** * (Optional) Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.K * endraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. * AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for th * e bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/lat * est/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enable_ * model_improvements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. */ nluIntentConfidenceThreshold?: number | core.NumberOut; /** * (Optional) If you set the `process_behavior` element to `BUILD`, Amazon Lex builds the bot so that i * t can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Defau * lt is `SAVE`. */ processBehavior?: string | core.StringOut; /** * (Optional) The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the * user. The locale configured for the voice must match the locale of the bot. For more information, s * ee [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly * Developer Guide. */ voiceId?: string | core.StringOut; } export class Bot extends core.Resource { /** * (Required) The message that Amazon Lex uses to abort a conversation. Attributes are documented under * [statement](#statement). */ @core.attr(AbortStatement) public abortStatement!: AbortStatement; @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * Checksum identifying the version of the bot that was created. The checksum is not */ @core.attr(String, { computed: true }) public checksum!: string | core.StringOut; /** * (Required) By specifying true, you confirm that your use of Amazon Lex is related to a website, prog * ram, or other application that is directed or targeted, in whole or in part, to children under age 1 * 3 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faq * s#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_ * PutBot.html#lex-PutBot-request-childDirected). */ @core.attr(Boolean) public childDirected!: boolean | core.BooleanOut; /** * (Required) The message that Amazon Lex uses when it doesn't understand the user's request. Attribute * s are documented under [prompt](#prompt). */ @core.attr(ClarificationPrompt) public clarificationPrompt?: ClarificationPrompt; /** * (Optional) Determines if a new bot version is created when the initial resource is created and on ea * ch update. Defaults to `false`. */ @core.attr(Boolean) public createVersion?: boolean | core.BooleanOut; /** * The date when the bot version was created. */ @core.attr(String, { computed: true }) public createdDate!: string | core.StringOut; /** * (Optional) A description of the bot. Must be less than or equal to 200 characters in length. */ @core.attr(String) public description?: string | core.StringOut; /** * (Optional) When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If * you don't specify detectSentiment, the default is `false`. */ @core.attr(Boolean) public detectSentiment?: boolean | core.BooleanOut; /** * (Optional) Set to `true` to enable access to natural language understanding improvements. When you s * et the `enable_model_improvements` parameter to true you can use the `nlu_intent_confidence_threshol * d` parameter to configure confidence scores. For more information, see [Confidence Scores](https://d * ocs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enable_model_improve * ments` parameter in certain Regions. If you set the parameter to true, your bot has access to accura * cy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amaz * on.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). */ @core.attr(Boolean) public enableModelImprovements?: boolean | core.BooleanOut; /** * If status is FAILED, Amazon Lex provides the reason that it failed to build the bot. */ @core.attr(String, { computed: true }) public failureReason!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. * Default is `300`. Must be a number between 60 and 86400 (inclusive). */ @core.attr(Number) public idleSessionTtlInSeconds?: number | core.NumberOut; /** * (Required) A set of Intent objects. Each intent represents a command that a user can express. Attrib * utes are documented under [intent](#intent). Can have up to 250 Intent objects. */ @core.attr(Intent, { kind: "array" }) public intent!: core.Array | core.ArrayOut; /** * The date when the $LATEST version of this bot was updated. */ @core.attr(String, { computed: true }) public lastUpdatedDate!: string | core.StringOut; /** * (Optional) Specifies the target locale for the bot. Any intent used in the bot must be compatible wi * th the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.a * ws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. */ @core.attr(String) public locale?: string | core.StringOut; /** * (Required) The name of the bot that you want to create, case sensitive. Must be between 2 and 50 cha * racters in length. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.K * endraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. * AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for th * e bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/lat * est/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enable_ * model_improvements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. */ @core.attr(Number) public nluIntentConfidenceThreshold?: number | core.NumberOut; /** * (Optional) If you set the `process_behavior` element to `BUILD`, Amazon Lex builds the bot so that i * t can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Defau * lt is `SAVE`. */ @core.attr(String) public processBehavior?: string | core.StringOut; /** * When you send a request to create or update a bot, Amazon Lex sets the status response */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * The version of the bot. */ @core.attr(String, { computed: true }) public version!: string | core.StringOut; /** * (Optional) The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the * user. The locale configured for the voice must match the locale of the bot. For more information, s * ee [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly * Developer Guide. */ @core.attr(String, { computed: true }) public voiceId?: string | core.StringOut; constructor(name: string, args?: BotArgs) { super(name, "aws_lex_bot", args); } public override getNamespace(): string { return "aws_lex"; } }