Struct rusoto_lex_models::PutIntentRequest
source · [−]pub struct PutIntentRequest {Show 16 fields
pub checksum: Option<String>,
pub conclusion_statement: Option<Statement>,
pub confirmation_prompt: Option<Prompt>,
pub create_version: Option<bool>,
pub description: Option<String>,
pub dialog_code_hook: Option<CodeHook>,
pub follow_up_prompt: Option<FollowUpPrompt>,
pub fulfillment_activity: Option<FulfillmentActivity>,
pub input_contexts: Option<Vec<InputContext>>,
pub kendra_configuration: Option<KendraConfiguration>,
pub name: String,
pub output_contexts: Option<Vec<OutputContext>>,
pub parent_intent_signature: Option<String>,
pub rejection_statement: Option<Statement>,
pub sample_utterances: Option<Vec<String>>,
pub slots: Option<Vec<Slot>>,
}
Fields
checksum: Option<String>
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.
conclusion_statement: Option<Statement>
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.
confirmation_prompt: Option<Prompt>
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.
create_version: Option<bool>
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
.
description: Option<String>
A description of the intent.
dialog_code_hook: Option<CodeHook>
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.
follow_up_prompt: Option<FollowUpPrompt>
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.
fulfillment_activity: Option<FulfillmentActivity>
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).
input_contexts: Option<Vec<InputContext>>
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.
kendra_configuration: Option<KendraConfiguration>
Configuration information required to use the AMAZON.KendraSearchIntent
intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.
name: String
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 in the Alexa Skills Kit.
output_contexts: Option<Vec<OutputContext>>
An array of OutputContext
objects that lists the contexts that the intent activates when the intent is fulfilled.
parent_intent_signature: Option<String>
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.
rejection_statement: Option<Statement>
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.
sample_utterances: Option<Vec<String>>
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.
slots: Option<Vec<Slot>>
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.
Trait Implementations
sourceimpl Clone for PutIntentRequest
impl Clone for PutIntentRequest
sourcefn clone(&self) -> PutIntentRequest
fn clone(&self) -> PutIntentRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PutIntentRequest
impl Debug for PutIntentRequest
sourceimpl Default for PutIntentRequest
impl Default for PutIntentRequest
sourcefn default() -> PutIntentRequest
fn default() -> PutIntentRequest
Returns the “default value” for a type. Read more
sourceimpl PartialEq<PutIntentRequest> for PutIntentRequest
impl PartialEq<PutIntentRequest> for PutIntentRequest
sourcefn eq(&self, other: &PutIntentRequest) -> bool
fn eq(&self, other: &PutIntentRequest) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PutIntentRequest) -> bool
fn ne(&self, other: &PutIntentRequest) -> bool
This method tests for !=
.
sourceimpl Serialize for PutIntentRequest
impl Serialize for PutIntentRequest
impl StructuralPartialEq for PutIntentRequest
Auto Trait Implementations
impl RefUnwindSafe for PutIntentRequest
impl Send for PutIntentRequest
impl Sync for PutIntentRequest
impl Unpin for PutIntentRequest
impl UnwindSafe for PutIntentRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more