aws_sdk_lexmodelsv2/operation/create_intent/
_create_intent_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateIntentInput {
6    /// <p>The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.</p>
7    pub intent_name: ::std::option::Option<::std::string::String>,
8    /// <p>A display name for the intent. If configured, This name will be shown to users during Intent Disambiguation instead of the intent name. Display names should be user-friendly, descriptive and match the intent's purpose to improve user experience during disambiguation.</p>
9    pub intent_display_name: ::std::option::Option<::std::string::String>,
10    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
13    pub parent_intent_signature: ::std::option::Option<::std::string::String>,
14    /// <p>An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".</p>
15    /// <p>In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..</p>
16    pub sample_utterances: ::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>>,
17    /// <p>Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.</p>
18    /// <p>For example, suppose that your bot determines that the user's name is John. You 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 <code>true</code>. You might find John's phone number and set the corresponding session attribute.</p>
19    pub dialog_code_hook: ::std::option::Option<crate::types::DialogCodeHookSettings>,
20    /// <p>Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.</p>
21    /// <p>For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.</p>
22    pub fulfillment_code_hook: ::std::option::Option<crate::types::FulfillmentCodeHookSettings>,
23    /// <p>Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.</p>
24    pub intent_confirmation_setting: ::std::option::Option<crate::types::IntentConfirmationSetting>,
25    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
26    pub intent_closing_setting: ::std::option::Option<crate::types::IntentClosingSetting>,
27    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
28    /// <p>When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.</p>
29    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
30    /// <p>For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.</p>
31    /// <p>An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.</p>
32    pub input_contexts: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>,
33    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
34    /// <p>You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.</p>
35    /// <p>When you use the <code>outputContextsList</code> property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.</p>
36    pub output_contexts: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>,
37    /// <p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. The <code>AMAZON.KendraSearchIntent</code> intent is called when Amazon Lex can't determine another intent to invoke.</p>
38    pub kendra_configuration: ::std::option::Option<crate::types::KendraConfiguration>,
39    /// <p>The identifier of the bot associated with this intent.</p>
40    pub bot_id: ::std::option::Option<::std::string::String>,
41    /// <p>The version of the bot associated with this intent.</p>
42    pub bot_version: ::std::option::Option<::std::string::String>,
43    /// <p>The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
44    pub locale_id: ::std::option::Option<::std::string::String>,
45    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
46    pub initial_response_setting: ::std::option::Option<crate::types::InitialResponseSetting>,
47    /// <p>Specifies the configuration of the built-in <code>Amazon.QnAIntent</code>. The <code>AMAZON.QnAIntent</code> intent is called when Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the <code>kendraConfiguration</code> field.</p>
48    pub qn_a_intent_configuration: ::std::option::Option<crate::types::QnAIntentConfiguration>,
49    /// <p>Qinconnect intent configuration details for the create intent request.</p>
50    pub q_in_connect_intent_configuration: ::std::option::Option<crate::types::QInConnectIntentConfiguration>,
51}
52impl CreateIntentInput {
53    /// <p>The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.</p>
54    pub fn intent_name(&self) -> ::std::option::Option<&str> {
55        self.intent_name.as_deref()
56    }
57    /// <p>A display name for the intent. If configured, This name will be shown to users during Intent Disambiguation instead of the intent name. Display names should be user-friendly, descriptive and match the intent's purpose to improve user experience during disambiguation.</p>
58    pub fn intent_display_name(&self) -> ::std::option::Option<&str> {
59        self.intent_display_name.as_deref()
60    }
61    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
62    pub fn description(&self) -> ::std::option::Option<&str> {
63        self.description.as_deref()
64    }
65    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
66    pub fn parent_intent_signature(&self) -> ::std::option::Option<&str> {
67        self.parent_intent_signature.as_deref()
68    }
69    /// <p>An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".</p>
70    /// <p>In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..</p>
71    ///
72    /// 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()`.
73    pub fn sample_utterances(&self) -> &[crate::types::SampleUtterance] {
74        self.sample_utterances.as_deref().unwrap_or_default()
75    }
76    /// <p>Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.</p>
77    /// <p>For example, suppose that your bot determines that the user's name is John. You 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 <code>true</code>. You might find John's phone number and set the corresponding session attribute.</p>
78    pub fn dialog_code_hook(&self) -> ::std::option::Option<&crate::types::DialogCodeHookSettings> {
79        self.dialog_code_hook.as_ref()
80    }
81    /// <p>Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.</p>
82    /// <p>For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.</p>
83    pub fn fulfillment_code_hook(&self) -> ::std::option::Option<&crate::types::FulfillmentCodeHookSettings> {
84        self.fulfillment_code_hook.as_ref()
85    }
86    /// <p>Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.</p>
87    pub fn intent_confirmation_setting(&self) -> ::std::option::Option<&crate::types::IntentConfirmationSetting> {
88        self.intent_confirmation_setting.as_ref()
89    }
90    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
91    pub fn intent_closing_setting(&self) -> ::std::option::Option<&crate::types::IntentClosingSetting> {
92        self.intent_closing_setting.as_ref()
93    }
94    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
95    /// <p>When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.</p>
96    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
97    /// <p>For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.</p>
98    /// <p>An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.</p>
99    ///
100    /// 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()`.
101    pub fn input_contexts(&self) -> &[crate::types::InputContext] {
102        self.input_contexts.as_deref().unwrap_or_default()
103    }
104    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
105    /// <p>You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.</p>
106    /// <p>When you use the <code>outputContextsList</code> property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.</p>
107    ///
108    /// 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()`.
109    pub fn output_contexts(&self) -> &[crate::types::OutputContext] {
110        self.output_contexts.as_deref().unwrap_or_default()
111    }
112    /// <p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. The <code>AMAZON.KendraSearchIntent</code> intent is called when Amazon Lex can't determine another intent to invoke.</p>
113    pub fn kendra_configuration(&self) -> ::std::option::Option<&crate::types::KendraConfiguration> {
114        self.kendra_configuration.as_ref()
115    }
116    /// <p>The identifier of the bot associated with this intent.</p>
117    pub fn bot_id(&self) -> ::std::option::Option<&str> {
118        self.bot_id.as_deref()
119    }
120    /// <p>The version of the bot associated with this intent.</p>
121    pub fn bot_version(&self) -> ::std::option::Option<&str> {
122        self.bot_version.as_deref()
123    }
124    /// <p>The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
125    pub fn locale_id(&self) -> ::std::option::Option<&str> {
126        self.locale_id.as_deref()
127    }
128    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
129    pub fn initial_response_setting(&self) -> ::std::option::Option<&crate::types::InitialResponseSetting> {
130        self.initial_response_setting.as_ref()
131    }
132    /// <p>Specifies the configuration of the built-in <code>Amazon.QnAIntent</code>. The <code>AMAZON.QnAIntent</code> intent is called when Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the <code>kendraConfiguration</code> field.</p>
133    pub fn qn_a_intent_configuration(&self) -> ::std::option::Option<&crate::types::QnAIntentConfiguration> {
134        self.qn_a_intent_configuration.as_ref()
135    }
136    /// <p>Qinconnect intent configuration details for the create intent request.</p>
137    pub fn q_in_connect_intent_configuration(&self) -> ::std::option::Option<&crate::types::QInConnectIntentConfiguration> {
138        self.q_in_connect_intent_configuration.as_ref()
139    }
140}
141impl CreateIntentInput {
142    /// Creates a new builder-style object to manufacture [`CreateIntentInput`](crate::operation::create_intent::CreateIntentInput).
143    pub fn builder() -> crate::operation::create_intent::builders::CreateIntentInputBuilder {
144        crate::operation::create_intent::builders::CreateIntentInputBuilder::default()
145    }
146}
147
148/// A builder for [`CreateIntentInput`](crate::operation::create_intent::CreateIntentInput).
149#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
150#[non_exhaustive]
151pub struct CreateIntentInputBuilder {
152    pub(crate) intent_name: ::std::option::Option<::std::string::String>,
153    pub(crate) intent_display_name: ::std::option::Option<::std::string::String>,
154    pub(crate) description: ::std::option::Option<::std::string::String>,
155    pub(crate) parent_intent_signature: ::std::option::Option<::std::string::String>,
156    pub(crate) sample_utterances: ::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>>,
157    pub(crate) dialog_code_hook: ::std::option::Option<crate::types::DialogCodeHookSettings>,
158    pub(crate) fulfillment_code_hook: ::std::option::Option<crate::types::FulfillmentCodeHookSettings>,
159    pub(crate) intent_confirmation_setting: ::std::option::Option<crate::types::IntentConfirmationSetting>,
160    pub(crate) intent_closing_setting: ::std::option::Option<crate::types::IntentClosingSetting>,
161    pub(crate) input_contexts: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>,
162    pub(crate) output_contexts: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>,
163    pub(crate) kendra_configuration: ::std::option::Option<crate::types::KendraConfiguration>,
164    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
165    pub(crate) bot_version: ::std::option::Option<::std::string::String>,
166    pub(crate) locale_id: ::std::option::Option<::std::string::String>,
167    pub(crate) initial_response_setting: ::std::option::Option<crate::types::InitialResponseSetting>,
168    pub(crate) qn_a_intent_configuration: ::std::option::Option<crate::types::QnAIntentConfiguration>,
169    pub(crate) q_in_connect_intent_configuration: ::std::option::Option<crate::types::QInConnectIntentConfiguration>,
170}
171impl CreateIntentInputBuilder {
172    /// <p>The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.</p>
173    /// This field is required.
174    pub fn intent_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        self.intent_name = ::std::option::Option::Some(input.into());
176        self
177    }
178    /// <p>The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.</p>
179    pub fn set_intent_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.intent_name = input;
181        self
182    }
183    /// <p>The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.</p>
184    pub fn get_intent_name(&self) -> &::std::option::Option<::std::string::String> {
185        &self.intent_name
186    }
187    /// <p>A display name for the intent. If configured, This name will be shown to users during Intent Disambiguation instead of the intent name. Display names should be user-friendly, descriptive and match the intent's purpose to improve user experience during disambiguation.</p>
188    pub fn intent_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.intent_display_name = ::std::option::Option::Some(input.into());
190        self
191    }
192    /// <p>A display name for the intent. If configured, This name will be shown to users during Intent Disambiguation instead of the intent name. Display names should be user-friendly, descriptive and match the intent's purpose to improve user experience during disambiguation.</p>
193    pub fn set_intent_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.intent_display_name = input;
195        self
196    }
197    /// <p>A display name for the intent. If configured, This name will be shown to users during Intent Disambiguation instead of the intent name. Display names should be user-friendly, descriptive and match the intent's purpose to improve user experience during disambiguation.</p>
198    pub fn get_intent_display_name(&self) -> &::std::option::Option<::std::string::String> {
199        &self.intent_display_name
200    }
201    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
202    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.description = ::std::option::Option::Some(input.into());
204        self
205    }
206    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
207    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.description = input;
209        self
210    }
211    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
212    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
213        &self.description
214    }
215    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
216    pub fn parent_intent_signature(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.parent_intent_signature = ::std::option::Option::Some(input.into());
218        self
219    }
220    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
221    pub fn set_parent_intent_signature(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.parent_intent_signature = input;
223        self
224    }
225    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
226    pub fn get_parent_intent_signature(&self) -> &::std::option::Option<::std::string::String> {
227        &self.parent_intent_signature
228    }
229    /// Appends an item to `sample_utterances`.
230    ///
231    /// To override the contents of this collection use [`set_sample_utterances`](Self::set_sample_utterances).
232    ///
233    /// <p>An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".</p>
234    /// <p>In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..</p>
235    pub fn sample_utterances(mut self, input: crate::types::SampleUtterance) -> Self {
236        let mut v = self.sample_utterances.unwrap_or_default();
237        v.push(input);
238        self.sample_utterances = ::std::option::Option::Some(v);
239        self
240    }
241    /// <p>An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".</p>
242    /// <p>In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..</p>
243    pub fn set_sample_utterances(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>>) -> Self {
244        self.sample_utterances = input;
245        self
246    }
247    /// <p>An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".</p>
248    /// <p>In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..</p>
249    pub fn get_sample_utterances(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>> {
250        &self.sample_utterances
251    }
252    /// <p>Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.</p>
253    /// <p>For example, suppose that your bot determines that the user's name is John. You 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 <code>true</code>. You might find John's phone number and set the corresponding session attribute.</p>
254    pub fn dialog_code_hook(mut self, input: crate::types::DialogCodeHookSettings) -> Self {
255        self.dialog_code_hook = ::std::option::Option::Some(input);
256        self
257    }
258    /// <p>Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.</p>
259    /// <p>For example, suppose that your bot determines that the user's name is John. You 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 <code>true</code>. You might find John's phone number and set the corresponding session attribute.</p>
260    pub fn set_dialog_code_hook(mut self, input: ::std::option::Option<crate::types::DialogCodeHookSettings>) -> Self {
261        self.dialog_code_hook = input;
262        self
263    }
264    /// <p>Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.</p>
265    /// <p>For example, suppose that your bot determines that the user's name is John. You 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 <code>true</code>. You might find John's phone number and set the corresponding session attribute.</p>
266    pub fn get_dialog_code_hook(&self) -> &::std::option::Option<crate::types::DialogCodeHookSettings> {
267        &self.dialog_code_hook
268    }
269    /// <p>Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.</p>
270    /// <p>For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.</p>
271    pub fn fulfillment_code_hook(mut self, input: crate::types::FulfillmentCodeHookSettings) -> Self {
272        self.fulfillment_code_hook = ::std::option::Option::Some(input);
273        self
274    }
275    /// <p>Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.</p>
276    /// <p>For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.</p>
277    pub fn set_fulfillment_code_hook(mut self, input: ::std::option::Option<crate::types::FulfillmentCodeHookSettings>) -> Self {
278        self.fulfillment_code_hook = input;
279        self
280    }
281    /// <p>Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.</p>
282    /// <p>For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.</p>
283    pub fn get_fulfillment_code_hook(&self) -> &::std::option::Option<crate::types::FulfillmentCodeHookSettings> {
284        &self.fulfillment_code_hook
285    }
286    /// <p>Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.</p>
287    pub fn intent_confirmation_setting(mut self, input: crate::types::IntentConfirmationSetting) -> Self {
288        self.intent_confirmation_setting = ::std::option::Option::Some(input);
289        self
290    }
291    /// <p>Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.</p>
292    pub fn set_intent_confirmation_setting(mut self, input: ::std::option::Option<crate::types::IntentConfirmationSetting>) -> Self {
293        self.intent_confirmation_setting = input;
294        self
295    }
296    /// <p>Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.</p>
297    pub fn get_intent_confirmation_setting(&self) -> &::std::option::Option<crate::types::IntentConfirmationSetting> {
298        &self.intent_confirmation_setting
299    }
300    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
301    pub fn intent_closing_setting(mut self, input: crate::types::IntentClosingSetting) -> Self {
302        self.intent_closing_setting = ::std::option::Option::Some(input);
303        self
304    }
305    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
306    pub fn set_intent_closing_setting(mut self, input: ::std::option::Option<crate::types::IntentClosingSetting>) -> Self {
307        self.intent_closing_setting = input;
308        self
309    }
310    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
311    pub fn get_intent_closing_setting(&self) -> &::std::option::Option<crate::types::IntentClosingSetting> {
312        &self.intent_closing_setting
313    }
314    /// Appends an item to `input_contexts`.
315    ///
316    /// To override the contents of this collection use [`set_input_contexts`](Self::set_input_contexts).
317    ///
318    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
319    /// <p>When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.</p>
320    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
321    /// <p>For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.</p>
322    /// <p>An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.</p>
323    pub fn input_contexts(mut self, input: crate::types::InputContext) -> Self {
324        let mut v = self.input_contexts.unwrap_or_default();
325        v.push(input);
326        self.input_contexts = ::std::option::Option::Some(v);
327        self
328    }
329    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
330    /// <p>When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.</p>
331    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
332    /// <p>For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.</p>
333    /// <p>An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.</p>
334    pub fn set_input_contexts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>) -> Self {
335        self.input_contexts = input;
336        self
337    }
338    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
339    /// <p>When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.</p>
340    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
341    /// <p>For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.</p>
342    /// <p>An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.</p>
343    pub fn get_input_contexts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputContext>> {
344        &self.input_contexts
345    }
346    /// Appends an item to `output_contexts`.
347    ///
348    /// To override the contents of this collection use [`set_output_contexts`](Self::set_output_contexts).
349    ///
350    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
351    /// <p>You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.</p>
352    /// <p>When you use the <code>outputContextsList</code> property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.</p>
353    pub fn output_contexts(mut self, input: crate::types::OutputContext) -> Self {
354        let mut v = self.output_contexts.unwrap_or_default();
355        v.push(input);
356        self.output_contexts = ::std::option::Option::Some(v);
357        self
358    }
359    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
360    /// <p>You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.</p>
361    /// <p>When you use the <code>outputContextsList</code> property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.</p>
362    pub fn set_output_contexts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>) -> Self {
363        self.output_contexts = input;
364        self
365    }
366    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
367    /// <p>You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.</p>
368    /// <p>When you use the <code>outputContextsList</code> property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.</p>
369    pub fn get_output_contexts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OutputContext>> {
370        &self.output_contexts
371    }
372    /// <p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. The <code>AMAZON.KendraSearchIntent</code> intent is called when Amazon Lex can't determine another intent to invoke.</p>
373    pub fn kendra_configuration(mut self, input: crate::types::KendraConfiguration) -> Self {
374        self.kendra_configuration = ::std::option::Option::Some(input);
375        self
376    }
377    /// <p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. The <code>AMAZON.KendraSearchIntent</code> intent is called when Amazon Lex can't determine another intent to invoke.</p>
378    pub fn set_kendra_configuration(mut self, input: ::std::option::Option<crate::types::KendraConfiguration>) -> Self {
379        self.kendra_configuration = input;
380        self
381    }
382    /// <p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. The <code>AMAZON.KendraSearchIntent</code> intent is called when Amazon Lex can't determine another intent to invoke.</p>
383    pub fn get_kendra_configuration(&self) -> &::std::option::Option<crate::types::KendraConfiguration> {
384        &self.kendra_configuration
385    }
386    /// <p>The identifier of the bot associated with this intent.</p>
387    /// This field is required.
388    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
389        self.bot_id = ::std::option::Option::Some(input.into());
390        self
391    }
392    /// <p>The identifier of the bot associated with this intent.</p>
393    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
394        self.bot_id = input;
395        self
396    }
397    /// <p>The identifier of the bot associated with this intent.</p>
398    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
399        &self.bot_id
400    }
401    /// <p>The version of the bot associated with this intent.</p>
402    /// This field is required.
403    pub fn bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
404        self.bot_version = ::std::option::Option::Some(input.into());
405        self
406    }
407    /// <p>The version of the bot associated with this intent.</p>
408    pub fn set_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
409        self.bot_version = input;
410        self
411    }
412    /// <p>The version of the bot associated with this intent.</p>
413    pub fn get_bot_version(&self) -> &::std::option::Option<::std::string::String> {
414        &self.bot_version
415    }
416    /// <p>The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
417    /// This field is required.
418    pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
419        self.locale_id = ::std::option::Option::Some(input.into());
420        self
421    }
422    /// <p>The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
423    pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
424        self.locale_id = input;
425        self
426    }
427    /// <p>The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
428    pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
429        &self.locale_id
430    }
431    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
432    pub fn initial_response_setting(mut self, input: crate::types::InitialResponseSetting) -> Self {
433        self.initial_response_setting = ::std::option::Option::Some(input);
434        self
435    }
436    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
437    pub fn set_initial_response_setting(mut self, input: ::std::option::Option<crate::types::InitialResponseSetting>) -> Self {
438        self.initial_response_setting = input;
439        self
440    }
441    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
442    pub fn get_initial_response_setting(&self) -> &::std::option::Option<crate::types::InitialResponseSetting> {
443        &self.initial_response_setting
444    }
445    /// <p>Specifies the configuration of the built-in <code>Amazon.QnAIntent</code>. The <code>AMAZON.QnAIntent</code> intent is called when Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the <code>kendraConfiguration</code> field.</p>
446    pub fn qn_a_intent_configuration(mut self, input: crate::types::QnAIntentConfiguration) -> Self {
447        self.qn_a_intent_configuration = ::std::option::Option::Some(input);
448        self
449    }
450    /// <p>Specifies the configuration of the built-in <code>Amazon.QnAIntent</code>. The <code>AMAZON.QnAIntent</code> intent is called when Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the <code>kendraConfiguration</code> field.</p>
451    pub fn set_qn_a_intent_configuration(mut self, input: ::std::option::Option<crate::types::QnAIntentConfiguration>) -> Self {
452        self.qn_a_intent_configuration = input;
453        self
454    }
455    /// <p>Specifies the configuration of the built-in <code>Amazon.QnAIntent</code>. The <code>AMAZON.QnAIntent</code> intent is called when Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the <code>kendraConfiguration</code> field.</p>
456    pub fn get_qn_a_intent_configuration(&self) -> &::std::option::Option<crate::types::QnAIntentConfiguration> {
457        &self.qn_a_intent_configuration
458    }
459    /// <p>Qinconnect intent configuration details for the create intent request.</p>
460    pub fn q_in_connect_intent_configuration(mut self, input: crate::types::QInConnectIntentConfiguration) -> Self {
461        self.q_in_connect_intent_configuration = ::std::option::Option::Some(input);
462        self
463    }
464    /// <p>Qinconnect intent configuration details for the create intent request.</p>
465    pub fn set_q_in_connect_intent_configuration(mut self, input: ::std::option::Option<crate::types::QInConnectIntentConfiguration>) -> Self {
466        self.q_in_connect_intent_configuration = input;
467        self
468    }
469    /// <p>Qinconnect intent configuration details for the create intent request.</p>
470    pub fn get_q_in_connect_intent_configuration(&self) -> &::std::option::Option<crate::types::QInConnectIntentConfiguration> {
471        &self.q_in_connect_intent_configuration
472    }
473    /// Consumes the builder and constructs a [`CreateIntentInput`](crate::operation::create_intent::CreateIntentInput).
474    pub fn build(
475        self,
476    ) -> ::std::result::Result<crate::operation::create_intent::CreateIntentInput, ::aws_smithy_types::error::operation::BuildError> {
477        ::std::result::Result::Ok(crate::operation::create_intent::CreateIntentInput {
478            intent_name: self.intent_name,
479            intent_display_name: self.intent_display_name,
480            description: self.description,
481            parent_intent_signature: self.parent_intent_signature,
482            sample_utterances: self.sample_utterances,
483            dialog_code_hook: self.dialog_code_hook,
484            fulfillment_code_hook: self.fulfillment_code_hook,
485            intent_confirmation_setting: self.intent_confirmation_setting,
486            intent_closing_setting: self.intent_closing_setting,
487            input_contexts: self.input_contexts,
488            output_contexts: self.output_contexts,
489            kendra_configuration: self.kendra_configuration,
490            bot_id: self.bot_id,
491            bot_version: self.bot_version,
492            locale_id: self.locale_id,
493            initial_response_setting: self.initial_response_setting,
494            qn_a_intent_configuration: self.qn_a_intent_configuration,
495            q_in_connect_intent_configuration: self.q_in_connect_intent_configuration,
496        })
497    }
498}