aws-sdk-lexmodelbuilding 1.99.0

AWS SDK for Amazon Lex Model Building Service
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[deprecated(note = "Amazon Lex V1 is deprecated. Use Amazon Lex V2 instead.", since = "2025-09-08")]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutIntentInput {
    /// <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>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the intent.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <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>
    pub slots: ::std::option::Option<::std::vec::Vec<crate::types::Slot>>,
    /// <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>
    pub sample_utterances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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>
    pub confirmation_prompt: ::std::option::Option<crate::types::Prompt>,
    /// <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>
    pub rejection_statement: ::std::option::Option<crate::types::Statement>,
    /// <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>
    pub follow_up_prompt: ::std::option::Option<crate::types::FollowUpPrompt>,
    /// <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>
    pub conclusion_statement: ::std::option::Option<crate::types::Statement>,
    /// <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>
    pub dialog_code_hook: ::std::option::Option<crate::types::CodeHook>,
    /// <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>
    pub fulfillment_activity: ::std::option::Option<crate::types::FulfillmentActivity>,
    /// <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>
    pub parent_intent_signature: ::std::option::Option<::std::string::String>,
    /// <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>
    pub checksum: ::std::option::Option<::std::string::String>,
    /// <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>
    pub create_version: ::std::option::Option<bool>,
    /// <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>
    pub kendra_configuration: ::std::option::Option<crate::types::KendraConfiguration>,
    /// <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>
    pub input_contexts: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>,
    /// <p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>
    pub output_contexts: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>,
}
impl PutIntentInput {
    /// <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>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the intent.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.slots.is_none()`.
    pub fn slots(&self) -> &[crate::types::Slot] {
        self.slots.as_deref().unwrap_or_default()
    }
    /// <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>
    ///
    /// 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()`.
    pub fn sample_utterances(&self) -> &[::std::string::String] {
        self.sample_utterances.as_deref().unwrap_or_default()
    }
    /// <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>
    pub fn confirmation_prompt(&self) -> ::std::option::Option<&crate::types::Prompt> {
        self.confirmation_prompt.as_ref()
    }
    /// <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>
    pub fn rejection_statement(&self) -> ::std::option::Option<&crate::types::Statement> {
        self.rejection_statement.as_ref()
    }
    /// <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>
    pub fn follow_up_prompt(&self) -> ::std::option::Option<&crate::types::FollowUpPrompt> {
        self.follow_up_prompt.as_ref()
    }
    /// <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>
    pub fn conclusion_statement(&self) -> ::std::option::Option<&crate::types::Statement> {
        self.conclusion_statement.as_ref()
    }
    /// <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>
    pub fn dialog_code_hook(&self) -> ::std::option::Option<&crate::types::CodeHook> {
        self.dialog_code_hook.as_ref()
    }
    /// <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>
    pub fn fulfillment_activity(&self) -> ::std::option::Option<&crate::types::FulfillmentActivity> {
        self.fulfillment_activity.as_ref()
    }
    /// <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>
    pub fn parent_intent_signature(&self) -> ::std::option::Option<&str> {
        self.parent_intent_signature.as_deref()
    }
    /// <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>
    pub fn checksum(&self) -> ::std::option::Option<&str> {
        self.checksum.as_deref()
    }
    /// <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>
    pub fn create_version(&self) -> ::std::option::Option<bool> {
        self.create_version
    }
    /// <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>
    pub fn kendra_configuration(&self) -> ::std::option::Option<&crate::types::KendraConfiguration> {
        self.kendra_configuration.as_ref()
    }
    /// <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>
    ///
    /// 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()`.
    pub fn input_contexts(&self) -> &[crate::types::InputContext] {
        self.input_contexts.as_deref().unwrap_or_default()
    }
    /// <p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>
    ///
    /// 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()`.
    pub fn output_contexts(&self) -> &[crate::types::OutputContext] {
        self.output_contexts.as_deref().unwrap_or_default()
    }
}
impl PutIntentInput {
    /// Creates a new builder-style object to manufacture [`PutIntentInput`](crate::operation::put_intent::PutIntentInput).
    pub fn builder() -> crate::operation::put_intent::builders::PutIntentInputBuilder {
        crate::operation::put_intent::builders::PutIntentInputBuilder::default()
    }
}

/// A builder for [`PutIntentInput`](crate::operation::put_intent::PutIntentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutIntentInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) slots: ::std::option::Option<::std::vec::Vec<crate::types::Slot>>,
    pub(crate) sample_utterances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) confirmation_prompt: ::std::option::Option<crate::types::Prompt>,
    pub(crate) rejection_statement: ::std::option::Option<crate::types::Statement>,
    pub(crate) follow_up_prompt: ::std::option::Option<crate::types::FollowUpPrompt>,
    pub(crate) conclusion_statement: ::std::option::Option<crate::types::Statement>,
    pub(crate) dialog_code_hook: ::std::option::Option<crate::types::CodeHook>,
    pub(crate) fulfillment_activity: ::std::option::Option<crate::types::FulfillmentActivity>,
    pub(crate) parent_intent_signature: ::std::option::Option<::std::string::String>,
    pub(crate) checksum: ::std::option::Option<::std::string::String>,
    pub(crate) create_version: ::std::option::Option<bool>,
    pub(crate) kendra_configuration: ::std::option::Option<crate::types::KendraConfiguration>,
    pub(crate) input_contexts: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>,
    pub(crate) output_contexts: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>,
}
impl PutIntentInputBuilder {
    /// <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>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <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>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description of the intent.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the intent.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the intent.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `slots`.
    ///
    /// To override the contents of this collection use [`set_slots`](Self::set_slots).
    ///
    /// <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>
    pub fn slots(mut self, input: crate::types::Slot) -> Self {
        let mut v = self.slots.unwrap_or_default();
        v.push(input);
        self.slots = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_slots(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Slot>>) -> Self {
        self.slots = input;
        self
    }
    /// <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>
    pub fn get_slots(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Slot>> {
        &self.slots
    }
    /// Appends an item to `sample_utterances`.
    ///
    /// To override the contents of this collection use [`set_sample_utterances`](Self::set_sample_utterances).
    ///
    /// <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>
    pub fn sample_utterances(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.sample_utterances.unwrap_or_default();
        v.push(input.into());
        self.sample_utterances = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_sample_utterances(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.sample_utterances = input;
        self
    }
    /// <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>
    pub fn get_sample_utterances(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.sample_utterances
    }
    /// <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>
    pub fn confirmation_prompt(mut self, input: crate::types::Prompt) -> Self {
        self.confirmation_prompt = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_confirmation_prompt(mut self, input: ::std::option::Option<crate::types::Prompt>) -> Self {
        self.confirmation_prompt = input;
        self
    }
    /// <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>
    pub fn get_confirmation_prompt(&self) -> &::std::option::Option<crate::types::Prompt> {
        &self.confirmation_prompt
    }
    /// <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>
    pub fn rejection_statement(mut self, input: crate::types::Statement) -> Self {
        self.rejection_statement = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_rejection_statement(mut self, input: ::std::option::Option<crate::types::Statement>) -> Self {
        self.rejection_statement = input;
        self
    }
    /// <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>
    pub fn get_rejection_statement(&self) -> &::std::option::Option<crate::types::Statement> {
        &self.rejection_statement
    }
    /// <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>
    pub fn follow_up_prompt(mut self, input: crate::types::FollowUpPrompt) -> Self {
        self.follow_up_prompt = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_follow_up_prompt(mut self, input: ::std::option::Option<crate::types::FollowUpPrompt>) -> Self {
        self.follow_up_prompt = input;
        self
    }
    /// <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>
    pub fn get_follow_up_prompt(&self) -> &::std::option::Option<crate::types::FollowUpPrompt> {
        &self.follow_up_prompt
    }
    /// <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>
    pub fn conclusion_statement(mut self, input: crate::types::Statement) -> Self {
        self.conclusion_statement = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_conclusion_statement(mut self, input: ::std::option::Option<crate::types::Statement>) -> Self {
        self.conclusion_statement = input;
        self
    }
    /// <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>
    pub fn get_conclusion_statement(&self) -> &::std::option::Option<crate::types::Statement> {
        &self.conclusion_statement
    }
    /// <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>
    pub fn dialog_code_hook(mut self, input: crate::types::CodeHook) -> Self {
        self.dialog_code_hook = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_dialog_code_hook(mut self, input: ::std::option::Option<crate::types::CodeHook>) -> Self {
        self.dialog_code_hook = input;
        self
    }
    /// <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>
    pub fn get_dialog_code_hook(&self) -> &::std::option::Option<crate::types::CodeHook> {
        &self.dialog_code_hook
    }
    /// <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>
    pub fn fulfillment_activity(mut self, input: crate::types::FulfillmentActivity) -> Self {
        self.fulfillment_activity = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_fulfillment_activity(mut self, input: ::std::option::Option<crate::types::FulfillmentActivity>) -> Self {
        self.fulfillment_activity = input;
        self
    }
    /// <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>
    pub fn get_fulfillment_activity(&self) -> &::std::option::Option<crate::types::FulfillmentActivity> {
        &self.fulfillment_activity
    }
    /// <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>
    pub fn parent_intent_signature(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parent_intent_signature = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_parent_intent_signature(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parent_intent_signature = input;
        self
    }
    /// <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>
    pub fn get_parent_intent_signature(&self) -> &::std::option::Option<::std::string::String> {
        &self.parent_intent_signature
    }
    /// <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>
    pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.checksum = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.checksum = input;
        self
    }
    /// <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>
    pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
        &self.checksum
    }
    /// <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>
    pub fn create_version(mut self, input: bool) -> Self {
        self.create_version = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_create_version(mut self, input: ::std::option::Option<bool>) -> Self {
        self.create_version = input;
        self
    }
    /// <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>
    pub fn get_create_version(&self) -> &::std::option::Option<bool> {
        &self.create_version
    }
    /// <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>
    pub fn kendra_configuration(mut self, input: crate::types::KendraConfiguration) -> Self {
        self.kendra_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_kendra_configuration(mut self, input: ::std::option::Option<crate::types::KendraConfiguration>) -> Self {
        self.kendra_configuration = input;
        self
    }
    /// <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>
    pub fn get_kendra_configuration(&self) -> &::std::option::Option<crate::types::KendraConfiguration> {
        &self.kendra_configuration
    }
    /// Appends an item to `input_contexts`.
    ///
    /// To override the contents of this collection use [`set_input_contexts`](Self::set_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>
    pub fn input_contexts(mut self, input: crate::types::InputContext) -> Self {
        let mut v = self.input_contexts.unwrap_or_default();
        v.push(input);
        self.input_contexts = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_input_contexts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputContext>>) -> Self {
        self.input_contexts = input;
        self
    }
    /// <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>
    pub fn get_input_contexts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputContext>> {
        &self.input_contexts
    }
    /// Appends an item to `output_contexts`.
    ///
    /// To override the contents of this collection use [`set_output_contexts`](Self::set_output_contexts).
    ///
    /// <p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>
    pub fn output_contexts(mut self, input: crate::types::OutputContext) -> Self {
        let mut v = self.output_contexts.unwrap_or_default();
        v.push(input);
        self.output_contexts = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>
    pub fn set_output_contexts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OutputContext>>) -> Self {
        self.output_contexts = input;
        self
    }
    /// <p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>
    pub fn get_output_contexts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OutputContext>> {
        &self.output_contexts
    }
    /// Consumes the builder and constructs a [`PutIntentInput`](crate::operation::put_intent::PutIntentInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::put_intent::PutIntentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_intent::PutIntentInput {
            name: self.name,
            description: self.description,
            slots: self.slots,
            sample_utterances: self.sample_utterances,
            confirmation_prompt: self.confirmation_prompt,
            rejection_statement: self.rejection_statement,
            follow_up_prompt: self.follow_up_prompt,
            conclusion_statement: self.conclusion_statement,
            dialog_code_hook: self.dialog_code_hook,
            fulfillment_activity: self.fulfillment_activity,
            parent_intent_signature: self.parent_intent_signature,
            checksum: self.checksum,
            create_version: self.create_version,
            kendra_configuration: self.kendra_configuration,
            input_contexts: self.input_contexts,
            output_contexts: self.output_contexts,
        })
    }
}