aws_sdk_lexmodelbuilding/client/
put_intent.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`PutIntent`](crate::operation::put_intent::builders::PutIntentFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_name):<br>required: **true**<br><p>The name of the intent. The name is <i>not</i> case sensitive.</p> <p>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 <code>AMAZON.HelpIntent</code>, you can't create a custom intent called <code>HelpIntent</code>.</p> <p>For a list of built-in intents, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents">Standard Built-in Intents</a> in the <i>Alexa Skills Kit</i>.</p><br>
7    ///   - [`description(impl Into<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_description):<br>required: **false**<br><p>A description of the intent.</p><br>
8    ///   - [`slots(Slot)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::slots) / [`set_slots(Option<Vec::<Slot>>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_slots):<br>required: **false**<br><p>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 <code>how-it-works</code>.</p><br>
9    ///   - [`sample_utterances(impl Into<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::sample_utterances) / [`set_sample_utterances(Option<Vec::<String>>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_sample_utterances):<br>required: **false**<br><p>An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".</p> <p>In each utterance, a slot name is enclosed in curly braces.</p><br>
10    ///   - [`confirmation_prompt(Prompt)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::confirmation_prompt) / [`set_confirmation_prompt(Option<Prompt>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_confirmation_prompt):<br>required: **false**<br><p>Prompts the user to confirm the intent. This question should have a yes or no answer.</p> <p>Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the <code>OrderPizza</code> 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.</p><note>  <p>You you must provide both the <code>rejectionStatement</code> and the <code>confirmationPrompt</code>, or neither.</p> </note><br>
11    ///   - [`rejection_statement(Statement)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::rejection_statement) / [`set_rejection_statement(Option<Statement>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_rejection_statement):<br>required: **false**<br><p>When the user answers "no" to the question defined in <code>confirmationPrompt</code>, Amazon Lex responds with this statement to acknowledge that the intent was canceled.</p><note>  <p>You must provide both the <code>rejectionStatement</code> and the <code>confirmationPrompt</code>, or neither.</p> </note><br>
12    ///   - [`follow_up_prompt(FollowUpPrompt)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::follow_up_prompt) / [`set_follow_up_prompt(Option<FollowUpPrompt>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_follow_up_prompt):<br>required: **false**<br><p>Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the <code>OrderPizza</code> intent is fulfilled, you might prompt the user to order a drink.</p> <p>The action that Amazon Lex takes depends on the user's response, as follows:</p> <ul>  <li>   <p>If the user says "Yes" it responds with the clarification prompt that is configured for the bot.</p></li>  <li>   <p>if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.</p></li>  <li>   <p>If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.</p></li>  <li>   <p>If it doesn't recognize the utterance it repeats the follow-up prompt again.</p></li> </ul> <p>The <code>followUpPrompt</code> field and the <code>conclusionStatement</code> field are mutually exclusive. You can specify only one.</p><br>
13    ///   - [`conclusion_statement(Statement)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::conclusion_statement) / [`set_conclusion_statement(Option<Statement>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_conclusion_statement):<br>required: **false**<br><p>The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.</p> <p>This element is relevant only if you provide a Lambda function in the <code>fulfillmentActivity</code>. If you return the intent to the client application, you can't specify this element.</p><note>  <p>The <code>followUpPrompt</code> and <code>conclusionStatement</code> are mutually exclusive. You can specify only one.</p> </note><br>
14    ///   - [`dialog_code_hook(CodeHook)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::dialog_code_hook) / [`set_dialog_code_hook(Option<CodeHook>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_dialog_code_hook):<br>required: **false**<br><p>Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.</p> <p>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, <code>GlutenIntolerant</code>, to true. You might find John's phone number and set the corresponding session attribute.</p><br>
15    ///   - [`fulfillment_activity(FulfillmentActivity)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::fulfillment_activity) / [`set_fulfillment_activity(Option<FulfillmentActivity>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_fulfillment_activity):<br>required: **false**<br><p>Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, <code>fulfillmentActivity</code> defines how the bot places an order with a local pizza store.</p> <p>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).</p><br>
16    ///   - [`parent_intent_signature(impl Into<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::parent_intent_signature) / [`set_parent_intent_signature(Option<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_parent_intent_signature):<br>required: **false**<br><p>A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents">Standard Built-in Intents</a> in the <i>Alexa Skills Kit</i>.</p><br>
17    ///   - [`checksum(impl Into<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::checksum) / [`set_checksum(Option<String>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_checksum):<br>required: **false**<br><p>Identifies a specific revision of the <code>$LATEST</code> version.</p> <p>When you create a new intent, leave the <code>checksum</code> field blank. If you specify a checksum you get a <code>BadRequestException</code> exception.</p> <p>When you want to update a intent, set the <code>checksum</code> field to the checksum of the most recent revision of the <code>$LATEST</code> version. If you don't specify the <code> checksum</code> field, or if the checksum does not match the <code>$LATEST</code> version, you get a <code>PreconditionFailedException</code> exception.</p><br>
18    ///   - [`create_version(bool)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::create_version) / [`set_create_version(Option<bool>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_create_version):<br>required: **false**<br><p>When set to <code>true</code> a new numbered version of the intent is created. This is the same as calling the <code>CreateIntentVersion</code> operation. If you do not specify <code>createVersion</code>, the default is <code>false</code>.</p><br>
19    ///   - [`kendra_configuration(KendraConfiguration)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::kendra_configuration) / [`set_kendra_configuration(Option<KendraConfiguration>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_kendra_configuration):<br>required: **false**<br><p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. For more information, see <a href="http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html"> AMAZON.KendraSearchIntent</a>.</p><br>
20    ///   - [`input_contexts(InputContext)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::input_contexts) / [`set_input_contexts(Option<Vec::<InputContext>>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_input_contexts):<br>required: **false**<br><p>An array of <code>InputContext</code> objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.</p><br>
21    ///   - [`output_contexts(OutputContext)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::output_contexts) / [`set_output_contexts(Option<Vec::<OutputContext>>)`](crate::operation::put_intent::builders::PutIntentFluentBuilder::set_output_contexts):<br>required: **false**<br><p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p><br>
22    /// - On success, responds with [`PutIntentOutput`](crate::operation::put_intent::PutIntentOutput) with field(s):
23    ///   - [`name(Option<String>)`](crate::operation::put_intent::PutIntentOutput::name): <p>The name of the intent.</p>
24    ///   - [`description(Option<String>)`](crate::operation::put_intent::PutIntentOutput::description): <p>A description of the intent.</p>
25    ///   - [`slots(Option<Vec::<Slot>>)`](crate::operation::put_intent::PutIntentOutput::slots): <p>An array of intent slots that are configured for the intent.</p>
26    ///   - [`sample_utterances(Option<Vec::<String>>)`](crate::operation::put_intent::PutIntentOutput::sample_utterances): <p>An array of sample utterances that are configured for the intent.</p>
27    ///   - [`confirmation_prompt(Option<Prompt>)`](crate::operation::put_intent::PutIntentOutput::confirmation_prompt): <p>If defined in the intent, Amazon Lex prompts the user to confirm the intent before fulfilling it.</p>
28    ///   - [`rejection_statement(Option<Statement>)`](crate::operation::put_intent::PutIntentOutput::rejection_statement): <p>If the user answers "no" to the question defined in <code>confirmationPrompt</code> Amazon Lex responds with this statement to acknowledge that the intent was canceled.</p>
29    ///   - [`follow_up_prompt(Option<FollowUpPrompt>)`](crate::operation::put_intent::PutIntentOutput::follow_up_prompt): <p>If defined in the intent, Amazon Lex uses this prompt to solicit additional user activity after the intent is fulfilled.</p>
30    ///   - [`conclusion_statement(Option<Statement>)`](crate::operation::put_intent::PutIntentOutput::conclusion_statement): <p>After the Lambda function specified in the<code>fulfillmentActivity</code>intent fulfills the intent, Amazon Lex conveys this statement to the user.</p>
31    ///   - [`dialog_code_hook(Option<CodeHook>)`](crate::operation::put_intent::PutIntentOutput::dialog_code_hook): <p>If defined in the intent, Amazon Lex invokes this Lambda function for each user input.</p>
32    ///   - [`fulfillment_activity(Option<FulfillmentActivity>)`](crate::operation::put_intent::PutIntentOutput::fulfillment_activity): <p>If defined in the intent, Amazon Lex invokes this Lambda function to fulfill the intent after the user provides all of the information required by the intent.</p>
33    ///   - [`parent_intent_signature(Option<String>)`](crate::operation::put_intent::PutIntentOutput::parent_intent_signature): <p>A unique identifier for the built-in intent that this intent is based on.</p>
34    ///   - [`last_updated_date(Option<DateTime>)`](crate::operation::put_intent::PutIntentOutput::last_updated_date): <p>The date that the intent was updated. When you create a resource, the creation date and last update dates are the same.</p>
35    ///   - [`created_date(Option<DateTime>)`](crate::operation::put_intent::PutIntentOutput::created_date): <p>The date that the intent was created.</p>
36    ///   - [`version(Option<String>)`](crate::operation::put_intent::PutIntentOutput::version): <p>The version of the intent. For a new intent, the version is always <code>$LATEST</code>.</p>
37    ///   - [`checksum(Option<String>)`](crate::operation::put_intent::PutIntentOutput::checksum): <p>Checksum of the <code>$LATEST</code>version of the intent created or updated.</p>
38    ///   - [`create_version(Option<bool>)`](crate::operation::put_intent::PutIntentOutput::create_version): <p><code>True</code> if a new version of the intent was created. If the <code>createVersion</code> field was not specified in the request, the <code>createVersion</code> field is set to false in the response.</p>
39    ///   - [`kendra_configuration(Option<KendraConfiguration>)`](crate::operation::put_intent::PutIntentOutput::kendra_configuration): <p>Configuration information, if any, required to connect to an Amazon Kendra index and use the <code>AMAZON.KendraSearchIntent</code> intent.</p>
40    ///   - [`input_contexts(Option<Vec::<InputContext>>)`](crate::operation::put_intent::PutIntentOutput::input_contexts): <p>An array of <code>InputContext</code> objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.</p>
41    ///   - [`output_contexts(Option<Vec::<OutputContext>>)`](crate::operation::put_intent::PutIntentOutput::output_contexts): <p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>
42    /// - On failure, responds with [`SdkError<PutIntentError>`](crate::operation::put_intent::PutIntentError)
43    pub fn put_intent(&self) -> crate::operation::put_intent::builders::PutIntentFluentBuilder {
44        crate::operation::put_intent::builders::PutIntentFluentBuilder::new(self.handle.clone())
45    }
46}