#[non_exhaustive]pub struct PutIntentInput {Show 16 fields
pub name: Option<String>,
pub description: Option<String>,
pub slots: Option<Vec<Slot>>,
pub sample_utterances: Option<Vec<String>>,
pub confirmation_prompt: Option<Prompt>,
pub rejection_statement: Option<Statement>,
pub follow_up_prompt: Option<FollowUpPrompt>,
pub conclusion_statement: Option<Statement>,
pub dialog_code_hook: Option<CodeHook>,
pub fulfillment_activity: Option<FulfillmentActivity>,
pub parent_intent_signature: Option<String>,
pub checksum: Option<String>,
pub create_version: Option<bool>,
pub kendra_configuration: Option<KendraConfiguration>,
pub input_contexts: Option<Vec<InputContext>>,
pub output_contexts: Option<Vec<OutputContext>>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<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.
description: Option<String>A description of the intent.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
output_contexts: Option<Vec<OutputContext>>An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
Implementations§
Source§impl PutIntentInput
impl PutIntentInput
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
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.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description of the intent.
Sourcepub fn slots(&self) -> &[Slot]
pub fn slots(&self) -> &[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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .slots.is_none().
Sourcepub fn sample_utterances(&self) -> &[String]
pub fn sample_utterances(&self) -> &[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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .sample_utterances.is_none().
Sourcepub fn confirmation_prompt(&self) -> Option<&Prompt>
pub fn confirmation_prompt(&self) -> 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.
Sourcepub fn rejection_statement(&self) -> Option<&Statement>
pub fn rejection_statement(&self) -> 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.
Sourcepub fn follow_up_prompt(&self) -> Option<&FollowUpPrompt>
pub fn follow_up_prompt(&self) -> 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.
Sourcepub fn conclusion_statement(&self) -> Option<&Statement>
pub fn conclusion_statement(&self) -> 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.
Sourcepub fn dialog_code_hook(&self) -> Option<&CodeHook>
pub fn dialog_code_hook(&self) -> 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.
Sourcepub fn fulfillment_activity(&self) -> Option<&FulfillmentActivity>
pub fn fulfillment_activity(&self) -> 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).
Sourcepub fn parent_intent_signature(&self) -> Option<&str>
pub fn parent_intent_signature(&self) -> Option<&str>
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.
Sourcepub fn checksum(&self) -> Option<&str>
pub fn checksum(&self) -> Option<&str>
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.
Sourcepub fn create_version(&self) -> Option<bool>
pub fn create_version(&self) -> 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.
Sourcepub fn kendra_configuration(&self) -> Option<&KendraConfiguration>
pub fn kendra_configuration(&self) -> Option<&KendraConfiguration>
Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.
Sourcepub fn input_contexts(&self) -> &[InputContext]
pub fn input_contexts(&self) -> &[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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .input_contexts.is_none().
Sourcepub fn output_contexts(&self) -> &[OutputContext]
pub fn output_contexts(&self) -> &[OutputContext]
An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .output_contexts.is_none().
Source§impl PutIntentInput
impl PutIntentInput
Sourcepub fn builder() -> PutIntentInputBuilder
pub fn builder() -> PutIntentInputBuilder
Creates a new builder-style object to manufacture PutIntentInput.
Trait Implementations§
Source§impl Clone for PutIntentInput
impl Clone for PutIntentInput
Source§fn clone(&self) -> PutIntentInput
fn clone(&self) -> PutIntentInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PutIntentInput
impl Debug for PutIntentInput
Source§impl PartialEq for PutIntentInput
impl PartialEq for PutIntentInput
impl StructuralPartialEq for PutIntentInput
Auto Trait Implementations§
impl Freeze for PutIntentInput
impl RefUnwindSafe for PutIntentInput
impl Send for PutIntentInput
impl Sync for PutIntentInput
impl Unpin for PutIntentInput
impl UnwindSafe for PutIntentInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);