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 description of the intent. Use the description to help identify the intent in lists.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
11    pub parent_intent_signature: ::std::option::Option<::std::string::String>,
12    /// <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>
13    /// <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>
14    pub sample_utterances: ::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>>,
15    /// <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>
16    /// <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>
17    pub dialog_code_hook: ::std::option::Option<crate::types::DialogCodeHookSettings>,
18    /// <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>
19    /// <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>
20    pub fulfillment_code_hook: ::std::option::Option<crate::types::FulfillmentCodeHookSettings>,
21    /// <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>
22    pub intent_confirmation_setting: ::std::option::Option<crate::types::IntentConfirmationSetting>,
23    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
24    pub intent_closing_setting: ::std::option::Option<crate::types::IntentClosingSetting>,
25    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
26    /// <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>
27    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
28    /// <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>
29    /// <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>
30    pub input_contexts: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>,
31    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
32    /// <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>
33    /// <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>
34    pub output_contexts: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>,
35    /// <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>
36    pub kendra_configuration: ::std::option::Option<crate::types::KendraConfiguration>,
37    /// <p>The identifier of the bot associated with this intent.</p>
38    pub bot_id: ::std::option::Option<::std::string::String>,
39    /// <p>The version of the bot associated with this intent.</p>
40    pub bot_version: ::std::option::Option<::std::string::String>,
41    /// <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>
42    pub locale_id: ::std::option::Option<::std::string::String>,
43    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
44    pub initial_response_setting: ::std::option::Option<crate::types::InitialResponseSetting>,
45    /// <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>
46    pub qn_a_intent_configuration: ::std::option::Option<crate::types::QnAIntentConfiguration>,
47    /// <p>Qinconnect intent configuration details for the create intent request.</p>
48    pub q_in_connect_intent_configuration: ::std::option::Option<crate::types::QInConnectIntentConfiguration>,
49}
50impl CreateIntentInput {
51    /// <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>
52    pub fn intent_name(&self) -> ::std::option::Option<&str> {
53        self.intent_name.as_deref()
54    }
55    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
56    pub fn description(&self) -> ::std::option::Option<&str> {
57        self.description.as_deref()
58    }
59    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
60    pub fn parent_intent_signature(&self) -> ::std::option::Option<&str> {
61        self.parent_intent_signature.as_deref()
62    }
63    /// <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>
64    /// <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>
65    ///
66    /// 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()`.
67    pub fn sample_utterances(&self) -> &[crate::types::SampleUtterance] {
68        self.sample_utterances.as_deref().unwrap_or_default()
69    }
70    /// <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>
71    /// <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>
72    pub fn dialog_code_hook(&self) -> ::std::option::Option<&crate::types::DialogCodeHookSettings> {
73        self.dialog_code_hook.as_ref()
74    }
75    /// <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>
76    /// <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>
77    pub fn fulfillment_code_hook(&self) -> ::std::option::Option<&crate::types::FulfillmentCodeHookSettings> {
78        self.fulfillment_code_hook.as_ref()
79    }
80    /// <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>
81    pub fn intent_confirmation_setting(&self) -> ::std::option::Option<&crate::types::IntentConfirmationSetting> {
82        self.intent_confirmation_setting.as_ref()
83    }
84    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
85    pub fn intent_closing_setting(&self) -> ::std::option::Option<&crate::types::IntentClosingSetting> {
86        self.intent_closing_setting.as_ref()
87    }
88    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
89    /// <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>
90    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
91    /// <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>
92    /// <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>
93    ///
94    /// 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()`.
95    pub fn input_contexts(&self) -> &[crate::types::InputContext] {
96        self.input_contexts.as_deref().unwrap_or_default()
97    }
98    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
99    /// <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>
100    /// <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>
101    ///
102    /// 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()`.
103    pub fn output_contexts(&self) -> &[crate::types::OutputContext] {
104        self.output_contexts.as_deref().unwrap_or_default()
105    }
106    /// <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>
107    pub fn kendra_configuration(&self) -> ::std::option::Option<&crate::types::KendraConfiguration> {
108        self.kendra_configuration.as_ref()
109    }
110    /// <p>The identifier of the bot associated with this intent.</p>
111    pub fn bot_id(&self) -> ::std::option::Option<&str> {
112        self.bot_id.as_deref()
113    }
114    /// <p>The version of the bot associated with this intent.</p>
115    pub fn bot_version(&self) -> ::std::option::Option<&str> {
116        self.bot_version.as_deref()
117    }
118    /// <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>
119    pub fn locale_id(&self) -> ::std::option::Option<&str> {
120        self.locale_id.as_deref()
121    }
122    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
123    pub fn initial_response_setting(&self) -> ::std::option::Option<&crate::types::InitialResponseSetting> {
124        self.initial_response_setting.as_ref()
125    }
126    /// <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>
127    pub fn qn_a_intent_configuration(&self) -> ::std::option::Option<&crate::types::QnAIntentConfiguration> {
128        self.qn_a_intent_configuration.as_ref()
129    }
130    /// <p>Qinconnect intent configuration details for the create intent request.</p>
131    pub fn q_in_connect_intent_configuration(&self) -> ::std::option::Option<&crate::types::QInConnectIntentConfiguration> {
132        self.q_in_connect_intent_configuration.as_ref()
133    }
134}
135impl CreateIntentInput {
136    /// Creates a new builder-style object to manufacture [`CreateIntentInput`](crate::operation::create_intent::CreateIntentInput).
137    pub fn builder() -> crate::operation::create_intent::builders::CreateIntentInputBuilder {
138        crate::operation::create_intent::builders::CreateIntentInputBuilder::default()
139    }
140}
141
142/// A builder for [`CreateIntentInput`](crate::operation::create_intent::CreateIntentInput).
143#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
144#[non_exhaustive]
145pub struct CreateIntentInputBuilder {
146    pub(crate) intent_name: ::std::option::Option<::std::string::String>,
147    pub(crate) description: ::std::option::Option<::std::string::String>,
148    pub(crate) parent_intent_signature: ::std::option::Option<::std::string::String>,
149    pub(crate) sample_utterances: ::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>>,
150    pub(crate) dialog_code_hook: ::std::option::Option<crate::types::DialogCodeHookSettings>,
151    pub(crate) fulfillment_code_hook: ::std::option::Option<crate::types::FulfillmentCodeHookSettings>,
152    pub(crate) intent_confirmation_setting: ::std::option::Option<crate::types::IntentConfirmationSetting>,
153    pub(crate) intent_closing_setting: ::std::option::Option<crate::types::IntentClosingSetting>,
154    pub(crate) input_contexts: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>,
155    pub(crate) output_contexts: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>,
156    pub(crate) kendra_configuration: ::std::option::Option<crate::types::KendraConfiguration>,
157    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
158    pub(crate) bot_version: ::std::option::Option<::std::string::String>,
159    pub(crate) locale_id: ::std::option::Option<::std::string::String>,
160    pub(crate) initial_response_setting: ::std::option::Option<crate::types::InitialResponseSetting>,
161    pub(crate) qn_a_intent_configuration: ::std::option::Option<crate::types::QnAIntentConfiguration>,
162    pub(crate) q_in_connect_intent_configuration: ::std::option::Option<crate::types::QInConnectIntentConfiguration>,
163}
164impl CreateIntentInputBuilder {
165    /// <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>
166    /// This field is required.
167    pub fn intent_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168        self.intent_name = ::std::option::Option::Some(input.into());
169        self
170    }
171    /// <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>
172    pub fn set_intent_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173        self.intent_name = input;
174        self
175    }
176    /// <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>
177    pub fn get_intent_name(&self) -> &::std::option::Option<::std::string::String> {
178        &self.intent_name
179    }
180    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
181    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.description = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
186    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.description = input;
188        self
189    }
190    /// <p>A description of the intent. Use the description to help identify the intent in lists.</p>
191    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
192        &self.description
193    }
194    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
195    pub fn parent_intent_signature(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.parent_intent_signature = ::std::option::Option::Some(input.into());
197        self
198    }
199    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
200    pub fn set_parent_intent_signature(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.parent_intent_signature = input;
202        self
203    }
204    /// <p>A unique identifier for the built-in intent to base this intent on.</p>
205    pub fn get_parent_intent_signature(&self) -> &::std::option::Option<::std::string::String> {
206        &self.parent_intent_signature
207    }
208    /// Appends an item to `sample_utterances`.
209    ///
210    /// To override the contents of this collection use [`set_sample_utterances`](Self::set_sample_utterances).
211    ///
212    /// <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>
213    /// <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>
214    pub fn sample_utterances(mut self, input: crate::types::SampleUtterance) -> Self {
215        let mut v = self.sample_utterances.unwrap_or_default();
216        v.push(input);
217        self.sample_utterances = ::std::option::Option::Some(v);
218        self
219    }
220    /// <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>
221    /// <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>
222    pub fn set_sample_utterances(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>>) -> Self {
223        self.sample_utterances = input;
224        self
225    }
226    /// <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>
227    /// <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>
228    pub fn get_sample_utterances(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SampleUtterance>> {
229        &self.sample_utterances
230    }
231    /// <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>
232    /// <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>
233    pub fn dialog_code_hook(mut self, input: crate::types::DialogCodeHookSettings) -> Self {
234        self.dialog_code_hook = ::std::option::Option::Some(input);
235        self
236    }
237    /// <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>
238    /// <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>
239    pub fn set_dialog_code_hook(mut self, input: ::std::option::Option<crate::types::DialogCodeHookSettings>) -> Self {
240        self.dialog_code_hook = input;
241        self
242    }
243    /// <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>
244    /// <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>
245    pub fn get_dialog_code_hook(&self) -> &::std::option::Option<crate::types::DialogCodeHookSettings> {
246        &self.dialog_code_hook
247    }
248    /// <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>
249    /// <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>
250    pub fn fulfillment_code_hook(mut self, input: crate::types::FulfillmentCodeHookSettings) -> Self {
251        self.fulfillment_code_hook = ::std::option::Option::Some(input);
252        self
253    }
254    /// <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>
255    /// <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>
256    pub fn set_fulfillment_code_hook(mut self, input: ::std::option::Option<crate::types::FulfillmentCodeHookSettings>) -> Self {
257        self.fulfillment_code_hook = input;
258        self
259    }
260    /// <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>
261    /// <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>
262    pub fn get_fulfillment_code_hook(&self) -> &::std::option::Option<crate::types::FulfillmentCodeHookSettings> {
263        &self.fulfillment_code_hook
264    }
265    /// <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>
266    pub fn intent_confirmation_setting(mut self, input: crate::types::IntentConfirmationSetting) -> Self {
267        self.intent_confirmation_setting = ::std::option::Option::Some(input);
268        self
269    }
270    /// <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>
271    pub fn set_intent_confirmation_setting(mut self, input: ::std::option::Option<crate::types::IntentConfirmationSetting>) -> Self {
272        self.intent_confirmation_setting = input;
273        self
274    }
275    /// <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>
276    pub fn get_intent_confirmation_setting(&self) -> &::std::option::Option<crate::types::IntentConfirmationSetting> {
277        &self.intent_confirmation_setting
278    }
279    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
280    pub fn intent_closing_setting(mut self, input: crate::types::IntentClosingSetting) -> Self {
281        self.intent_closing_setting = ::std::option::Option::Some(input);
282        self
283    }
284    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
285    pub fn set_intent_closing_setting(mut self, input: ::std::option::Option<crate::types::IntentClosingSetting>) -> Self {
286        self.intent_closing_setting = input;
287        self
288    }
289    /// <p>Sets the response that Amazon Lex sends to the user when the intent is closed.</p>
290    pub fn get_intent_closing_setting(&self) -> &::std::option::Option<crate::types::IntentClosingSetting> {
291        &self.intent_closing_setting
292    }
293    /// Appends an item to `input_contexts`.
294    ///
295    /// To override the contents of this collection use [`set_input_contexts`](Self::set_input_contexts).
296    ///
297    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
298    /// <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>
299    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
300    /// <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>
301    /// <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>
302    pub fn input_contexts(mut self, input: crate::types::InputContext) -> Self {
303        let mut v = self.input_contexts.unwrap_or_default();
304        v.push(input);
305        self.input_contexts = ::std::option::Option::Some(v);
306        self
307    }
308    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
309    /// <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>
310    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
311    /// <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>
312    /// <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>
313    pub fn set_input_contexts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>) -> Self {
314        self.input_contexts = input;
315        self
316    }
317    /// <p>A list of contexts that must be active for this intent to be considered by Amazon Lex.</p>
318    /// <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>
319    /// <p>A context can be automatically activated using the <code>outputContexts</code> property or it can be set at runtime.</p>
320    /// <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>
321    /// <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>
322    pub fn get_input_contexts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputContext>> {
323        &self.input_contexts
324    }
325    /// Appends an item to `output_contexts`.
326    ///
327    /// To override the contents of this collection use [`set_output_contexts`](Self::set_output_contexts).
328    ///
329    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
330    /// <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>
331    /// <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>
332    pub fn output_contexts(mut self, input: crate::types::OutputContext) -> Self {
333        let mut v = self.output_contexts.unwrap_or_default();
334        v.push(input);
335        self.output_contexts = ::std::option::Option::Some(v);
336        self
337    }
338    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
339    /// <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>
340    /// <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>
341    pub fn set_output_contexts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>) -> Self {
342        self.output_contexts = input;
343        self
344    }
345    /// <p>A lists of contexts that the intent activates when it is fulfilled.</p>
346    /// <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>
347    /// <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>
348    pub fn get_output_contexts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OutputContext>> {
349        &self.output_contexts
350    }
351    /// <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>
352    pub fn kendra_configuration(mut self, input: crate::types::KendraConfiguration) -> Self {
353        self.kendra_configuration = ::std::option::Option::Some(input);
354        self
355    }
356    /// <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>
357    pub fn set_kendra_configuration(mut self, input: ::std::option::Option<crate::types::KendraConfiguration>) -> Self {
358        self.kendra_configuration = input;
359        self
360    }
361    /// <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>
362    pub fn get_kendra_configuration(&self) -> &::std::option::Option<crate::types::KendraConfiguration> {
363        &self.kendra_configuration
364    }
365    /// <p>The identifier of the bot associated with this intent.</p>
366    /// This field is required.
367    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
368        self.bot_id = ::std::option::Option::Some(input.into());
369        self
370    }
371    /// <p>The identifier of the bot associated with this intent.</p>
372    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
373        self.bot_id = input;
374        self
375    }
376    /// <p>The identifier of the bot associated with this intent.</p>
377    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
378        &self.bot_id
379    }
380    /// <p>The version of the bot associated with this intent.</p>
381    /// This field is required.
382    pub fn bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
383        self.bot_version = ::std::option::Option::Some(input.into());
384        self
385    }
386    /// <p>The version of the bot associated with this intent.</p>
387    pub fn set_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
388        self.bot_version = input;
389        self
390    }
391    /// <p>The version of the bot associated with this intent.</p>
392    pub fn get_bot_version(&self) -> &::std::option::Option<::std::string::String> {
393        &self.bot_version
394    }
395    /// <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>
396    /// This field is required.
397    pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
398        self.locale_id = ::std::option::Option::Some(input.into());
399        self
400    }
401    /// <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>
402    pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
403        self.locale_id = input;
404        self
405    }
406    /// <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>
407    pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
408        &self.locale_id
409    }
410    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
411    pub fn initial_response_setting(mut self, input: crate::types::InitialResponseSetting) -> Self {
412        self.initial_response_setting = ::std::option::Option::Some(input);
413        self
414    }
415    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
416    pub fn set_initial_response_setting(mut self, input: ::std::option::Option<crate::types::InitialResponseSetting>) -> Self {
417        self.initial_response_setting = input;
418        self
419    }
420    /// <p>Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.</p>
421    pub fn get_initial_response_setting(&self) -> &::std::option::Option<crate::types::InitialResponseSetting> {
422        &self.initial_response_setting
423    }
424    /// <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>
425    pub fn qn_a_intent_configuration(mut self, input: crate::types::QnAIntentConfiguration) -> Self {
426        self.qn_a_intent_configuration = ::std::option::Option::Some(input);
427        self
428    }
429    /// <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>
430    pub fn set_qn_a_intent_configuration(mut self, input: ::std::option::Option<crate::types::QnAIntentConfiguration>) -> Self {
431        self.qn_a_intent_configuration = input;
432        self
433    }
434    /// <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>
435    pub fn get_qn_a_intent_configuration(&self) -> &::std::option::Option<crate::types::QnAIntentConfiguration> {
436        &self.qn_a_intent_configuration
437    }
438    /// <p>Qinconnect intent configuration details for the create intent request.</p>
439    pub fn q_in_connect_intent_configuration(mut self, input: crate::types::QInConnectIntentConfiguration) -> Self {
440        self.q_in_connect_intent_configuration = ::std::option::Option::Some(input);
441        self
442    }
443    /// <p>Qinconnect intent configuration details for the create intent request.</p>
444    pub fn set_q_in_connect_intent_configuration(mut self, input: ::std::option::Option<crate::types::QInConnectIntentConfiguration>) -> Self {
445        self.q_in_connect_intent_configuration = input;
446        self
447    }
448    /// <p>Qinconnect intent configuration details for the create intent request.</p>
449    pub fn get_q_in_connect_intent_configuration(&self) -> &::std::option::Option<crate::types::QInConnectIntentConfiguration> {
450        &self.q_in_connect_intent_configuration
451    }
452    /// Consumes the builder and constructs a [`CreateIntentInput`](crate::operation::create_intent::CreateIntentInput).
453    pub fn build(
454        self,
455    ) -> ::std::result::Result<crate::operation::create_intent::CreateIntentInput, ::aws_smithy_types::error::operation::BuildError> {
456        ::std::result::Result::Ok(crate::operation::create_intent::CreateIntentInput {
457            intent_name: self.intent_name,
458            description: self.description,
459            parent_intent_signature: self.parent_intent_signature,
460            sample_utterances: self.sample_utterances,
461            dialog_code_hook: self.dialog_code_hook,
462            fulfillment_code_hook: self.fulfillment_code_hook,
463            intent_confirmation_setting: self.intent_confirmation_setting,
464            intent_closing_setting: self.intent_closing_setting,
465            input_contexts: self.input_contexts,
466            output_contexts: self.output_contexts,
467            kendra_configuration: self.kendra_configuration,
468            bot_id: self.bot_id,
469            bot_version: self.bot_version,
470            locale_id: self.locale_id,
471            initial_response_setting: self.initial_response_setting,
472            qn_a_intent_configuration: self.qn_a_intent_configuration,
473            q_in_connect_intent_configuration: self.q_in_connect_intent_configuration,
474        })
475    }
476}