commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutIntentRequest.kt Maven / Gradle / Ivy
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexmodelbuildingservice.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutIntentRequest private constructor(builder: Builder) {
/**
* Identifies a specific revision of the `$LATEST` version.
*
* When you create a new intent, leave the `checksum` field blank. If you specify a checksum you get a `BadRequestException` exception.
*
* When you want to update a intent, set the `checksum` field to the checksum of the most recent revision of the `$LATEST` version. If you don't specify the ` checksum` field, or if the checksum does not match the `$LATEST` version, you get a `PreconditionFailedException` exception.
*/
public val checksum: kotlin.String? = builder.checksum
/**
* The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.
*
* This element is relevant only if you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client application, you can't specify this element.
*
* The `followUpPrompt` and `conclusionStatement` are mutually exclusive. You can specify only one.
*/
public val conclusionStatement: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement? = builder.conclusionStatement
/**
* Prompts the user to confirm the intent. This question should have a yes or no answer.
*
* Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the `OrderPizza` intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
*
* You you must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
*/
public val confirmationPrompt: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Prompt? = builder.confirmationPrompt
/**
* When set to `true` a new numbered version of the intent is created. This is the same as calling the `CreateIntentVersion` operation. If you do not specify `createVersion`, the default is `false`.
*/
public val createVersion: kotlin.Boolean? = builder.createVersion
/**
* A description of the intent.
*/
public val description: kotlin.String? = builder.description
/**
* Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.
*
* For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, `GlutenIntolerant`, to true. You might find John's phone number and set the corresponding session attribute.
*/
public val dialogCodeHook: aws.sdk.kotlin.services.lexmodelbuildingservice.model.CodeHook? = builder.dialogCodeHook
/**
* Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the `OrderPizza` intent is fulfilled, you might prompt the user to order a drink.
*
* The action that Amazon Lex takes depends on the user's response, as follows:
* + If the user says "Yes" it responds with the clarification prompt that is configured for the bot.
* + if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.
* + If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.
* + If it doesn't recognize the utterance it repeats the follow-up prompt again.
*
* The `followUpPrompt` field and the `conclusionStatement` field are mutually exclusive. You can specify only one.
*/
public val followUpPrompt: aws.sdk.kotlin.services.lexmodelbuildingservice.model.FollowUpPrompt? = builder.followUpPrompt
/**
* Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot places an order with a local pizza store.
*
* You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).
*/
public val fulfillmentActivity: aws.sdk.kotlin.services.lexmodelbuildingservice.model.FulfillmentActivity? = builder.fulfillmentActivity
/**
* An array of `InputContext` objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
*/
public val inputContexts: List? = builder.inputContexts
/**
* Configuration information required to use the `AMAZON.KendraSearchIntent` intent to connect to an Amazon Kendra index. For more information, see [ AMAZON.KendraSearchIntent](http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html).
*/
public val kendraConfiguration: aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration? = builder.kendraConfiguration
/**
* The name of the intent. The name is *not* case sensitive.
*
* The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called `AMAZON.HelpIntent`, you can't create a custom intent called `HelpIntent`.
*
* For a list of built-in intents, see [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) in the *Alexa Skills Kit*.
*/
public val name: kotlin.String? = builder.name
/**
* An array of `OutputContext` objects that lists the contexts that the intent activates when the intent is fulfilled.
*/
public val outputContexts: List? = builder.outputContexts
/**
* A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) in the *Alexa Skills Kit*.
*/
public val parentIntentSignature: kotlin.String? = builder.parentIntentSignature
/**
* When the user answers "no" to the question defined in `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
*
* You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
*/
public val rejectionStatement: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement? = builder.rejectionStatement
/**
* An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
*
* In each utterance, a slot name is enclosed in curly braces.
*/
public val sampleUtterances: List? = builder.sampleUtterances
/**
* An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.
*/
public val slots: List? = builder.slots
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutIntentRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutIntentRequest(")
append("checksum=$checksum,")
append("conclusionStatement=$conclusionStatement,")
append("confirmationPrompt=$confirmationPrompt,")
append("createVersion=$createVersion,")
append("description=$description,")
append("dialogCodeHook=$dialogCodeHook,")
append("followUpPrompt=$followUpPrompt,")
append("fulfillmentActivity=$fulfillmentActivity,")
append("inputContexts=$inputContexts,")
append("kendraConfiguration=$kendraConfiguration,")
append("name=$name,")
append("outputContexts=$outputContexts,")
append("parentIntentSignature=$parentIntentSignature,")
append("rejectionStatement=$rejectionStatement,")
append("sampleUtterances=$sampleUtterances,")
append("slots=$slots")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = checksum?.hashCode() ?: 0
result = 31 * result + (conclusionStatement?.hashCode() ?: 0)
result = 31 * result + (confirmationPrompt?.hashCode() ?: 0)
result = 31 * result + (createVersion?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (dialogCodeHook?.hashCode() ?: 0)
result = 31 * result + (followUpPrompt?.hashCode() ?: 0)
result = 31 * result + (fulfillmentActivity?.hashCode() ?: 0)
result = 31 * result + (inputContexts?.hashCode() ?: 0)
result = 31 * result + (kendraConfiguration?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (outputContexts?.hashCode() ?: 0)
result = 31 * result + (parentIntentSignature?.hashCode() ?: 0)
result = 31 * result + (rejectionStatement?.hashCode() ?: 0)
result = 31 * result + (sampleUtterances?.hashCode() ?: 0)
result = 31 * result + (slots?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as PutIntentRequest
if (checksum != other.checksum) return false
if (conclusionStatement != other.conclusionStatement) return false
if (confirmationPrompt != other.confirmationPrompt) return false
if (createVersion != other.createVersion) return false
if (description != other.description) return false
if (dialogCodeHook != other.dialogCodeHook) return false
if (followUpPrompt != other.followUpPrompt) return false
if (fulfillmentActivity != other.fulfillmentActivity) return false
if (inputContexts != other.inputContexts) return false
if (kendraConfiguration != other.kendraConfiguration) return false
if (name != other.name) return false
if (outputContexts != other.outputContexts) return false
if (parentIntentSignature != other.parentIntentSignature) return false
if (rejectionStatement != other.rejectionStatement) return false
if (sampleUtterances != other.sampleUtterances) return false
if (slots != other.slots) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutIntentRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Identifies a specific revision of the `$LATEST` version.
*
* When you create a new intent, leave the `checksum` field blank. If you specify a checksum you get a `BadRequestException` exception.
*
* When you want to update a intent, set the `checksum` field to the checksum of the most recent revision of the `$LATEST` version. If you don't specify the ` checksum` field, or if the checksum does not match the `$LATEST` version, you get a `PreconditionFailedException` exception.
*/
public var checksum: kotlin.String? = null
/**
* The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.
*
* This element is relevant only if you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client application, you can't specify this element.
*
* The `followUpPrompt` and `conclusionStatement` are mutually exclusive. You can specify only one.
*/
public var conclusionStatement: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement? = null
/**
* Prompts the user to confirm the intent. This question should have a yes or no answer.
*
* Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the `OrderPizza` intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
*
* You you must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
*/
public var confirmationPrompt: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Prompt? = null
/**
* When set to `true` a new numbered version of the intent is created. This is the same as calling the `CreateIntentVersion` operation. If you do not specify `createVersion`, the default is `false`.
*/
public var createVersion: kotlin.Boolean? = null
/**
* A description of the intent.
*/
public var description: kotlin.String? = null
/**
* Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.
*
* For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, `GlutenIntolerant`, to true. You might find John's phone number and set the corresponding session attribute.
*/
public var dialogCodeHook: aws.sdk.kotlin.services.lexmodelbuildingservice.model.CodeHook? = null
/**
* Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the `OrderPizza` intent is fulfilled, you might prompt the user to order a drink.
*
* The action that Amazon Lex takes depends on the user's response, as follows:
* + If the user says "Yes" it responds with the clarification prompt that is configured for the bot.
* + if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.
* + If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.
* + If it doesn't recognize the utterance it repeats the follow-up prompt again.
*
* The `followUpPrompt` field and the `conclusionStatement` field are mutually exclusive. You can specify only one.
*/
public var followUpPrompt: aws.sdk.kotlin.services.lexmodelbuildingservice.model.FollowUpPrompt? = null
/**
* Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot places an order with a local pizza store.
*
* You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).
*/
public var fulfillmentActivity: aws.sdk.kotlin.services.lexmodelbuildingservice.model.FulfillmentActivity? = null
/**
* An array of `InputContext` objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
*/
public var inputContexts: List? = null
/**
* Configuration information required to use the `AMAZON.KendraSearchIntent` intent to connect to an Amazon Kendra index. For more information, see [ AMAZON.KendraSearchIntent](http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html).
*/
public var kendraConfiguration: aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration? = null
/**
* The name of the intent. The name is *not* case sensitive.
*
* The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called `AMAZON.HelpIntent`, you can't create a custom intent called `HelpIntent`.
*
* For a list of built-in intents, see [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) in the *Alexa Skills Kit*.
*/
public var name: kotlin.String? = null
/**
* An array of `OutputContext` objects that lists the contexts that the intent activates when the intent is fulfilled.
*/
public var outputContexts: List? = null
/**
* A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) in the *Alexa Skills Kit*.
*/
public var parentIntentSignature: kotlin.String? = null
/**
* When the user answers "no" to the question defined in `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
*
* You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
*/
public var rejectionStatement: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement? = null
/**
* An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
*
* In each utterance, a slot name is enclosed in curly braces.
*/
public var sampleUtterances: List? = null
/**
* An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.
*/
public var slots: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutIntentRequest) : this() {
this.checksum = x.checksum
this.conclusionStatement = x.conclusionStatement
this.confirmationPrompt = x.confirmationPrompt
this.createVersion = x.createVersion
this.description = x.description
this.dialogCodeHook = x.dialogCodeHook
this.followUpPrompt = x.followUpPrompt
this.fulfillmentActivity = x.fulfillmentActivity
this.inputContexts = x.inputContexts
this.kendraConfiguration = x.kendraConfiguration
this.name = x.name
this.outputContexts = x.outputContexts
this.parentIntentSignature = x.parentIntentSignature
this.rejectionStatement = x.rejectionStatement
this.sampleUtterances = x.sampleUtterances
this.slots = x.slots
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutIntentRequest = PutIntentRequest(this)
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement] inside the given [block]
*/
public fun conclusionStatement(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement.Builder.() -> kotlin.Unit) {
this.conclusionStatement = aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.Prompt] inside the given [block]
*/
public fun confirmationPrompt(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Prompt.Builder.() -> kotlin.Unit) {
this.confirmationPrompt = aws.sdk.kotlin.services.lexmodelbuildingservice.model.Prompt.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.CodeHook] inside the given [block]
*/
public fun dialogCodeHook(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.CodeHook.Builder.() -> kotlin.Unit) {
this.dialogCodeHook = aws.sdk.kotlin.services.lexmodelbuildingservice.model.CodeHook.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.FollowUpPrompt] inside the given [block]
*/
public fun followUpPrompt(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.FollowUpPrompt.Builder.() -> kotlin.Unit) {
this.followUpPrompt = aws.sdk.kotlin.services.lexmodelbuildingservice.model.FollowUpPrompt.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.FulfillmentActivity] inside the given [block]
*/
public fun fulfillmentActivity(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.FulfillmentActivity.Builder.() -> kotlin.Unit) {
this.fulfillmentActivity = aws.sdk.kotlin.services.lexmodelbuildingservice.model.FulfillmentActivity.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration] inside the given [block]
*/
public fun kendraConfiguration(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration.Builder.() -> kotlin.Unit) {
this.kendraConfiguration = aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement] inside the given [block]
*/
public fun rejectionStatement(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement.Builder.() -> kotlin.Unit) {
this.rejectionStatement = aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy