Class PutIntentRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.lexmodelbuilding.model.LexModelBuildingRequest
-
- software.amazon.awssdk.services.lexmodelbuilding.model.PutIntentRequest
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<PutIntentRequest.Builder,PutIntentRequest>
@Generated("software.amazon.awssdk:codegen") public final class PutIntentRequest extends LexModelBuildingRequest implements ToCopyableBuilder<PutIntentRequest.Builder,PutIntentRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePutIntentRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PutIntentRequest.Builderbuilder()Stringchecksum()Identifies a specific revision of the$LATESTversion.StatementconclusionStatement()The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.PromptconfirmationPrompt()Prompts the user to confirm the intent.BooleancreateVersion()When set totruea new numbered version of the intent is created.Stringdescription()A description of the intent.CodeHookdialogCodeHook()Specifies a Lambda function to invoke for each user input.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)FollowUpPromptfollowUpPrompt()Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent.FulfillmentActivityfulfillmentActivity()Required.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasInputContexts()For responses, this returns true if the service returned a value for the InputContexts property.booleanhasOutputContexts()For responses, this returns true if the service returned a value for the OutputContexts property.booleanhasSampleUtterances()For responses, this returns true if the service returned a value for the SampleUtterances property.booleanhasSlots()For responses, this returns true if the service returned a value for the Slots property.List<InputContext>inputContexts()An array ofInputContextobjects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.KendraConfigurationkendraConfiguration()Configuration information required to use theAMAZON.KendraSearchIntentintent to connect to an Amazon Kendra index.Stringname()The name of the intent.List<OutputContext>outputContexts()An array ofOutputContextobjects that lists the contexts that the intent activates when the intent is fulfilled.StringparentIntentSignature()A unique identifier for the built-in intent to base this intent on.StatementrejectionStatement()When the user answers "no" to the question defined inconfirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.List<String>sampleUtterances()An array of utterances (strings) that a user might say to signal the intent.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends PutIntentRequest.Builder>serializableBuilderClass()List<Slot>slots()An array of intent slots.PutIntentRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
name
public final String name()
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 calledHelpIntent.For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.
- Returns:
- 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 calledHelpIntent.For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.
-
description
public final String description()
A description of the intent.
- Returns:
- A description of the intent.
-
hasSlots
public final boolean hasSlots()
For responses, this returns true if the service returned a value for the Slots property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
slots
public final List<Slot> slots()
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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSlots()method.- Returns:
- 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.
-
hasSampleUtterances
public final boolean hasSampleUtterances()
For responses, this returns true if the service returned a value for the SampleUtterances property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
sampleUtterances
public final List<String> sampleUtterances()
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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSampleUtterances()method.- Returns:
- 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.
-
confirmationPrompt
public final Prompt confirmationPrompt()
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
OrderPizzaintent, 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
rejectionStatementand theconfirmationPrompt, or neither.- Returns:
- 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
OrderPizzaintent, 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
rejectionStatementand theconfirmationPrompt, or neither.
-
rejectionStatement
public final Statement rejectionStatement()
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
rejectionStatementand theconfirmationPrompt, or neither.- Returns:
- 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
rejectionStatementand theconfirmationPrompt, or neither.
-
followUpPrompt
public final FollowUpPrompt followUpPrompt()
Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the
OrderPizzaintent 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
followUpPromptfield and theconclusionStatementfield are mutually exclusive. You can specify only one.- Returns:
- Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after
the
OrderPizzaintent 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
followUpPromptfield and theconclusionStatementfield are mutually exclusive. You can specify only one. -
-
-
conclusionStatement
public final Statement conclusionStatement()
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
followUpPromptandconclusionStatementare mutually exclusive. You can specify only one.- Returns:
- 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
followUpPromptandconclusionStatementare mutually exclusive. You can specify only one.
-
dialogCodeHook
public final CodeHook dialogCodeHook()
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.- Returns:
- 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.
-
fulfillmentActivity
public final FulfillmentActivity fulfillmentActivity()
Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order,
fulfillmentActivitydefines 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).
- Returns:
- Required. Describes how the intent is fulfilled. For example, after a user provides all of the
information for a pizza order,
fulfillmentActivitydefines 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).
-
parentIntentSignature
public final String parentIntentSignature()
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 in the Alexa Skills Kit.
- Returns:
- 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 in the Alexa Skills Kit.
-
checksum
public final String checksum()
Identifies a specific revision of the
$LATESTversion.When you create a new intent, leave the
checksumfield blank. If you specify a checksum you get aBadRequestExceptionexception.When you want to update a intent, set the
checksumfield to the checksum of the most recent revision of the$LATESTversion. If you don't specify thechecksumfield, or if the checksum does not match the$LATESTversion, you get aPreconditionFailedExceptionexception.- Returns:
- Identifies a specific revision of the
$LATESTversion.When you create a new intent, leave the
checksumfield blank. If you specify a checksum you get aBadRequestExceptionexception.When you want to update a intent, set the
checksumfield to the checksum of the most recent revision of the$LATESTversion. If you don't specify thechecksumfield, or if the checksum does not match the$LATESTversion, you get aPreconditionFailedExceptionexception.
-
createVersion
public final Boolean createVersion()
When set to
truea new numbered version of the intent is created. This is the same as calling theCreateIntentVersionoperation. If you do not specifycreateVersion, the default isfalse.- Returns:
- When set to
truea new numbered version of the intent is created. This is the same as calling theCreateIntentVersionoperation. If you do not specifycreateVersion, the default isfalse.
-
kendraConfiguration
public final KendraConfiguration kendraConfiguration()
Configuration information required to use the
AMAZON.KendraSearchIntentintent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.- Returns:
- Configuration information required to use the
AMAZON.KendraSearchIntentintent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.
-
hasInputContexts
public final boolean hasInputContexts()
For responses, this returns true if the service returned a value for the InputContexts property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
inputContexts
public final List<InputContext> inputContexts()
An array of
InputContextobjects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInputContexts()method.- Returns:
- An array of
InputContextobjects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
-
hasOutputContexts
public final boolean hasOutputContexts()
For responses, this returns true if the service returned a value for the OutputContexts property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
outputContexts
public final List<OutputContext> outputContexts()
An array of
OutputContextobjects that lists the contexts that the intent activates when the intent is fulfilled.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasOutputContexts()method.- Returns:
- An array of
OutputContextobjects that lists the contexts that the intent activates when the intent is fulfilled.
-
toBuilder
public PutIntentRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<PutIntentRequest.Builder,PutIntentRequest>- Specified by:
toBuilderin classLexModelBuildingRequest
-
builder
public static PutIntentRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends PutIntentRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkRequest
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-