rusoto_lex_models/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>Provides information about a bot alias.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
30#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
31pub struct BotAliasMetadata {
32    /// <p>The name of the bot to which the alias points.</p>
33    #[serde(rename = "botName")]
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub bot_name: Option<String>,
36    /// <p>The version of the Amazon Lex bot to which the alias points.</p>
37    #[serde(rename = "botVersion")]
38    #[serde(skip_serializing_if = "Option::is_none")]
39    pub bot_version: Option<String>,
40    /// <p>Checksum of the bot alias.</p>
41    #[serde(rename = "checksum")]
42    #[serde(skip_serializing_if = "Option::is_none")]
43    pub checksum: Option<String>,
44    /// <p>Settings that determine how Amazon Lex uses conversation logs for the alias.</p>
45    #[serde(rename = "conversationLogs")]
46    #[serde(skip_serializing_if = "Option::is_none")]
47    pub conversation_logs: Option<ConversationLogsResponse>,
48    /// <p>The date that the bot alias was created.</p>
49    #[serde(rename = "createdDate")]
50    #[serde(skip_serializing_if = "Option::is_none")]
51    pub created_date: Option<f64>,
52    /// <p>A description of the bot alias.</p>
53    #[serde(rename = "description")]
54    #[serde(skip_serializing_if = "Option::is_none")]
55    pub description: Option<String>,
56    /// <p>The date that the bot alias was updated. When you create a resource, the creation date and last updated date are the same.</p>
57    #[serde(rename = "lastUpdatedDate")]
58    #[serde(skip_serializing_if = "Option::is_none")]
59    pub last_updated_date: Option<f64>,
60    /// <p>The name of the bot alias.</p>
61    #[serde(rename = "name")]
62    #[serde(skip_serializing_if = "Option::is_none")]
63    pub name: Option<String>,
64}
65
66/// <p>Represents an association between an Amazon Lex bot and an external messaging platform.</p>
67#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
68#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
69pub struct BotChannelAssociation {
70    /// <p>An alias pointing to the specific version of the Amazon Lex bot to which this association is being made. </p>
71    #[serde(rename = "botAlias")]
72    #[serde(skip_serializing_if = "Option::is_none")]
73    pub bot_alias: Option<String>,
74    /// <p>Provides information necessary to communicate with the messaging platform. </p>
75    #[serde(rename = "botConfiguration")]
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub bot_configuration: Option<::std::collections::HashMap<String, String>>,
78    /// <p><p>The name of the Amazon Lex bot to which this association is being made. </p> <note> <p>Currently, Amazon Lex supports associations with Facebook and Slack, and Twilio.</p> </note></p>
79    #[serde(rename = "botName")]
80    #[serde(skip_serializing_if = "Option::is_none")]
81    pub bot_name: Option<String>,
82    /// <p>The date that the association between the Amazon Lex bot and the channel was created. </p>
83    #[serde(rename = "createdDate")]
84    #[serde(skip_serializing_if = "Option::is_none")]
85    pub created_date: Option<f64>,
86    /// <p>A text description of the association you are creating. </p>
87    #[serde(rename = "description")]
88    #[serde(skip_serializing_if = "Option::is_none")]
89    pub description: Option<String>,
90    /// <p>If <code>status</code> is <code>FAILED</code>, Amazon Lex provides the reason that it failed to create the association.</p>
91    #[serde(rename = "failureReason")]
92    #[serde(skip_serializing_if = "Option::is_none")]
93    pub failure_reason: Option<String>,
94    /// <p>The name of the association between the bot and the channel. </p>
95    #[serde(rename = "name")]
96    #[serde(skip_serializing_if = "Option::is_none")]
97    pub name: Option<String>,
98    /// <p><p>The status of the bot channel. </p> <ul> <li> <p> <code>CREATED</code> - The channel has been created and is ready for use.</p> </li> <li> <p> <code>IN_PROGRESS</code> - Channel creation is in progress.</p> </li> <li> <p> <code>FAILED</code> - There was an error creating the channel. For information about the reason for the failure, see the <code>failureReason</code> field.</p> </li> </ul></p>
99    #[serde(rename = "status")]
100    #[serde(skip_serializing_if = "Option::is_none")]
101    pub status: Option<String>,
102    /// <p>Specifies the type of association by indicating the type of channel being established between the Amazon Lex bot and the external messaging platform.</p>
103    #[serde(rename = "type")]
104    #[serde(skip_serializing_if = "Option::is_none")]
105    pub type_: Option<String>,
106}
107
108/// <p>Provides information about a bot. .</p>
109#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
110#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
111pub struct BotMetadata {
112    /// <p>The date that the bot was created.</p>
113    #[serde(rename = "createdDate")]
114    #[serde(skip_serializing_if = "Option::is_none")]
115    pub created_date: Option<f64>,
116    /// <p>A description of the bot.</p>
117    #[serde(rename = "description")]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub description: Option<String>,
120    /// <p>The date that the bot was updated. When you create a bot, the creation date and last updated date are the same. </p>
121    #[serde(rename = "lastUpdatedDate")]
122    #[serde(skip_serializing_if = "Option::is_none")]
123    pub last_updated_date: Option<f64>,
124    /// <p>The name of the bot. </p>
125    #[serde(rename = "name")]
126    #[serde(skip_serializing_if = "Option::is_none")]
127    pub name: Option<String>,
128    /// <p>The status of the bot.</p>
129    #[serde(rename = "status")]
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub status: Option<String>,
132    /// <p>The version of the bot. For a new bot, the version is always <code>$LATEST</code>.</p>
133    #[serde(rename = "version")]
134    #[serde(skip_serializing_if = "Option::is_none")]
135    pub version: Option<String>,
136}
137
138/// <p>Provides metadata for a built-in intent.</p>
139#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
140#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
141pub struct BuiltinIntentMetadata {
142    /// <p>A unique identifier for the built-in intent. 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>
143    #[serde(rename = "signature")]
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub signature: Option<String>,
146    /// <p>A list of identifiers for the locales that the intent supports.</p>
147    #[serde(rename = "supportedLocales")]
148    #[serde(skip_serializing_if = "Option::is_none")]
149    pub supported_locales: Option<Vec<String>>,
150}
151
152/// <p>Provides information about a slot used in a built-in intent.</p>
153#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
154#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
155pub struct BuiltinIntentSlot {
156    /// <p>A list of the slots defined for the intent.</p>
157    #[serde(rename = "name")]
158    #[serde(skip_serializing_if = "Option::is_none")]
159    pub name: Option<String>,
160}
161
162/// <p>Provides information about a built in slot type.</p>
163#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
164#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
165pub struct BuiltinSlotTypeMetadata {
166    /// <p>A unique identifier for the built-in slot type. To find the signature for a slot type, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference">Slot Type Reference</a> in the <i>Alexa Skills Kit</i>.</p>
167    #[serde(rename = "signature")]
168    #[serde(skip_serializing_if = "Option::is_none")]
169    pub signature: Option<String>,
170    /// <p>A list of target locales for the slot. </p>
171    #[serde(rename = "supportedLocales")]
172    #[serde(skip_serializing_if = "Option::is_none")]
173    pub supported_locales: Option<Vec<String>>,
174}
175
176/// <p>Specifies a Lambda function that verifies requests to a bot or fulfills the user's request to a bot..</p>
177#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
178pub struct CodeHook {
179    /// <p>The version of the request-response that you want Amazon Lex to use to invoke your Lambda function. For more information, see <a>using-lambda</a>.</p>
180    #[serde(rename = "messageVersion")]
181    pub message_version: String,
182    /// <p>The Amazon Resource Name (ARN) of the Lambda function.</p>
183    #[serde(rename = "uri")]
184    pub uri: String,
185}
186
187/// <p>Provides the settings needed for conversation logs.</p>
188#[derive(Clone, Debug, Default, PartialEq, Serialize)]
189#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
190pub struct ConversationLogsRequest {
191    /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to write to your CloudWatch Logs for text logs and your S3 bucket for audio logs. If audio encryption is enabled, this role also provides access permission for the AWS KMS key used for encrypting audio logs. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/conversation-logs-role-and-policy.html">Creating an IAM Role and Policy for Conversation Logs</a>.</p>
192    #[serde(rename = "iamRoleArn")]
193    pub iam_role_arn: String,
194    /// <p>The settings for your conversation logs. You can log the conversation text, conversation audio, or both.</p>
195    #[serde(rename = "logSettings")]
196    pub log_settings: Vec<LogSettingsRequest>,
197}
198
199/// <p>Contains information about conversation log settings.</p>
200#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
201#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
202pub struct ConversationLogsResponse {
203    /// <p>The Amazon Resource Name (ARN) of the IAM role used to write your logs to CloudWatch Logs or an S3 bucket.</p>
204    #[serde(rename = "iamRoleArn")]
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub iam_role_arn: Option<String>,
207    /// <p>The settings for your conversation logs. You can log text, audio, or both.</p>
208    #[serde(rename = "logSettings")]
209    #[serde(skip_serializing_if = "Option::is_none")]
210    pub log_settings: Option<Vec<LogSettingsResponse>>,
211}
212
213#[derive(Clone, Debug, Default, PartialEq, Serialize)]
214#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
215pub struct CreateBotVersionRequest {
216    /// <p>Identifies a specific revision of the <code>$LATEST</code> version of the bot. If you specify a checksum and the <code>$LATEST</code> version of the bot has a different checksum, a <code>PreconditionFailedException</code> exception is returned and Amazon Lex doesn't publish a new version. If you don't specify a checksum, Amazon Lex publishes the <code>$LATEST</code> version.</p>
217    #[serde(rename = "checksum")]
218    #[serde(skip_serializing_if = "Option::is_none")]
219    pub checksum: Option<String>,
220    /// <p>The name of the bot that you want to create a new version of. The name is case sensitive. </p>
221    #[serde(rename = "name")]
222    pub name: String,
223}
224
225#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
226#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
227pub struct CreateBotVersionResponse {
228    /// <p>The message that Amazon Lex uses to abort a conversation. For more information, see <a>PutBot</a>.</p>
229    #[serde(rename = "abortStatement")]
230    #[serde(skip_serializing_if = "Option::is_none")]
231    pub abort_statement: Option<Statement>,
232    /// <p>Checksum identifying the version of the bot that was created.</p>
233    #[serde(rename = "checksum")]
234    #[serde(skip_serializing_if = "Option::is_none")]
235    pub checksum: Option<String>,
236    /// <p>For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying <code>true</code> or <code>false</code> in the <code>childDirected</code> field. By specifying <code>true</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying <code>false</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is not</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the <code>childDirected</code> field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.</p> <p>If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the <a href="https://aws.amazon.com/lex/faqs#data-security">Amazon Lex FAQ.</a> </p>
237    #[serde(rename = "childDirected")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub child_directed: Option<bool>,
240    /// <p>The message that Amazon Lex uses when it doesn't understand the user's request. For more information, see <a>PutBot</a>. </p>
241    #[serde(rename = "clarificationPrompt")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub clarification_prompt: Option<Prompt>,
244    /// <p>The date when the bot version was created.</p>
245    #[serde(rename = "createdDate")]
246    #[serde(skip_serializing_if = "Option::is_none")]
247    pub created_date: Option<f64>,
248    /// <p>A description of the bot.</p>
249    #[serde(rename = "description")]
250    #[serde(skip_serializing_if = "Option::is_none")]
251    pub description: Option<String>,
252    /// <p>Indicates whether utterances entered by the user should be sent to Amazon Comprehend for sentiment analysis.</p>
253    #[serde(rename = "detectSentiment")]
254    #[serde(skip_serializing_if = "Option::is_none")]
255    pub detect_sentiment: Option<bool>,
256    /// <p>If <code>status</code> is <code>FAILED</code>, Amazon Lex provides the reason that it failed to build the bot.</p>
257    #[serde(rename = "failureReason")]
258    #[serde(skip_serializing_if = "Option::is_none")]
259    pub failure_reason: Option<String>,
260    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. For more information, see <a>PutBot</a>.</p>
261    #[serde(rename = "idleSessionTTLInSeconds")]
262    #[serde(skip_serializing_if = "Option::is_none")]
263    pub idle_session_ttl_in_seconds: Option<i64>,
264    /// <p>An array of <code>Intent</code> objects. For more information, see <a>PutBot</a>.</p>
265    #[serde(rename = "intents")]
266    #[serde(skip_serializing_if = "Option::is_none")]
267    pub intents: Option<Vec<Intent>>,
268    /// <p>The date when the <code>$LATEST</code> version of this bot was updated. </p>
269    #[serde(rename = "lastUpdatedDate")]
270    #[serde(skip_serializing_if = "Option::is_none")]
271    pub last_updated_date: Option<f64>,
272    /// <p> Specifies the target locale for the bot. </p>
273    #[serde(rename = "locale")]
274    #[serde(skip_serializing_if = "Option::is_none")]
275    pub locale: Option<String>,
276    /// <p>The name of the bot.</p>
277    #[serde(rename = "name")]
278    #[serde(skip_serializing_if = "Option::is_none")]
279    pub name: Option<String>,
280    /// <p> When you send a request to create or update a bot, Amazon Lex sets the <code>status</code> response element to <code>BUILDING</code>. After Amazon Lex builds the bot, it sets <code>status</code> to <code>READY</code>. If Amazon Lex can't build the bot, it sets <code>status</code> to <code>FAILED</code>. Amazon Lex returns the reason for the failure in the <code>failureReason</code> response element. </p>
281    #[serde(rename = "status")]
282    #[serde(skip_serializing_if = "Option::is_none")]
283    pub status: Option<String>,
284    /// <p>The version of the bot. </p>
285    #[serde(rename = "version")]
286    #[serde(skip_serializing_if = "Option::is_none")]
287    pub version: Option<String>,
288    /// <p>The Amazon Polly voice ID that Amazon Lex uses for voice interactions with the user.</p>
289    #[serde(rename = "voiceId")]
290    #[serde(skip_serializing_if = "Option::is_none")]
291    pub voice_id: Option<String>,
292}
293
294#[derive(Clone, Debug, Default, PartialEq, Serialize)]
295#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
296pub struct CreateIntentVersionRequest {
297    /// <p>Checksum of the <code>$LATEST</code> version of the intent that should be used to create the new version. If you specify a checksum and the <code>$LATEST</code> version of the intent has a different checksum, Amazon Lex returns a <code>PreconditionFailedException</code> exception and doesn't publish a new version. If you don't specify a checksum, Amazon Lex publishes the <code>$LATEST</code> version.</p>
298    #[serde(rename = "checksum")]
299    #[serde(skip_serializing_if = "Option::is_none")]
300    pub checksum: Option<String>,
301    /// <p>The name of the intent that you want to create a new version of. The name is case sensitive. </p>
302    #[serde(rename = "name")]
303    pub name: String,
304}
305
306#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
307#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
308pub struct CreateIntentVersionResponse {
309    /// <p>Checksum of the intent version created.</p>
310    #[serde(rename = "checksum")]
311    #[serde(skip_serializing_if = "Option::is_none")]
312    pub checksum: Option<String>,
313    /// <p>After the Lambda function specified in the <code>fulfillmentActivity</code> field fulfills the intent, Amazon Lex conveys this statement to the user. </p>
314    #[serde(rename = "conclusionStatement")]
315    #[serde(skip_serializing_if = "Option::is_none")]
316    pub conclusion_statement: Option<Statement>,
317    /// <p>If defined, the prompt that Amazon Lex uses to confirm the user's intent before fulfilling it. </p>
318    #[serde(rename = "confirmationPrompt")]
319    #[serde(skip_serializing_if = "Option::is_none")]
320    pub confirmation_prompt: Option<Prompt>,
321    /// <p>The date that the intent was created.</p>
322    #[serde(rename = "createdDate")]
323    #[serde(skip_serializing_if = "Option::is_none")]
324    pub created_date: Option<f64>,
325    /// <p>A description of the intent.</p>
326    #[serde(rename = "description")]
327    #[serde(skip_serializing_if = "Option::is_none")]
328    pub description: Option<String>,
329    /// <p>If defined, Amazon Lex invokes this Lambda function for each user input.</p>
330    #[serde(rename = "dialogCodeHook")]
331    #[serde(skip_serializing_if = "Option::is_none")]
332    pub dialog_code_hook: Option<CodeHook>,
333    /// <p>If defined, Amazon Lex uses this prompt to solicit additional user activity after the intent is fulfilled. </p>
334    #[serde(rename = "followUpPrompt")]
335    #[serde(skip_serializing_if = "Option::is_none")]
336    pub follow_up_prompt: Option<FollowUpPrompt>,
337    /// <p> Describes how the intent is fulfilled. </p>
338    #[serde(rename = "fulfillmentActivity")]
339    #[serde(skip_serializing_if = "Option::is_none")]
340    pub fulfillment_activity: Option<FulfillmentActivity>,
341    /// <p>Configuration information, if any, for connectin an Amazon Kendra index with the <code>AMAZON.KendraSearchIntent</code> intent.</p>
342    #[serde(rename = "kendraConfiguration")]
343    #[serde(skip_serializing_if = "Option::is_none")]
344    pub kendra_configuration: Option<KendraConfiguration>,
345    /// <p>The date that the intent was updated. </p>
346    #[serde(rename = "lastUpdatedDate")]
347    #[serde(skip_serializing_if = "Option::is_none")]
348    pub last_updated_date: Option<f64>,
349    /// <p>The name of the intent.</p>
350    #[serde(rename = "name")]
351    #[serde(skip_serializing_if = "Option::is_none")]
352    pub name: Option<String>,
353    /// <p>A unique identifier for a built-in intent.</p>
354    #[serde(rename = "parentIntentSignature")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    pub parent_intent_signature: Option<String>,
357    /// <p>If the user answers "no" to the question defined in <code>confirmationPrompt</code>, Amazon Lex responds with this statement to acknowledge that the intent was canceled. </p>
358    #[serde(rename = "rejectionStatement")]
359    #[serde(skip_serializing_if = "Option::is_none")]
360    pub rejection_statement: Option<Statement>,
361    /// <p>An array of sample utterances configured for the intent. </p>
362    #[serde(rename = "sampleUtterances")]
363    #[serde(skip_serializing_if = "Option::is_none")]
364    pub sample_utterances: Option<Vec<String>>,
365    /// <p>An array of slot types that defines the information required to fulfill the intent.</p>
366    #[serde(rename = "slots")]
367    #[serde(skip_serializing_if = "Option::is_none")]
368    pub slots: Option<Vec<Slot>>,
369    /// <p>The version number assigned to the new version of the intent.</p>
370    #[serde(rename = "version")]
371    #[serde(skip_serializing_if = "Option::is_none")]
372    pub version: Option<String>,
373}
374
375#[derive(Clone, Debug, Default, PartialEq, Serialize)]
376#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
377pub struct CreateSlotTypeVersionRequest {
378    /// <p>Checksum for the <code>$LATEST</code> version of the slot type that you want to publish. If you specify a checksum and the <code>$LATEST</code> version of the slot type has a different checksum, Amazon Lex returns a <code>PreconditionFailedException</code> exception and doesn't publish the new version. If you don't specify a checksum, Amazon Lex publishes the <code>$LATEST</code> version.</p>
379    #[serde(rename = "checksum")]
380    #[serde(skip_serializing_if = "Option::is_none")]
381    pub checksum: Option<String>,
382    /// <p>The name of the slot type that you want to create a new version for. The name is case sensitive. </p>
383    #[serde(rename = "name")]
384    pub name: String,
385}
386
387#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
388#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
389pub struct CreateSlotTypeVersionResponse {
390    /// <p>Checksum of the <code>$LATEST</code> version of the slot type.</p>
391    #[serde(rename = "checksum")]
392    #[serde(skip_serializing_if = "Option::is_none")]
393    pub checksum: Option<String>,
394    /// <p>The date that the slot type was created.</p>
395    #[serde(rename = "createdDate")]
396    #[serde(skip_serializing_if = "Option::is_none")]
397    pub created_date: Option<f64>,
398    /// <p>A description of the slot type.</p>
399    #[serde(rename = "description")]
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub description: Option<String>,
402    /// <p>A list of <code>EnumerationValue</code> objects that defines the values that the slot type can take.</p>
403    #[serde(rename = "enumerationValues")]
404    #[serde(skip_serializing_if = "Option::is_none")]
405    pub enumeration_values: Option<Vec<EnumerationValue>>,
406    /// <p>The date that the slot type was updated. When you create a resource, the creation date and last update date are the same.</p>
407    #[serde(rename = "lastUpdatedDate")]
408    #[serde(skip_serializing_if = "Option::is_none")]
409    pub last_updated_date: Option<f64>,
410    /// <p>The name of the slot type.</p>
411    #[serde(rename = "name")]
412    #[serde(skip_serializing_if = "Option::is_none")]
413    pub name: Option<String>,
414    /// <p>The built-in slot type used a the parent of the slot type.</p>
415    #[serde(rename = "parentSlotTypeSignature")]
416    #[serde(skip_serializing_if = "Option::is_none")]
417    pub parent_slot_type_signature: Option<String>,
418    /// <p>Configuration information that extends the parent built-in slot type.</p>
419    #[serde(rename = "slotTypeConfigurations")]
420    #[serde(skip_serializing_if = "Option::is_none")]
421    pub slot_type_configurations: Option<Vec<SlotTypeConfiguration>>,
422    /// <p>The strategy that Amazon Lex uses to determine the value of the slot. For more information, see <a>PutSlotType</a>.</p>
423    #[serde(rename = "valueSelectionStrategy")]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub value_selection_strategy: Option<String>,
426    /// <p>The version assigned to the new slot type version. </p>
427    #[serde(rename = "version")]
428    #[serde(skip_serializing_if = "Option::is_none")]
429    pub version: Option<String>,
430}
431
432#[derive(Clone, Debug, Default, PartialEq, Serialize)]
433#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
434pub struct DeleteBotAliasRequest {
435    /// <p>The name of the bot that the alias points to.</p>
436    #[serde(rename = "botName")]
437    pub bot_name: String,
438    /// <p>The name of the alias to delete. The name is case sensitive. </p>
439    #[serde(rename = "name")]
440    pub name: String,
441}
442
443#[derive(Clone, Debug, Default, PartialEq, Serialize)]
444#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
445pub struct DeleteBotChannelAssociationRequest {
446    /// <p>An alias that points to the specific version of the Amazon Lex bot to which this association is being made.</p>
447    #[serde(rename = "botAlias")]
448    pub bot_alias: String,
449    /// <p>The name of the Amazon Lex bot.</p>
450    #[serde(rename = "botName")]
451    pub bot_name: String,
452    /// <p>The name of the association. The name is case sensitive. </p>
453    #[serde(rename = "name")]
454    pub name: String,
455}
456
457#[derive(Clone, Debug, Default, PartialEq, Serialize)]
458#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
459pub struct DeleteBotRequest {
460    /// <p>The name of the bot. The name is case sensitive. </p>
461    #[serde(rename = "name")]
462    pub name: String,
463}
464
465#[derive(Clone, Debug, Default, PartialEq, Serialize)]
466#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
467pub struct DeleteBotVersionRequest {
468    /// <p>The name of the bot.</p>
469    #[serde(rename = "name")]
470    pub name: String,
471    /// <p>The version of the bot to delete. You cannot delete the <code>$LATEST</code> version of the bot. To delete the <code>$LATEST</code> version, use the <a>DeleteBot</a> operation.</p>
472    #[serde(rename = "version")]
473    pub version: String,
474}
475
476#[derive(Clone, Debug, Default, PartialEq, Serialize)]
477#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
478pub struct DeleteIntentRequest {
479    /// <p>The name of the intent. The name is case sensitive. </p>
480    #[serde(rename = "name")]
481    pub name: String,
482}
483
484#[derive(Clone, Debug, Default, PartialEq, Serialize)]
485#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
486pub struct DeleteIntentVersionRequest {
487    /// <p>The name of the intent.</p>
488    #[serde(rename = "name")]
489    pub name: String,
490    /// <p>The version of the intent to delete. You cannot delete the <code>$LATEST</code> version of the intent. To delete the <code>$LATEST</code> version, use the <a>DeleteIntent</a> operation.</p>
491    #[serde(rename = "version")]
492    pub version: String,
493}
494
495#[derive(Clone, Debug, Default, PartialEq, Serialize)]
496#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
497pub struct DeleteSlotTypeRequest {
498    /// <p>The name of the slot type. The name is case sensitive. </p>
499    #[serde(rename = "name")]
500    pub name: String,
501}
502
503#[derive(Clone, Debug, Default, PartialEq, Serialize)]
504#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
505pub struct DeleteSlotTypeVersionRequest {
506    /// <p>The name of the slot type.</p>
507    #[serde(rename = "name")]
508    pub name: String,
509    /// <p>The version of the slot type to delete. You cannot delete the <code>$LATEST</code> version of the slot type. To delete the <code>$LATEST</code> version, use the <a>DeleteSlotType</a> operation.</p>
510    #[serde(rename = "version")]
511    pub version: String,
512}
513
514#[derive(Clone, Debug, Default, PartialEq, Serialize)]
515#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
516pub struct DeleteUtterancesRequest {
517    /// <p>The name of the bot that stored the utterances.</p>
518    #[serde(rename = "botName")]
519    pub bot_name: String,
520    /// <p> The unique identifier for the user that made the utterances. This is the user ID that was sent in the <a href="http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html">PostContent</a> or <a href="http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html">PostText</a> operation request that contained the utterance.</p>
521    #[serde(rename = "userId")]
522    pub user_id: String,
523}
524
525/// <p><p>Each slot type can have a set of values. Each enumeration value represents a value the slot type can take. </p> <p>For example, a pizza ordering bot could have a slot type that specifies the type of crust that the pizza should have. The slot type could include the values </p> <ul> <li> <p>thick</p> </li> <li> <p>thin</p> </li> <li> <p>stuffed</p> </li> </ul></p>
526#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
527pub struct EnumerationValue {
528    /// <p>Additional values related to the slot type value.</p>
529    #[serde(rename = "synonyms")]
530    #[serde(skip_serializing_if = "Option::is_none")]
531    pub synonyms: Option<Vec<String>>,
532    /// <p>The value of the slot type.</p>
533    #[serde(rename = "value")]
534    pub value: String,
535}
536
537/// <p>A prompt for additional activity after an intent is fulfilled. For example, after the <code>OrderPizza</code> intent is fulfilled, you might prompt the user to find out whether the user wants to order drinks.</p>
538#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
539pub struct FollowUpPrompt {
540    /// <p>Prompts for information from the user. </p>
541    #[serde(rename = "prompt")]
542    pub prompt: Prompt,
543    /// <p>If the user answers "no" to the question defined in the <code>prompt</code> field, Amazon Lex responds with this statement to acknowledge that the intent was canceled. </p>
544    #[serde(rename = "rejectionStatement")]
545    pub rejection_statement: Statement,
546}
547
548/// <p><p> Describes how the intent is fulfilled after the user provides all of the information required for the intent. You can provide a Lambda function to process the intent, or you can return the intent information to the client application. We recommend that you use a Lambda function so that the relevant logic lives in the Cloud and limit the client-side code primarily to presentation. If you need to update the logic, you only update the Lambda function; you don&#39;t need to upgrade your client application. </p> <p>Consider the following examples:</p> <ul> <li> <p>In a pizza ordering application, after the user provides all of the information for placing an order, you use a Lambda function to place an order with a pizzeria. </p> </li> <li> <p>In a gaming application, when a user says &quot;pick up a rock,&quot; this information must go back to the client application so that it can perform the operation and update the graphics. In this case, you want Amazon Lex to return the intent data to the client. </p> </li> </ul></p>
549#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
550pub struct FulfillmentActivity {
551    /// <p> A description of the Lambda function that is run to fulfill the intent. </p>
552    #[serde(rename = "codeHook")]
553    #[serde(skip_serializing_if = "Option::is_none")]
554    pub code_hook: Option<CodeHook>,
555    /// <p> How the intent should be fulfilled, either by running a Lambda function or by returning the slot data to the client application. </p>
556    #[serde(rename = "type")]
557    pub type_: String,
558}
559
560#[derive(Clone, Debug, Default, PartialEq, Serialize)]
561#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
562pub struct GetBotAliasRequest {
563    /// <p>The name of the bot.</p>
564    #[serde(rename = "botName")]
565    pub bot_name: String,
566    /// <p>The name of the bot alias. The name is case sensitive.</p>
567    #[serde(rename = "name")]
568    pub name: String,
569}
570
571#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
572#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
573pub struct GetBotAliasResponse {
574    /// <p>The name of the bot that the alias points to.</p>
575    #[serde(rename = "botName")]
576    #[serde(skip_serializing_if = "Option::is_none")]
577    pub bot_name: Option<String>,
578    /// <p>The version of the bot that the alias points to.</p>
579    #[serde(rename = "botVersion")]
580    #[serde(skip_serializing_if = "Option::is_none")]
581    pub bot_version: Option<String>,
582    /// <p>Checksum of the bot alias.</p>
583    #[serde(rename = "checksum")]
584    #[serde(skip_serializing_if = "Option::is_none")]
585    pub checksum: Option<String>,
586    /// <p>The settings that determine how Amazon Lex uses conversation logs for the alias.</p>
587    #[serde(rename = "conversationLogs")]
588    #[serde(skip_serializing_if = "Option::is_none")]
589    pub conversation_logs: Option<ConversationLogsResponse>,
590    /// <p>The date that the bot alias was created.</p>
591    #[serde(rename = "createdDate")]
592    #[serde(skip_serializing_if = "Option::is_none")]
593    pub created_date: Option<f64>,
594    /// <p>A description of the bot alias.</p>
595    #[serde(rename = "description")]
596    #[serde(skip_serializing_if = "Option::is_none")]
597    pub description: Option<String>,
598    /// <p>The date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.</p>
599    #[serde(rename = "lastUpdatedDate")]
600    #[serde(skip_serializing_if = "Option::is_none")]
601    pub last_updated_date: Option<f64>,
602    /// <p>The name of the bot alias.</p>
603    #[serde(rename = "name")]
604    #[serde(skip_serializing_if = "Option::is_none")]
605    pub name: Option<String>,
606}
607
608#[derive(Clone, Debug, Default, PartialEq, Serialize)]
609#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
610pub struct GetBotAliasesRequest {
611    /// <p>The name of the bot.</p>
612    #[serde(rename = "botName")]
613    pub bot_name: String,
614    /// <p>The maximum number of aliases to return in the response. The default is 50. . </p>
615    #[serde(rename = "maxResults")]
616    #[serde(skip_serializing_if = "Option::is_none")]
617    pub max_results: Option<i64>,
618    /// <p>Substring to match in bot alias names. An alias will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
619    #[serde(rename = "nameContains")]
620    #[serde(skip_serializing_if = "Option::is_none")]
621    pub name_contains: Option<String>,
622    /// <p>A pagination token for fetching the next page of aliases. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of aliases, specify the pagination token in the next request. </p>
623    #[serde(rename = "nextToken")]
624    #[serde(skip_serializing_if = "Option::is_none")]
625    pub next_token: Option<String>,
626}
627
628#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
629#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
630pub struct GetBotAliasesResponse {
631    /// <p>An array of <code>BotAliasMetadata</code> objects, each describing a bot alias.</p>
632    #[serde(rename = "BotAliases")]
633    #[serde(skip_serializing_if = "Option::is_none")]
634    pub bot_aliases: Option<Vec<BotAliasMetadata>>,
635    /// <p>A pagination token for fetching next page of aliases. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of aliases, specify the pagination token in the next request. </p>
636    #[serde(rename = "nextToken")]
637    #[serde(skip_serializing_if = "Option::is_none")]
638    pub next_token: Option<String>,
639}
640
641#[derive(Clone, Debug, Default, PartialEq, Serialize)]
642#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
643pub struct GetBotChannelAssociationRequest {
644    /// <p>An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.</p>
645    #[serde(rename = "botAlias")]
646    pub bot_alias: String,
647    /// <p>The name of the Amazon Lex bot.</p>
648    #[serde(rename = "botName")]
649    pub bot_name: String,
650    /// <p>The name of the association between the bot and the channel. The name is case sensitive. </p>
651    #[serde(rename = "name")]
652    pub name: String,
653}
654
655#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
656#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
657pub struct GetBotChannelAssociationResponse {
658    /// <p>An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.</p>
659    #[serde(rename = "botAlias")]
660    #[serde(skip_serializing_if = "Option::is_none")]
661    pub bot_alias: Option<String>,
662    /// <p>Provides information that the messaging platform needs to communicate with the Amazon Lex bot.</p>
663    #[serde(rename = "botConfiguration")]
664    #[serde(skip_serializing_if = "Option::is_none")]
665    pub bot_configuration: Option<::std::collections::HashMap<String, String>>,
666    /// <p>The name of the Amazon Lex bot.</p>
667    #[serde(rename = "botName")]
668    #[serde(skip_serializing_if = "Option::is_none")]
669    pub bot_name: Option<String>,
670    /// <p>The date that the association between the bot and the channel was created.</p>
671    #[serde(rename = "createdDate")]
672    #[serde(skip_serializing_if = "Option::is_none")]
673    pub created_date: Option<f64>,
674    /// <p>A description of the association between the bot and the channel.</p>
675    #[serde(rename = "description")]
676    #[serde(skip_serializing_if = "Option::is_none")]
677    pub description: Option<String>,
678    /// <p>If <code>status</code> is <code>FAILED</code>, Amazon Lex provides the reason that it failed to create the association.</p>
679    #[serde(rename = "failureReason")]
680    #[serde(skip_serializing_if = "Option::is_none")]
681    pub failure_reason: Option<String>,
682    /// <p>The name of the association between the bot and the channel.</p>
683    #[serde(rename = "name")]
684    #[serde(skip_serializing_if = "Option::is_none")]
685    pub name: Option<String>,
686    /// <p><p>The status of the bot channel. </p> <ul> <li> <p> <code>CREATED</code> - The channel has been created and is ready for use.</p> </li> <li> <p> <code>IN_PROGRESS</code> - Channel creation is in progress.</p> </li> <li> <p> <code>FAILED</code> - There was an error creating the channel. For information about the reason for the failure, see the <code>failureReason</code> field.</p> </li> </ul></p>
687    #[serde(rename = "status")]
688    #[serde(skip_serializing_if = "Option::is_none")]
689    pub status: Option<String>,
690    /// <p>The type of the messaging platform.</p>
691    #[serde(rename = "type")]
692    #[serde(skip_serializing_if = "Option::is_none")]
693    pub type_: Option<String>,
694}
695
696#[derive(Clone, Debug, Default, PartialEq, Serialize)]
697#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
698pub struct GetBotChannelAssociationsRequest {
699    /// <p>An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.</p>
700    #[serde(rename = "botAlias")]
701    pub bot_alias: String,
702    /// <p>The name of the Amazon Lex bot in the association.</p>
703    #[serde(rename = "botName")]
704    pub bot_name: String,
705    /// <p>The maximum number of associations to return in the response. The default is 50. </p>
706    #[serde(rename = "maxResults")]
707    #[serde(skip_serializing_if = "Option::is_none")]
708    pub max_results: Option<i64>,
709    /// <p>Substring to match in channel association names. An association will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz." To return all bot channel associations, use a hyphen ("-") as the <code>nameContains</code> parameter.</p>
710    #[serde(rename = "nameContains")]
711    #[serde(skip_serializing_if = "Option::is_none")]
712    pub name_contains: Option<String>,
713    /// <p>A pagination token for fetching the next page of associations. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of associations, specify the pagination token in the next request. </p>
714    #[serde(rename = "nextToken")]
715    #[serde(skip_serializing_if = "Option::is_none")]
716    pub next_token: Option<String>,
717}
718
719#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
720#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
721pub struct GetBotChannelAssociationsResponse {
722    /// <p>An array of objects, one for each association, that provides information about the Amazon Lex bot and its association with the channel. </p>
723    #[serde(rename = "botChannelAssociations")]
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub bot_channel_associations: Option<Vec<BotChannelAssociation>>,
726    /// <p>A pagination token that fetches the next page of associations. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of associations, specify the pagination token in the next request. </p>
727    #[serde(rename = "nextToken")]
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub next_token: Option<String>,
730}
731
732#[derive(Clone, Debug, Default, PartialEq, Serialize)]
733#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
734pub struct GetBotRequest {
735    /// <p>The name of the bot. The name is case sensitive. </p>
736    #[serde(rename = "name")]
737    pub name: String,
738    /// <p>The version or alias of the bot.</p>
739    #[serde(rename = "versionOrAlias")]
740    pub version_or_alias: String,
741}
742
743#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
744#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
745pub struct GetBotResponse {
746    /// <p>The message that Amazon Lex returns when the user elects to end the conversation without completing it. For more information, see <a>PutBot</a>.</p>
747    #[serde(rename = "abortStatement")]
748    #[serde(skip_serializing_if = "Option::is_none")]
749    pub abort_statement: Option<Statement>,
750    /// <p>Checksum of the bot used to identify a specific revision of the bot's <code>$LATEST</code> version.</p>
751    #[serde(rename = "checksum")]
752    #[serde(skip_serializing_if = "Option::is_none")]
753    pub checksum: Option<String>,
754    /// <p>For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying <code>true</code> or <code>false</code> in the <code>childDirected</code> field. By specifying <code>true</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying <code>false</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is not</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the <code>childDirected</code> field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.</p> <p>If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the <a href="https://aws.amazon.com/lex/faqs#data-security">Amazon Lex FAQ.</a> </p>
755    #[serde(rename = "childDirected")]
756    #[serde(skip_serializing_if = "Option::is_none")]
757    pub child_directed: Option<bool>,
758    /// <p>The message Amazon Lex uses when it doesn't understand the user's request. For more information, see <a>PutBot</a>. </p>
759    #[serde(rename = "clarificationPrompt")]
760    #[serde(skip_serializing_if = "Option::is_none")]
761    pub clarification_prompt: Option<Prompt>,
762    /// <p>The date that the bot was created.</p>
763    #[serde(rename = "createdDate")]
764    #[serde(skip_serializing_if = "Option::is_none")]
765    pub created_date: Option<f64>,
766    /// <p>A description of the bot.</p>
767    #[serde(rename = "description")]
768    #[serde(skip_serializing_if = "Option::is_none")]
769    pub description: Option<String>,
770    /// <p>Indicates whether user utterances should be sent to Amazon Comprehend for sentiment analysis.</p>
771    #[serde(rename = "detectSentiment")]
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub detect_sentiment: Option<bool>,
774    /// <p>If <code>status</code> is <code>FAILED</code>, Amazon Lex explains why it failed to build the bot.</p>
775    #[serde(rename = "failureReason")]
776    #[serde(skip_serializing_if = "Option::is_none")]
777    pub failure_reason: Option<String>,
778    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. For more information, see <a>PutBot</a>.</p>
779    #[serde(rename = "idleSessionTTLInSeconds")]
780    #[serde(skip_serializing_if = "Option::is_none")]
781    pub idle_session_ttl_in_seconds: Option<i64>,
782    /// <p>An array of <code>intent</code> objects. For more information, see <a>PutBot</a>.</p>
783    #[serde(rename = "intents")]
784    #[serde(skip_serializing_if = "Option::is_none")]
785    pub intents: Option<Vec<Intent>>,
786    /// <p>The date that the bot was updated. When you create a resource, the creation date and last updated date are the same. </p>
787    #[serde(rename = "lastUpdatedDate")]
788    #[serde(skip_serializing_if = "Option::is_none")]
789    pub last_updated_date: Option<f64>,
790    /// <p> The target locale for the bot. </p>
791    #[serde(rename = "locale")]
792    #[serde(skip_serializing_if = "Option::is_none")]
793    pub locale: Option<String>,
794    /// <p>The name of the bot.</p>
795    #[serde(rename = "name")]
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub name: Option<String>,
798    /// <p>The status of the bot. </p> <p>When the status is <code>BUILDING</code> Amazon Lex is building the bot for testing and use.</p> <p>If the status of the bot is <code>READY_BASIC_TESTING</code>, you can test the bot using the exact utterances specified in the bot's intents. When the bot is ready for full testing or to run, the status is <code>READY</code>.</p> <p>If there was a problem with building the bot, the status is <code>FAILED</code> and the <code>failureReason</code> field explains why the bot did not build.</p> <p>If the bot was saved but not built, the status is <code>NOT_BUILT</code>.</p>
799    #[serde(rename = "status")]
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub status: Option<String>,
802    /// <p>The version of the bot. For a new bot, the version is always <code>$LATEST</code>.</p>
803    #[serde(rename = "version")]
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub version: Option<String>,
806    /// <p>The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. For more information, see <a>PutBot</a>.</p>
807    #[serde(rename = "voiceId")]
808    #[serde(skip_serializing_if = "Option::is_none")]
809    pub voice_id: Option<String>,
810}
811
812#[derive(Clone, Debug, Default, PartialEq, Serialize)]
813#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
814pub struct GetBotVersionsRequest {
815    /// <p>The maximum number of bot versions to return in the response. The default is 10.</p>
816    #[serde(rename = "maxResults")]
817    #[serde(skip_serializing_if = "Option::is_none")]
818    pub max_results: Option<i64>,
819    /// <p>The name of the bot for which versions should be returned.</p>
820    #[serde(rename = "name")]
821    pub name: String,
822    /// <p>A pagination token for fetching the next page of bot versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request. </p>
823    #[serde(rename = "nextToken")]
824    #[serde(skip_serializing_if = "Option::is_none")]
825    pub next_token: Option<String>,
826}
827
828#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
829#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
830pub struct GetBotVersionsResponse {
831    /// <p>An array of <code>BotMetadata</code> objects, one for each numbered version of the bot plus one for the <code>$LATEST</code> version.</p>
832    #[serde(rename = "bots")]
833    #[serde(skip_serializing_if = "Option::is_none")]
834    pub bots: Option<Vec<BotMetadata>>,
835    /// <p>A pagination token for fetching the next page of bot versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request. </p>
836    #[serde(rename = "nextToken")]
837    #[serde(skip_serializing_if = "Option::is_none")]
838    pub next_token: Option<String>,
839}
840
841#[derive(Clone, Debug, Default, PartialEq, Serialize)]
842#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
843pub struct GetBotsRequest {
844    /// <p>The maximum number of bots to return in the response that the request will return. The default is 10.</p>
845    #[serde(rename = "maxResults")]
846    #[serde(skip_serializing_if = "Option::is_none")]
847    pub max_results: Option<i64>,
848    /// <p>Substring to match in bot names. A bot will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
849    #[serde(rename = "nameContains")]
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub name_contains: Option<String>,
852    /// <p>A pagination token that fetches the next page of bots. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of bots, specify the pagination token in the next request. </p>
853    #[serde(rename = "nextToken")]
854    #[serde(skip_serializing_if = "Option::is_none")]
855    pub next_token: Option<String>,
856}
857
858#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
859#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
860pub struct GetBotsResponse {
861    /// <p>An array of <code>botMetadata</code> objects, with one entry for each bot. </p>
862    #[serde(rename = "bots")]
863    #[serde(skip_serializing_if = "Option::is_none")]
864    pub bots: Option<Vec<BotMetadata>>,
865    /// <p>If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of bots. </p>
866    #[serde(rename = "nextToken")]
867    #[serde(skip_serializing_if = "Option::is_none")]
868    pub next_token: Option<String>,
869}
870
871#[derive(Clone, Debug, Default, PartialEq, Serialize)]
872#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
873pub struct GetBuiltinIntentRequest {
874    /// <p>The unique identifier for a built-in intent. 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>
875    #[serde(rename = "signature")]
876    pub signature: String,
877}
878
879#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
880#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
881pub struct GetBuiltinIntentResponse {
882    /// <p>The unique identifier for a built-in intent.</p>
883    #[serde(rename = "signature")]
884    #[serde(skip_serializing_if = "Option::is_none")]
885    pub signature: Option<String>,
886    /// <p>An array of <code>BuiltinIntentSlot</code> objects, one entry for each slot type in the intent.</p>
887    #[serde(rename = "slots")]
888    #[serde(skip_serializing_if = "Option::is_none")]
889    pub slots: Option<Vec<BuiltinIntentSlot>>,
890    /// <p>A list of locales that the intent supports.</p>
891    #[serde(rename = "supportedLocales")]
892    #[serde(skip_serializing_if = "Option::is_none")]
893    pub supported_locales: Option<Vec<String>>,
894}
895
896#[derive(Clone, Debug, Default, PartialEq, Serialize)]
897#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
898pub struct GetBuiltinIntentsRequest {
899    /// <p>A list of locales that the intent supports.</p>
900    #[serde(rename = "locale")]
901    #[serde(skip_serializing_if = "Option::is_none")]
902    pub locale: Option<String>,
903    /// <p>The maximum number of intents to return in the response. The default is 10.</p>
904    #[serde(rename = "maxResults")]
905    #[serde(skip_serializing_if = "Option::is_none")]
906    pub max_results: Option<i64>,
907    /// <p>A pagination token that fetches the next page of intents. If this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of intents, use the pagination token in the next request.</p>
908    #[serde(rename = "nextToken")]
909    #[serde(skip_serializing_if = "Option::is_none")]
910    pub next_token: Option<String>,
911    /// <p>Substring to match in built-in intent signatures. An intent will be returned if any part of its signature matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz." 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>
912    #[serde(rename = "signatureContains")]
913    #[serde(skip_serializing_if = "Option::is_none")]
914    pub signature_contains: Option<String>,
915}
916
917#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
918#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
919pub struct GetBuiltinIntentsResponse {
920    /// <p>An array of <code>builtinIntentMetadata</code> objects, one for each intent in the response.</p>
921    #[serde(rename = "intents")]
922    #[serde(skip_serializing_if = "Option::is_none")]
923    pub intents: Option<Vec<BuiltinIntentMetadata>>,
924    /// <p>A pagination token that fetches the next page of intents. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of intents, specify the pagination token in the next request.</p>
925    #[serde(rename = "nextToken")]
926    #[serde(skip_serializing_if = "Option::is_none")]
927    pub next_token: Option<String>,
928}
929
930#[derive(Clone, Debug, Default, PartialEq, Serialize)]
931#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
932pub struct GetBuiltinSlotTypesRequest {
933    /// <p>A list of locales that the slot type supports.</p>
934    #[serde(rename = "locale")]
935    #[serde(skip_serializing_if = "Option::is_none")]
936    pub locale: Option<String>,
937    /// <p>The maximum number of slot types to return in the response. The default is 10.</p>
938    #[serde(rename = "maxResults")]
939    #[serde(skip_serializing_if = "Option::is_none")]
940    pub max_results: Option<i64>,
941    /// <p>A pagination token that fetches the next page of slot types. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of slot types, specify the pagination token in the next request.</p>
942    #[serde(rename = "nextToken")]
943    #[serde(skip_serializing_if = "Option::is_none")]
944    pub next_token: Option<String>,
945    /// <p>Substring to match in built-in slot type signatures. A slot type will be returned if any part of its signature matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
946    #[serde(rename = "signatureContains")]
947    #[serde(skip_serializing_if = "Option::is_none")]
948    pub signature_contains: Option<String>,
949}
950
951#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
952#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
953pub struct GetBuiltinSlotTypesResponse {
954    /// <p>If the response is truncated, the response includes a pagination token that you can use in your next request to fetch the next page of slot types.</p>
955    #[serde(rename = "nextToken")]
956    #[serde(skip_serializing_if = "Option::is_none")]
957    pub next_token: Option<String>,
958    /// <p>An array of <code>BuiltInSlotTypeMetadata</code> objects, one entry for each slot type returned.</p>
959    #[serde(rename = "slotTypes")]
960    #[serde(skip_serializing_if = "Option::is_none")]
961    pub slot_types: Option<Vec<BuiltinSlotTypeMetadata>>,
962}
963
964#[derive(Clone, Debug, Default, PartialEq, Serialize)]
965#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
966pub struct GetExportRequest {
967    /// <p>The format of the exported data.</p>
968    #[serde(rename = "exportType")]
969    pub export_type: String,
970    /// <p>The name of the bot to export.</p>
971    #[serde(rename = "name")]
972    pub name: String,
973    /// <p>The type of resource to export. </p>
974    #[serde(rename = "resourceType")]
975    pub resource_type: String,
976    /// <p>The version of the bot to export.</p>
977    #[serde(rename = "version")]
978    pub version: String,
979}
980
981#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
982#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
983pub struct GetExportResponse {
984    /// <p><p>The status of the export. </p> <ul> <li> <p> <code>IN_PROGRESS</code> - The export is in progress.</p> </li> <li> <p> <code>READY</code> - The export is complete.</p> </li> <li> <p> <code>FAILED</code> - The export could not be completed.</p> </li> </ul></p>
985    #[serde(rename = "exportStatus")]
986    #[serde(skip_serializing_if = "Option::is_none")]
987    pub export_status: Option<String>,
988    /// <p>The format of the exported data.</p>
989    #[serde(rename = "exportType")]
990    #[serde(skip_serializing_if = "Option::is_none")]
991    pub export_type: Option<String>,
992    /// <p>If <code>status</code> is <code>FAILED</code>, Amazon Lex provides the reason that it failed to export the resource.</p>
993    #[serde(rename = "failureReason")]
994    #[serde(skip_serializing_if = "Option::is_none")]
995    pub failure_reason: Option<String>,
996    /// <p>The name of the bot being exported.</p>
997    #[serde(rename = "name")]
998    #[serde(skip_serializing_if = "Option::is_none")]
999    pub name: Option<String>,
1000    /// <p>The type of the exported resource.</p>
1001    #[serde(rename = "resourceType")]
1002    #[serde(skip_serializing_if = "Option::is_none")]
1003    pub resource_type: Option<String>,
1004    /// <p>An S3 pre-signed URL that provides the location of the exported resource. The exported resource is a ZIP archive that contains the exported resource in JSON format. The structure of the archive may change. Your code should not rely on the archive structure.</p>
1005    #[serde(rename = "url")]
1006    #[serde(skip_serializing_if = "Option::is_none")]
1007    pub url: Option<String>,
1008    /// <p>The version of the bot being exported.</p>
1009    #[serde(rename = "version")]
1010    #[serde(skip_serializing_if = "Option::is_none")]
1011    pub version: Option<String>,
1012}
1013
1014#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1015#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1016pub struct GetImportRequest {
1017    /// <p>The identifier of the import job information to return.</p>
1018    #[serde(rename = "importId")]
1019    pub import_id: String,
1020}
1021
1022#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1023#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1024pub struct GetImportResponse {
1025    /// <p>A timestamp for the date and time that the import job was created.</p>
1026    #[serde(rename = "createdDate")]
1027    #[serde(skip_serializing_if = "Option::is_none")]
1028    pub created_date: Option<f64>,
1029    /// <p>A string that describes why an import job failed to complete.</p>
1030    #[serde(rename = "failureReason")]
1031    #[serde(skip_serializing_if = "Option::is_none")]
1032    pub failure_reason: Option<Vec<String>>,
1033    /// <p>The identifier for the specific import job.</p>
1034    #[serde(rename = "importId")]
1035    #[serde(skip_serializing_if = "Option::is_none")]
1036    pub import_id: Option<String>,
1037    /// <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure from the <code>failureReason</code> field.</p>
1038    #[serde(rename = "importStatus")]
1039    #[serde(skip_serializing_if = "Option::is_none")]
1040    pub import_status: Option<String>,
1041    /// <p>The action taken when there was a conflict between an existing resource and a resource in the import file.</p>
1042    #[serde(rename = "mergeStrategy")]
1043    #[serde(skip_serializing_if = "Option::is_none")]
1044    pub merge_strategy: Option<String>,
1045    /// <p>The name given to the import job.</p>
1046    #[serde(rename = "name")]
1047    #[serde(skip_serializing_if = "Option::is_none")]
1048    pub name: Option<String>,
1049    /// <p>The type of resource imported.</p>
1050    #[serde(rename = "resourceType")]
1051    #[serde(skip_serializing_if = "Option::is_none")]
1052    pub resource_type: Option<String>,
1053}
1054
1055#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1056#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1057pub struct GetIntentRequest {
1058    /// <p>The name of the intent. The name is case sensitive. </p>
1059    #[serde(rename = "name")]
1060    pub name: String,
1061    /// <p>The version of the intent.</p>
1062    #[serde(rename = "version")]
1063    pub version: String,
1064}
1065
1066#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1067#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1068pub struct GetIntentResponse {
1069    /// <p>Checksum of the intent.</p>
1070    #[serde(rename = "checksum")]
1071    #[serde(skip_serializing_if = "Option::is_none")]
1072    pub checksum: Option<String>,
1073    /// <p>After the Lambda function specified in the <code>fulfillmentActivity</code> element fulfills the intent, Amazon Lex conveys this statement to the user.</p>
1074    #[serde(rename = "conclusionStatement")]
1075    #[serde(skip_serializing_if = "Option::is_none")]
1076    pub conclusion_statement: Option<Statement>,
1077    /// <p>If defined in the bot, Amazon Lex uses prompt to confirm the intent before fulfilling the user's request. For more information, see <a>PutIntent</a>. </p>
1078    #[serde(rename = "confirmationPrompt")]
1079    #[serde(skip_serializing_if = "Option::is_none")]
1080    pub confirmation_prompt: Option<Prompt>,
1081    /// <p>The date that the intent was created.</p>
1082    #[serde(rename = "createdDate")]
1083    #[serde(skip_serializing_if = "Option::is_none")]
1084    pub created_date: Option<f64>,
1085    /// <p>A description of the intent.</p>
1086    #[serde(rename = "description")]
1087    #[serde(skip_serializing_if = "Option::is_none")]
1088    pub description: Option<String>,
1089    /// <p>If defined in the bot, Amazon Amazon Lex invokes this Lambda function for each user input. For more information, see <a>PutIntent</a>. </p>
1090    #[serde(rename = "dialogCodeHook")]
1091    #[serde(skip_serializing_if = "Option::is_none")]
1092    pub dialog_code_hook: Option<CodeHook>,
1093    /// <p>If defined in the bot, Amazon Lex uses this prompt to solicit additional user activity after the intent is fulfilled. For more information, see <a>PutIntent</a>.</p>
1094    #[serde(rename = "followUpPrompt")]
1095    #[serde(skip_serializing_if = "Option::is_none")]
1096    pub follow_up_prompt: Option<FollowUpPrompt>,
1097    /// <p>Describes how the intent is fulfilled. For more information, see <a>PutIntent</a>. </p>
1098    #[serde(rename = "fulfillmentActivity")]
1099    #[serde(skip_serializing_if = "Option::is_none")]
1100    pub fulfillment_activity: Option<FulfillmentActivity>,
1101    /// <p>Configuration information, if any, to connect to an Amazon Kendra index with the <code>AMAZON.KendraSearchIntent</code> intent.</p>
1102    #[serde(rename = "kendraConfiguration")]
1103    #[serde(skip_serializing_if = "Option::is_none")]
1104    pub kendra_configuration: Option<KendraConfiguration>,
1105    /// <p>The date that the intent was updated. When you create a resource, the creation date and the last updated date are the same. </p>
1106    #[serde(rename = "lastUpdatedDate")]
1107    #[serde(skip_serializing_if = "Option::is_none")]
1108    pub last_updated_date: Option<f64>,
1109    /// <p>The name of the intent.</p>
1110    #[serde(rename = "name")]
1111    #[serde(skip_serializing_if = "Option::is_none")]
1112    pub name: Option<String>,
1113    /// <p>A unique identifier for a built-in intent.</p>
1114    #[serde(rename = "parentIntentSignature")]
1115    #[serde(skip_serializing_if = "Option::is_none")]
1116    pub parent_intent_signature: Option<String>,
1117    /// <p>If the user answers "no" to the question defined in <code>confirmationPrompt</code>, Amazon Lex responds with this statement to acknowledge that the intent was canceled. </p>
1118    #[serde(rename = "rejectionStatement")]
1119    #[serde(skip_serializing_if = "Option::is_none")]
1120    pub rejection_statement: Option<Statement>,
1121    /// <p>An array of sample utterances configured for the intent.</p>
1122    #[serde(rename = "sampleUtterances")]
1123    #[serde(skip_serializing_if = "Option::is_none")]
1124    pub sample_utterances: Option<Vec<String>>,
1125    /// <p>An array of intent slots configured for the intent.</p>
1126    #[serde(rename = "slots")]
1127    #[serde(skip_serializing_if = "Option::is_none")]
1128    pub slots: Option<Vec<Slot>>,
1129    /// <p>The version of the intent.</p>
1130    #[serde(rename = "version")]
1131    #[serde(skip_serializing_if = "Option::is_none")]
1132    pub version: Option<String>,
1133}
1134
1135#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1136#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1137pub struct GetIntentVersionsRequest {
1138    /// <p>The maximum number of intent versions to return in the response. The default is 10.</p>
1139    #[serde(rename = "maxResults")]
1140    #[serde(skip_serializing_if = "Option::is_none")]
1141    pub max_results: Option<i64>,
1142    /// <p>The name of the intent for which versions should be returned.</p>
1143    #[serde(rename = "name")]
1144    pub name: String,
1145    /// <p>A pagination token for fetching the next page of intent versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request. </p>
1146    #[serde(rename = "nextToken")]
1147    #[serde(skip_serializing_if = "Option::is_none")]
1148    pub next_token: Option<String>,
1149}
1150
1151#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1152#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1153pub struct GetIntentVersionsResponse {
1154    /// <p>An array of <code>IntentMetadata</code> objects, one for each numbered version of the intent plus one for the <code>$LATEST</code> version.</p>
1155    #[serde(rename = "intents")]
1156    #[serde(skip_serializing_if = "Option::is_none")]
1157    pub intents: Option<Vec<IntentMetadata>>,
1158    /// <p>A pagination token for fetching the next page of intent versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request. </p>
1159    #[serde(rename = "nextToken")]
1160    #[serde(skip_serializing_if = "Option::is_none")]
1161    pub next_token: Option<String>,
1162}
1163
1164#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1165#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1166pub struct GetIntentsRequest {
1167    /// <p>The maximum number of intents to return in the response. The default is 10.</p>
1168    #[serde(rename = "maxResults")]
1169    #[serde(skip_serializing_if = "Option::is_none")]
1170    pub max_results: Option<i64>,
1171    /// <p>Substring to match in intent names. An intent will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
1172    #[serde(rename = "nameContains")]
1173    #[serde(skip_serializing_if = "Option::is_none")]
1174    pub name_contains: Option<String>,
1175    /// <p>A pagination token that fetches the next page of intents. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of intents, specify the pagination token in the next request. </p>
1176    #[serde(rename = "nextToken")]
1177    #[serde(skip_serializing_if = "Option::is_none")]
1178    pub next_token: Option<String>,
1179}
1180
1181#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1182#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1183pub struct GetIntentsResponse {
1184    /// <p>An array of <code>Intent</code> objects. For more information, see <a>PutBot</a>.</p>
1185    #[serde(rename = "intents")]
1186    #[serde(skip_serializing_if = "Option::is_none")]
1187    pub intents: Option<Vec<IntentMetadata>>,
1188    /// <p>If the response is truncated, the response includes a pagination token that you can specify in your next request to fetch the next page of intents. </p>
1189    #[serde(rename = "nextToken")]
1190    #[serde(skip_serializing_if = "Option::is_none")]
1191    pub next_token: Option<String>,
1192}
1193
1194#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1195#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1196pub struct GetSlotTypeRequest {
1197    /// <p>The name of the slot type. The name is case sensitive. </p>
1198    #[serde(rename = "name")]
1199    pub name: String,
1200    /// <p>The version of the slot type. </p>
1201    #[serde(rename = "version")]
1202    pub version: String,
1203}
1204
1205#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1206#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1207pub struct GetSlotTypeResponse {
1208    /// <p>Checksum of the <code>$LATEST</code> version of the slot type.</p>
1209    #[serde(rename = "checksum")]
1210    #[serde(skip_serializing_if = "Option::is_none")]
1211    pub checksum: Option<String>,
1212    /// <p>The date that the slot type was created.</p>
1213    #[serde(rename = "createdDate")]
1214    #[serde(skip_serializing_if = "Option::is_none")]
1215    pub created_date: Option<f64>,
1216    /// <p>A description of the slot type.</p>
1217    #[serde(rename = "description")]
1218    #[serde(skip_serializing_if = "Option::is_none")]
1219    pub description: Option<String>,
1220    /// <p>A list of <code>EnumerationValue</code> objects that defines the values that the slot type can take.</p>
1221    #[serde(rename = "enumerationValues")]
1222    #[serde(skip_serializing_if = "Option::is_none")]
1223    pub enumeration_values: Option<Vec<EnumerationValue>>,
1224    /// <p>The date that the slot type was updated. When you create a resource, the creation date and last update date are the same.</p>
1225    #[serde(rename = "lastUpdatedDate")]
1226    #[serde(skip_serializing_if = "Option::is_none")]
1227    pub last_updated_date: Option<f64>,
1228    /// <p>The name of the slot type.</p>
1229    #[serde(rename = "name")]
1230    #[serde(skip_serializing_if = "Option::is_none")]
1231    pub name: Option<String>,
1232    /// <p>The built-in slot type used as a parent for the slot type.</p>
1233    #[serde(rename = "parentSlotTypeSignature")]
1234    #[serde(skip_serializing_if = "Option::is_none")]
1235    pub parent_slot_type_signature: Option<String>,
1236    /// <p>Configuration information that extends the parent built-in slot type.</p>
1237    #[serde(rename = "slotTypeConfigurations")]
1238    #[serde(skip_serializing_if = "Option::is_none")]
1239    pub slot_type_configurations: Option<Vec<SlotTypeConfiguration>>,
1240    /// <p>The strategy that Amazon Lex uses to determine the value of the slot. For more information, see <a>PutSlotType</a>.</p>
1241    #[serde(rename = "valueSelectionStrategy")]
1242    #[serde(skip_serializing_if = "Option::is_none")]
1243    pub value_selection_strategy: Option<String>,
1244    /// <p>The version of the slot type.</p>
1245    #[serde(rename = "version")]
1246    #[serde(skip_serializing_if = "Option::is_none")]
1247    pub version: Option<String>,
1248}
1249
1250#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1251#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1252pub struct GetSlotTypeVersionsRequest {
1253    /// <p>The maximum number of slot type versions to return in the response. The default is 10.</p>
1254    #[serde(rename = "maxResults")]
1255    #[serde(skip_serializing_if = "Option::is_none")]
1256    pub max_results: Option<i64>,
1257    /// <p>The name of the slot type for which versions should be returned.</p>
1258    #[serde(rename = "name")]
1259    pub name: String,
1260    /// <p>A pagination token for fetching the next page of slot type versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request. </p>
1261    #[serde(rename = "nextToken")]
1262    #[serde(skip_serializing_if = "Option::is_none")]
1263    pub next_token: Option<String>,
1264}
1265
1266#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1267#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1268pub struct GetSlotTypeVersionsResponse {
1269    /// <p>A pagination token for fetching the next page of slot type versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request. </p>
1270    #[serde(rename = "nextToken")]
1271    #[serde(skip_serializing_if = "Option::is_none")]
1272    pub next_token: Option<String>,
1273    /// <p>An array of <code>SlotTypeMetadata</code> objects, one for each numbered version of the slot type plus one for the <code>$LATEST</code> version.</p>
1274    #[serde(rename = "slotTypes")]
1275    #[serde(skip_serializing_if = "Option::is_none")]
1276    pub slot_types: Option<Vec<SlotTypeMetadata>>,
1277}
1278
1279#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1280#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1281pub struct GetSlotTypesRequest {
1282    /// <p>The maximum number of slot types to return in the response. The default is 10.</p>
1283    #[serde(rename = "maxResults")]
1284    #[serde(skip_serializing_if = "Option::is_none")]
1285    pub max_results: Option<i64>,
1286    /// <p>Substring to match in slot type names. A slot type will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
1287    #[serde(rename = "nameContains")]
1288    #[serde(skip_serializing_if = "Option::is_none")]
1289    pub name_contains: Option<String>,
1290    /// <p>A pagination token that fetches the next page of slot types. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch next page of slot types, specify the pagination token in the next request.</p>
1291    #[serde(rename = "nextToken")]
1292    #[serde(skip_serializing_if = "Option::is_none")]
1293    pub next_token: Option<String>,
1294}
1295
1296#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1297#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1298pub struct GetSlotTypesResponse {
1299    /// <p>If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of slot types.</p>
1300    #[serde(rename = "nextToken")]
1301    #[serde(skip_serializing_if = "Option::is_none")]
1302    pub next_token: Option<String>,
1303    /// <p>An array of objects, one for each slot type, that provides information such as the name of the slot type, the version, and a description.</p>
1304    #[serde(rename = "slotTypes")]
1305    #[serde(skip_serializing_if = "Option::is_none")]
1306    pub slot_types: Option<Vec<SlotTypeMetadata>>,
1307}
1308
1309#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1310#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1311pub struct GetUtterancesViewRequest {
1312    /// <p>The name of the bot for which utterance information should be returned.</p>
1313    #[serde(rename = "botName")]
1314    pub bot_name: String,
1315    /// <p>An array of bot versions for which utterance information should be returned. The limit is 5 versions per request.</p>
1316    #[serde(rename = "botVersions")]
1317    pub bot_versions: Vec<String>,
1318    /// <p>To return utterances that were recognized and handled, use <code>Detected</code>. To return utterances that were not recognized, use <code>Missed</code>.</p>
1319    #[serde(rename = "statusType")]
1320    pub status_type: String,
1321}
1322
1323#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1324#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1325pub struct GetUtterancesViewResponse {
1326    /// <p>The name of the bot for which utterance information was returned.</p>
1327    #[serde(rename = "botName")]
1328    #[serde(skip_serializing_if = "Option::is_none")]
1329    pub bot_name: Option<String>,
1330    /// <p>An array of <a>UtteranceList</a> objects, each containing a list of <a>UtteranceData</a> objects describing the utterances that were processed by your bot. The response contains a maximum of 100 <code>UtteranceData</code> objects for each version. Amazon Lex returns the most frequent utterances received by the bot in the last 15 days.</p>
1331    #[serde(rename = "utterances")]
1332    #[serde(skip_serializing_if = "Option::is_none")]
1333    pub utterances: Option<Vec<UtteranceList>>,
1334}
1335
1336/// <p>Identifies the specific version of an intent.</p>
1337#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1338pub struct Intent {
1339    /// <p>The name of the intent.</p>
1340    #[serde(rename = "intentName")]
1341    pub intent_name: String,
1342    /// <p>The version of the intent.</p>
1343    #[serde(rename = "intentVersion")]
1344    pub intent_version: String,
1345}
1346
1347/// <p>Provides information about an intent.</p>
1348#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1349#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1350pub struct IntentMetadata {
1351    /// <p>The date that the intent was created.</p>
1352    #[serde(rename = "createdDate")]
1353    #[serde(skip_serializing_if = "Option::is_none")]
1354    pub created_date: Option<f64>,
1355    /// <p>A description of the intent.</p>
1356    #[serde(rename = "description")]
1357    #[serde(skip_serializing_if = "Option::is_none")]
1358    pub description: Option<String>,
1359    /// <p>The date that the intent was updated. When you create an intent, the creation date and last updated date are the same.</p>
1360    #[serde(rename = "lastUpdatedDate")]
1361    #[serde(skip_serializing_if = "Option::is_none")]
1362    pub last_updated_date: Option<f64>,
1363    /// <p>The name of the intent.</p>
1364    #[serde(rename = "name")]
1365    #[serde(skip_serializing_if = "Option::is_none")]
1366    pub name: Option<String>,
1367    /// <p>The version of the intent.</p>
1368    #[serde(rename = "version")]
1369    #[serde(skip_serializing_if = "Option::is_none")]
1370    pub version: Option<String>,
1371}
1372
1373/// <p>Provides configuration information for the AMAZON.KendraSearchIntent intent. When you use this intent, Amazon Lex searches the specified Amazon Kendra index and returns documents from the index that match the user's utterance. For more information, see <a href="http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html"> AMAZON.KendraSearchIntent</a>.</p>
1374#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1375pub struct KendraConfiguration {
1376    /// <p>The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot. If the Amazon Kendra index does not exist, you get an exception when you call the <code>PutIntent</code> operation.</p>
1377    #[serde(rename = "kendraIndex")]
1378    pub kendra_index: String,
1379    /// <p>A query filter that Amazon Lex sends to Amazon Kendra to filter the response from the query. The filter is in the format defined by Amazon Kendra. For more information, see <a href="http://docs.aws.amazon.com/kendra/latest/dg/filtering.html">Filtering queries</a>.</p> <p>You can override this filter string with a new filter string at runtime.</p>
1380    #[serde(rename = "queryFilterString")]
1381    #[serde(skip_serializing_if = "Option::is_none")]
1382    pub query_filter_string: Option<String>,
1383    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to search the Amazon Kendra index. The role must be in the same account and Region as the Amazon Lex bot. If the role does not exist, you get an exception when you call the <code>PutIntent</code> operation.</p>
1384    #[serde(rename = "role")]
1385    pub role: String,
1386}
1387
1388#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1389#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1390pub struct ListTagsForResourceRequest {
1391    /// <p>The Amazon Resource Name (ARN) of the resource to get a list of tags for.</p>
1392    #[serde(rename = "resourceArn")]
1393    pub resource_arn: String,
1394}
1395
1396#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1397#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1398pub struct ListTagsForResourceResponse {
1399    /// <p>The tags associated with a resource.</p>
1400    #[serde(rename = "tags")]
1401    #[serde(skip_serializing_if = "Option::is_none")]
1402    pub tags: Option<Vec<Tag>>,
1403}
1404
1405/// <p>Settings used to configure delivery mode and destination for conversation logs.</p>
1406#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1407#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1408pub struct LogSettingsRequest {
1409    /// <p>Where the logs will be delivered. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket.</p>
1410    #[serde(rename = "destination")]
1411    pub destination: String,
1412    /// <p>The Amazon Resource Name (ARN) of the AWS KMS customer managed key for encrypting audio logs delivered to an S3 bucket. The key does not apply to CloudWatch Logs and is optional for S3 buckets.</p>
1413    #[serde(rename = "kmsKeyArn")]
1414    #[serde(skip_serializing_if = "Option::is_none")]
1415    pub kms_key_arn: Option<String>,
1416    /// <p>The type of logging to enable. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket.</p>
1417    #[serde(rename = "logType")]
1418    pub log_type: String,
1419    /// <p>The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs should be delivered.</p>
1420    #[serde(rename = "resourceArn")]
1421    pub resource_arn: String,
1422}
1423
1424/// <p>The settings for conversation logs.</p>
1425#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1426#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1427pub struct LogSettingsResponse {
1428    /// <p>The destination where logs are delivered.</p>
1429    #[serde(rename = "destination")]
1430    #[serde(skip_serializing_if = "Option::is_none")]
1431    pub destination: Option<String>,
1432    /// <p>The Amazon Resource Name (ARN) of the key used to encrypt audio logs in an S3 bucket.</p>
1433    #[serde(rename = "kmsKeyArn")]
1434    #[serde(skip_serializing_if = "Option::is_none")]
1435    pub kms_key_arn: Option<String>,
1436    /// <p>The type of logging that is enabled.</p>
1437    #[serde(rename = "logType")]
1438    #[serde(skip_serializing_if = "Option::is_none")]
1439    pub log_type: Option<String>,
1440    /// <p>The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs are delivered.</p>
1441    #[serde(rename = "resourceArn")]
1442    #[serde(skip_serializing_if = "Option::is_none")]
1443    pub resource_arn: Option<String>,
1444    /// <p>The resource prefix is the first part of the S3 object key within the S3 bucket that you specified to contain audio logs. For CloudWatch Logs it is the prefix of the log stream name within the log group that you specified. </p>
1445    #[serde(rename = "resourcePrefix")]
1446    #[serde(skip_serializing_if = "Option::is_none")]
1447    pub resource_prefix: Option<String>,
1448}
1449
1450/// <p>The message object that provides the message text and its type.</p>
1451#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1452pub struct Message {
1453    /// <p>The text of the message.</p>
1454    #[serde(rename = "content")]
1455    pub content: String,
1456    /// <p>The content type of the message string.</p>
1457    #[serde(rename = "contentType")]
1458    pub content_type: String,
1459    /// <p>Identifies the message group that the message belongs to. When a group is assigned to a message, Amazon Lex returns one message from each group in the response.</p>
1460    #[serde(rename = "groupNumber")]
1461    #[serde(skip_serializing_if = "Option::is_none")]
1462    pub group_number: Option<i64>,
1463}
1464
1465/// <p>Obtains information from the user. To define a prompt, provide one or more messages and specify the number of attempts to get information from the user. If you provide more than one message, Amazon Lex chooses one of the messages to use to prompt the user. For more information, see <a>how-it-works</a>.</p>
1466#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1467pub struct Prompt {
1468    /// <p>The number of times to prompt the user for information.</p>
1469    #[serde(rename = "maxAttempts")]
1470    pub max_attempts: i64,
1471    /// <p>An array of objects, each of which provides a message string and its type. You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).</p>
1472    #[serde(rename = "messages")]
1473    pub messages: Vec<Message>,
1474    /// <p>A response card. Amazon Lex uses this prompt at runtime, in the <code>PostText</code> API response. It substitutes session attributes and slot values for placeholders in the response card. For more information, see <a>ex-resp-card</a>. </p>
1475    #[serde(rename = "responseCard")]
1476    #[serde(skip_serializing_if = "Option::is_none")]
1477    pub response_card: Option<String>,
1478}
1479
1480#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1481#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1482pub struct PutBotAliasRequest {
1483    /// <p>The name of the bot.</p>
1484    #[serde(rename = "botName")]
1485    pub bot_name: String,
1486    /// <p>The version of the bot.</p>
1487    #[serde(rename = "botVersion")]
1488    pub bot_version: String,
1489    /// <p>Identifies a specific revision of the <code>$LATEST</code> version.</p> <p>When you create a new bot alias, 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 bot alias, 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>
1490    #[serde(rename = "checksum")]
1491    #[serde(skip_serializing_if = "Option::is_none")]
1492    pub checksum: Option<String>,
1493    /// <p>Settings for conversation logs for the alias.</p>
1494    #[serde(rename = "conversationLogs")]
1495    #[serde(skip_serializing_if = "Option::is_none")]
1496    pub conversation_logs: Option<ConversationLogsRequest>,
1497    /// <p>A description of the alias.</p>
1498    #[serde(rename = "description")]
1499    #[serde(skip_serializing_if = "Option::is_none")]
1500    pub description: Option<String>,
1501    /// <p>The name of the alias. The name is <i>not</i> case sensitive.</p>
1502    #[serde(rename = "name")]
1503    pub name: String,
1504    /// <p>A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the <code>PutBotAlias</code> operation to update the tags on a bot alias. To update tags, use the <code>TagResource</code> operation.</p>
1505    #[serde(rename = "tags")]
1506    #[serde(skip_serializing_if = "Option::is_none")]
1507    pub tags: Option<Vec<Tag>>,
1508}
1509
1510#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1511#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1512pub struct PutBotAliasResponse {
1513    /// <p>The name of the bot that the alias points to.</p>
1514    #[serde(rename = "botName")]
1515    #[serde(skip_serializing_if = "Option::is_none")]
1516    pub bot_name: Option<String>,
1517    /// <p>The version of the bot that the alias points to.</p>
1518    #[serde(rename = "botVersion")]
1519    #[serde(skip_serializing_if = "Option::is_none")]
1520    pub bot_version: Option<String>,
1521    /// <p>The checksum for the current version of the alias.</p>
1522    #[serde(rename = "checksum")]
1523    #[serde(skip_serializing_if = "Option::is_none")]
1524    pub checksum: Option<String>,
1525    /// <p>The settings that determine how Amazon Lex uses conversation logs for the alias.</p>
1526    #[serde(rename = "conversationLogs")]
1527    #[serde(skip_serializing_if = "Option::is_none")]
1528    pub conversation_logs: Option<ConversationLogsResponse>,
1529    /// <p>The date that the bot alias was created.</p>
1530    #[serde(rename = "createdDate")]
1531    #[serde(skip_serializing_if = "Option::is_none")]
1532    pub created_date: Option<f64>,
1533    /// <p>A description of the alias.</p>
1534    #[serde(rename = "description")]
1535    #[serde(skip_serializing_if = "Option::is_none")]
1536    pub description: Option<String>,
1537    /// <p>The date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.</p>
1538    #[serde(rename = "lastUpdatedDate")]
1539    #[serde(skip_serializing_if = "Option::is_none")]
1540    pub last_updated_date: Option<f64>,
1541    /// <p>The name of the alias.</p>
1542    #[serde(rename = "name")]
1543    #[serde(skip_serializing_if = "Option::is_none")]
1544    pub name: Option<String>,
1545    /// <p>A list of tags associated with a bot.</p>
1546    #[serde(rename = "tags")]
1547    #[serde(skip_serializing_if = "Option::is_none")]
1548    pub tags: Option<Vec<Tag>>,
1549}
1550
1551#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1552#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1553pub struct PutBotRequest {
1554    /// <p>When Amazon Lex can't understand the user's input in context, it tries to elicit the information a few times. After that, Amazon Lex sends the message defined in <code>abortStatement</code> to the user, and then aborts the conversation. To set the number of retries, use the <code>valueElicitationPrompt</code> field for the slot type. </p> <p>For example, in a pizza ordering bot, Amazon Lex might ask a user "What type of crust would you like?" If the user's response is not one of the expected responses (for example, "thin crust, "deep dish," etc.), Amazon Lex tries to elicit a correct response a few more times. </p> <p>For example, in a pizza ordering application, <code>OrderPizza</code> might be one of the intents. This intent might require the <code>CrustType</code> slot. You specify the <code>valueElicitationPrompt</code> field when you create the <code>CrustType</code> slot.</p> <p>If you have defined a fallback intent the abort statement will not be sent to the user, the fallback intent is used instead. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html"> AMAZON.FallbackIntent</a>.</p>
1555    #[serde(rename = "abortStatement")]
1556    #[serde(skip_serializing_if = "Option::is_none")]
1557    pub abort_statement: Option<Statement>,
1558    /// <p>Identifies a specific revision of the <code>$LATEST</code> version.</p> <p>When you create a new bot, 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 bot, 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>
1559    #[serde(rename = "checksum")]
1560    #[serde(skip_serializing_if = "Option::is_none")]
1561    pub checksum: Option<String>,
1562    /// <p>For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying <code>true</code> or <code>false</code> in the <code>childDirected</code> field. By specifying <code>true</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying <code>false</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is not</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the <code>childDirected</code> field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.</p> <p>If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the <a href="https://aws.amazon.com/lex/faqs#data-security">Amazon Lex FAQ.</a> </p>
1563    #[serde(rename = "childDirected")]
1564    pub child_directed: bool,
1565    /// <p><p>When Amazon Lex doesn&#39;t understand the user&#39;s intent, it uses this message to get clarification. To specify how many times Amazon Lex should repeat the clarification prompt, use the <code>maxAttempts</code> field. If Amazon Lex still doesn&#39;t understand, it sends the message in the <code>abortStatement</code> field. </p> <p>When you create a clarification prompt, make sure that it suggests the correct response from the user. for example, for a bot that orders pizza and drinks, you might create this clarification prompt: &quot;What would you like to do? You can say &#39;Order a pizza&#39; or &#39;Order a drink.&#39;&quot;</p> <p>If you have defined a fallback intent, it will be invoked if the clarification prompt is repeated the number of times defined in the <code>maxAttempts</code> field. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html"> AMAZON.FallbackIntent</a>.</p> <p>If you don&#39;t define a clarification prompt, at runtime Amazon Lex will return a 400 Bad Request exception in three cases: </p> <ul> <li> <p>Follow-up prompt - When the user responds to a follow-up prompt but does not provide an intent. For example, in response to a follow-up prompt that says &quot;Would you like anything else today?&quot; the user says &quot;Yes.&quot; Amazon Lex will return a 400 Bad Request exception because it does not have a clarification prompt to send to the user to get an intent.</p> </li> <li> <p>Lambda function - When using a Lambda function, you return an <code>ElicitIntent</code> dialog type. Since Amazon Lex does not have a clarification prompt to get an intent from the user, it returns a 400 Bad Request exception.</p> </li> <li> <p>PutSession operation - When using the <code>PutSession</code> operation, you send an <code>ElicitIntent</code> dialog type. Since Amazon Lex does not have a clarification prompt to get an intent from the user, it returns a 400 Bad Request exception.</p> </li> </ul></p>
1566    #[serde(rename = "clarificationPrompt")]
1567    #[serde(skip_serializing_if = "Option::is_none")]
1568    pub clarification_prompt: Option<Prompt>,
1569    /// <p>When set to <code>true</code> a new numbered version of the bot is created. This is the same as calling the <code>CreateBotVersion</code> operation. If you don't specify <code>createVersion</code>, the default is <code>false</code>.</p>
1570    #[serde(rename = "createVersion")]
1571    #[serde(skip_serializing_if = "Option::is_none")]
1572    pub create_version: Option<bool>,
1573    /// <p>A description of the bot.</p>
1574    #[serde(rename = "description")]
1575    #[serde(skip_serializing_if = "Option::is_none")]
1576    pub description: Option<String>,
1577    /// <p>When set to <code>true</code> user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify <code>detectSentiment</code>, the default is <code>false</code>.</p>
1578    #[serde(rename = "detectSentiment")]
1579    #[serde(skip_serializing_if = "Option::is_none")]
1580    pub detect_sentiment: Option<bool>,
1581    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p> <p>A user interaction session remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.</p> <p>For example, suppose that a user chooses the OrderPizza intent, but gets sidetracked halfway through placing an order. If the user doesn't complete the order within the specified time, Amazon Lex discards the slot information that it gathered, and the user must start over.</p> <p>If you don't include the <code>idleSessionTTLInSeconds</code> element in a <code>PutBot</code> operation request, Amazon Lex uses the default value. This is also true if the request replaces an existing bot.</p> <p>The default is 300 seconds (5 minutes).</p>
1582    #[serde(rename = "idleSessionTTLInSeconds")]
1583    #[serde(skip_serializing_if = "Option::is_none")]
1584    pub idle_session_ttl_in_seconds: Option<i64>,
1585    /// <p>An array of <code>Intent</code> objects. Each intent represents a command that a user can express. For example, a pizza ordering bot might support an OrderPizza intent. For more information, see <a>how-it-works</a>.</p>
1586    #[serde(rename = "intents")]
1587    #[serde(skip_serializing_if = "Option::is_none")]
1588    pub intents: Option<Vec<Intent>>,
1589    /// <p> Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. </p> <p>The default is <code>en-US</code>.</p>
1590    #[serde(rename = "locale")]
1591    pub locale: String,
1592    /// <p>The name of the bot. The name is <i>not</i> case sensitive. </p>
1593    #[serde(rename = "name")]
1594    pub name: String,
1595    /// <p>If you set the <code>processBehavior</code> element to <code>BUILD</code>, Amazon Lex builds the bot so that it can be run. If you set the element to <code>SAVE</code> Amazon Lex saves the bot, but doesn't build it. </p> <p>If you don't specify this value, the default value is <code>BUILD</code>.</p>
1596    #[serde(rename = "processBehavior")]
1597    #[serde(skip_serializing_if = "Option::is_none")]
1598    pub process_behavior: Option<String>,
1599    /// <p>A list of tags to add to the bot. You can only add tags when you create a bot, you can't use the <code>PutBot</code> operation to update the tags on a bot. To update tags, use the <code>TagResource</code> operation.</p>
1600    #[serde(rename = "tags")]
1601    #[serde(skip_serializing_if = "Option::is_none")]
1602    pub tags: Option<Vec<Tag>>,
1603    /// <p>The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see <a href="https://docs.aws.amazon.com/polly/latest/dg/voicelist.html">Voices in Amazon Polly</a> in the <i>Amazon Polly Developer Guide</i>.</p>
1604    #[serde(rename = "voiceId")]
1605    #[serde(skip_serializing_if = "Option::is_none")]
1606    pub voice_id: Option<String>,
1607}
1608
1609#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1610#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1611pub struct PutBotResponse {
1612    /// <p>The message that Amazon Lex uses to abort a conversation. For more information, see <a>PutBot</a>.</p>
1613    #[serde(rename = "abortStatement")]
1614    #[serde(skip_serializing_if = "Option::is_none")]
1615    pub abort_statement: Option<Statement>,
1616    /// <p>Checksum of the bot that you created.</p>
1617    #[serde(rename = "checksum")]
1618    #[serde(skip_serializing_if = "Option::is_none")]
1619    pub checksum: Option<String>,
1620    /// <p>For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying <code>true</code> or <code>false</code> in the <code>childDirected</code> field. By specifying <code>true</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying <code>false</code> in the <code>childDirected</code> field, you confirm that your use of Amazon Lex <b>is not</b> related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the <code>childDirected</code> field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.</p> <p>If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the <a href="https://aws.amazon.com/lex/faqs#data-security">Amazon Lex FAQ.</a> </p>
1621    #[serde(rename = "childDirected")]
1622    #[serde(skip_serializing_if = "Option::is_none")]
1623    pub child_directed: Option<bool>,
1624    /// <p> The prompts that Amazon Lex uses when it doesn't understand the user's intent. For more information, see <a>PutBot</a>. </p>
1625    #[serde(rename = "clarificationPrompt")]
1626    #[serde(skip_serializing_if = "Option::is_none")]
1627    pub clarification_prompt: Option<Prompt>,
1628    /// <p> <code>True</code> if a new version of the bot was created. If the <code>createVersion</code> field was not specified in the request, the <code>createVersion</code> field is set to false in the response.</p>
1629    #[serde(rename = "createVersion")]
1630    #[serde(skip_serializing_if = "Option::is_none")]
1631    pub create_version: Option<bool>,
1632    /// <p>The date that the bot was created.</p>
1633    #[serde(rename = "createdDate")]
1634    #[serde(skip_serializing_if = "Option::is_none")]
1635    pub created_date: Option<f64>,
1636    /// <p>A description of the bot.</p>
1637    #[serde(rename = "description")]
1638    #[serde(skip_serializing_if = "Option::is_none")]
1639    pub description: Option<String>,
1640    /// <p> <code>true</code> if the bot is configured to send user utterances to Amazon Comprehend for sentiment analysis. If the <code>detectSentiment</code> field was not specified in the request, the <code>detectSentiment</code> field is <code>false</code> in the response.</p>
1641    #[serde(rename = "detectSentiment")]
1642    #[serde(skip_serializing_if = "Option::is_none")]
1643    pub detect_sentiment: Option<bool>,
1644    /// <p>If <code>status</code> is <code>FAILED</code>, Amazon Lex provides the reason that it failed to build the bot.</p>
1645    #[serde(rename = "failureReason")]
1646    #[serde(skip_serializing_if = "Option::is_none")]
1647    pub failure_reason: Option<String>,
1648    /// <p>The maximum length of time that Amazon Lex retains the data gathered in a conversation. For more information, see <a>PutBot</a>.</p>
1649    #[serde(rename = "idleSessionTTLInSeconds")]
1650    #[serde(skip_serializing_if = "Option::is_none")]
1651    pub idle_session_ttl_in_seconds: Option<i64>,
1652    /// <p>An array of <code>Intent</code> objects. For more information, see <a>PutBot</a>.</p>
1653    #[serde(rename = "intents")]
1654    #[serde(skip_serializing_if = "Option::is_none")]
1655    pub intents: Option<Vec<Intent>>,
1656    /// <p>The date that the bot was updated. When you create a resource, the creation date and last updated date are the same.</p>
1657    #[serde(rename = "lastUpdatedDate")]
1658    #[serde(skip_serializing_if = "Option::is_none")]
1659    pub last_updated_date: Option<f64>,
1660    /// <p> The target locale for the bot. </p>
1661    #[serde(rename = "locale")]
1662    #[serde(skip_serializing_if = "Option::is_none")]
1663    pub locale: Option<String>,
1664    /// <p>The name of the bot.</p>
1665    #[serde(rename = "name")]
1666    #[serde(skip_serializing_if = "Option::is_none")]
1667    pub name: Option<String>,
1668    /// <p> When you send a request to create a bot with <code>processBehavior</code> set to <code>BUILD</code>, Amazon Lex sets the <code>status</code> response element to <code>BUILDING</code>.</p> <p>In the <code>READY_BASIC_TESTING</code> state you can test the bot with user inputs that exactly match the utterances configured for the bot's intents and values in the slot types.</p> <p>If Amazon Lex can't build the bot, Amazon Lex sets <code>status</code> to <code>FAILED</code>. Amazon Lex returns the reason for the failure in the <code>failureReason</code> response element. </p> <p>When you set <code>processBehavior</code> to <code>SAVE</code>, Amazon Lex sets the status code to <code>NOT BUILT</code>.</p> <p>When the bot is in the <code>READY</code> state you can test and publish the bot.</p>
1669    #[serde(rename = "status")]
1670    #[serde(skip_serializing_if = "Option::is_none")]
1671    pub status: Option<String>,
1672    /// <p>A list of tags associated with the bot.</p>
1673    #[serde(rename = "tags")]
1674    #[serde(skip_serializing_if = "Option::is_none")]
1675    pub tags: Option<Vec<Tag>>,
1676    /// <p>The version of the bot. For a new bot, the version is always <code>$LATEST</code>.</p>
1677    #[serde(rename = "version")]
1678    #[serde(skip_serializing_if = "Option::is_none")]
1679    pub version: Option<String>,
1680    /// <p>The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. For more information, see <a>PutBot</a>.</p>
1681    #[serde(rename = "voiceId")]
1682    #[serde(skip_serializing_if = "Option::is_none")]
1683    pub voice_id: Option<String>,
1684}
1685
1686#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1687#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1688pub struct PutIntentRequest {
1689    /// <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>
1690    #[serde(rename = "checksum")]
1691    #[serde(skip_serializing_if = "Option::is_none")]
1692    pub checksum: Option<String>,
1693    /// <p><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&#39;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></p>
1694    #[serde(rename = "conclusionStatement")]
1695    #[serde(skip_serializing_if = "Option::is_none")]
1696    pub conclusion_statement: Option<Statement>,
1697    /// <p><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></p>
1698    #[serde(rename = "confirmationPrompt")]
1699    #[serde(skip_serializing_if = "Option::is_none")]
1700    pub confirmation_prompt: Option<Prompt>,
1701    /// <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>
1702    #[serde(rename = "createVersion")]
1703    #[serde(skip_serializing_if = "Option::is_none")]
1704    pub create_version: Option<bool>,
1705    /// <p>A description of the intent.</p>
1706    #[serde(rename = "description")]
1707    #[serde(skip_serializing_if = "Option::is_none")]
1708    pub description: Option<String>,
1709    /// <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>
1710    #[serde(rename = "dialogCodeHook")]
1711    #[serde(skip_serializing_if = "Option::is_none")]
1712    pub dialog_code_hook: Option<CodeHook>,
1713    /// <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>
1714    #[serde(rename = "followUpPrompt")]
1715    #[serde(skip_serializing_if = "Option::is_none")]
1716    pub follow_up_prompt: Option<FollowUpPrompt>,
1717    /// <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>
1718    #[serde(rename = "fulfillmentActivity")]
1719    #[serde(skip_serializing_if = "Option::is_none")]
1720    pub fulfillment_activity: Option<FulfillmentActivity>,
1721    /// <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>
1722    #[serde(rename = "kendraConfiguration")]
1723    #[serde(skip_serializing_if = "Option::is_none")]
1724    pub kendra_configuration: Option<KendraConfiguration>,
1725    /// <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>
1726    #[serde(rename = "name")]
1727    pub name: String,
1728    /// <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>
1729    #[serde(rename = "parentIntentSignature")]
1730    #[serde(skip_serializing_if = "Option::is_none")]
1731    pub parent_intent_signature: Option<String>,
1732    /// <p><p>When the user answers &quot;no&quot; 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></p>
1733    #[serde(rename = "rejectionStatement")]
1734    #[serde(skip_serializing_if = "Option::is_none")]
1735    pub rejection_statement: Option<Statement>,
1736    /// <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>
1737    #[serde(rename = "sampleUtterances")]
1738    #[serde(skip_serializing_if = "Option::is_none")]
1739    pub sample_utterances: Option<Vec<String>>,
1740    /// <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 <a>how-it-works</a>. </p>
1741    #[serde(rename = "slots")]
1742    #[serde(skip_serializing_if = "Option::is_none")]
1743    pub slots: Option<Vec<Slot>>,
1744}
1745
1746#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1747#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1748pub struct PutIntentResponse {
1749    /// <p>Checksum of the <code>$LATEST</code>version of the intent created or updated.</p>
1750    #[serde(rename = "checksum")]
1751    #[serde(skip_serializing_if = "Option::is_none")]
1752    pub checksum: Option<String>,
1753    /// <p>After the Lambda function specified in the<code>fulfillmentActivity</code>intent fulfills the intent, Amazon Lex conveys this statement to the user.</p>
1754    #[serde(rename = "conclusionStatement")]
1755    #[serde(skip_serializing_if = "Option::is_none")]
1756    pub conclusion_statement: Option<Statement>,
1757    /// <p>If defined in the intent, Amazon Lex prompts the user to confirm the intent before fulfilling it.</p>
1758    #[serde(rename = "confirmationPrompt")]
1759    #[serde(skip_serializing_if = "Option::is_none")]
1760    pub confirmation_prompt: Option<Prompt>,
1761    /// <p> <code>True</code> if a new version of the intent was created. If the <code>createVersion</code> field was not specified in the request, the <code>createVersion</code> field is set to false in the response.</p>
1762    #[serde(rename = "createVersion")]
1763    #[serde(skip_serializing_if = "Option::is_none")]
1764    pub create_version: Option<bool>,
1765    /// <p>The date that the intent was created.</p>
1766    #[serde(rename = "createdDate")]
1767    #[serde(skip_serializing_if = "Option::is_none")]
1768    pub created_date: Option<f64>,
1769    /// <p>A description of the intent.</p>
1770    #[serde(rename = "description")]
1771    #[serde(skip_serializing_if = "Option::is_none")]
1772    pub description: Option<String>,
1773    /// <p>If defined in the intent, Amazon Lex invokes this Lambda function for each user input.</p>
1774    #[serde(rename = "dialogCodeHook")]
1775    #[serde(skip_serializing_if = "Option::is_none")]
1776    pub dialog_code_hook: Option<CodeHook>,
1777    /// <p>If defined in the intent, Amazon Lex uses this prompt to solicit additional user activity after the intent is fulfilled.</p>
1778    #[serde(rename = "followUpPrompt")]
1779    #[serde(skip_serializing_if = "Option::is_none")]
1780    pub follow_up_prompt: Option<FollowUpPrompt>,
1781    /// <p>If defined in the intent, Amazon Lex invokes this Lambda function to fulfill the intent after the user provides all of the information required by the intent.</p>
1782    #[serde(rename = "fulfillmentActivity")]
1783    #[serde(skip_serializing_if = "Option::is_none")]
1784    pub fulfillment_activity: Option<FulfillmentActivity>,
1785    /// <p>Configuration information, if any, required to connect to an Amazon Kendra index and use the <code>AMAZON.KendraSearchIntent</code> intent.</p>
1786    #[serde(rename = "kendraConfiguration")]
1787    #[serde(skip_serializing_if = "Option::is_none")]
1788    pub kendra_configuration: Option<KendraConfiguration>,
1789    /// <p>The date that the intent was updated. When you create a resource, the creation date and last update dates are the same.</p>
1790    #[serde(rename = "lastUpdatedDate")]
1791    #[serde(skip_serializing_if = "Option::is_none")]
1792    pub last_updated_date: Option<f64>,
1793    /// <p>The name of the intent.</p>
1794    #[serde(rename = "name")]
1795    #[serde(skip_serializing_if = "Option::is_none")]
1796    pub name: Option<String>,
1797    /// <p>A unique identifier for the built-in intent that this intent is based on.</p>
1798    #[serde(rename = "parentIntentSignature")]
1799    #[serde(skip_serializing_if = "Option::is_none")]
1800    pub parent_intent_signature: Option<String>,
1801    /// <p>If the user answers "no" to the question defined in <code>confirmationPrompt</code> Amazon Lex responds with this statement to acknowledge that the intent was canceled. </p>
1802    #[serde(rename = "rejectionStatement")]
1803    #[serde(skip_serializing_if = "Option::is_none")]
1804    pub rejection_statement: Option<Statement>,
1805    /// <p> An array of sample utterances that are configured for the intent. </p>
1806    #[serde(rename = "sampleUtterances")]
1807    #[serde(skip_serializing_if = "Option::is_none")]
1808    pub sample_utterances: Option<Vec<String>>,
1809    /// <p>An array of intent slots that are configured for the intent.</p>
1810    #[serde(rename = "slots")]
1811    #[serde(skip_serializing_if = "Option::is_none")]
1812    pub slots: Option<Vec<Slot>>,
1813    /// <p>The version of the intent. For a new intent, the version is always <code>$LATEST</code>.</p>
1814    #[serde(rename = "version")]
1815    #[serde(skip_serializing_if = "Option::is_none")]
1816    pub version: Option<String>,
1817}
1818
1819#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1820#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1821pub struct PutSlotTypeRequest {
1822    /// <p>Identifies a specific revision of the <code>$LATEST</code> version.</p> <p>When you create a new slot type, 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 slot type, 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>
1823    #[serde(rename = "checksum")]
1824    #[serde(skip_serializing_if = "Option::is_none")]
1825    pub checksum: Option<String>,
1826    /// <p>When set to <code>true</code> a new numbered version of the slot type is created. This is the same as calling the <code>CreateSlotTypeVersion</code> operation. If you do not specify <code>createVersion</code>, the default is <code>false</code>.</p>
1827    #[serde(rename = "createVersion")]
1828    #[serde(skip_serializing_if = "Option::is_none")]
1829    pub create_version: Option<bool>,
1830    /// <p>A description of the slot type.</p>
1831    #[serde(rename = "description")]
1832    #[serde(skip_serializing_if = "Option::is_none")]
1833    pub description: Option<String>,
1834    /// <p>A list of <code>EnumerationValue</code> objects that defines the values that the slot type can take. Each value can have a list of <code>synonyms</code>, which are additional values that help train the machine learning model about the values that it resolves for a slot. </p> <p>When Amazon Lex resolves a slot value, it generates a resolution list that contains up to five possible values for the slot. If you are using a Lambda function, this resolution list is passed to the function. If you are not using a Lambda function you can choose to return the value that the user entered or the first value in the resolution list as the slot value. The <code>valueSelectionStrategy</code> field indicates the option to use. </p>
1835    #[serde(rename = "enumerationValues")]
1836    #[serde(skip_serializing_if = "Option::is_none")]
1837    pub enumeration_values: Option<Vec<EnumerationValue>>,
1838    /// <p>The name of the slot type. The name is <i>not</i> case sensitive. </p> <p>The name can't match a built-in slot type name, or a built-in slot type name with "AMAZON." removed. For example, because there is a built-in slot type called <code>AMAZON.DATE</code>, you can't create a custom slot type called <code>DATE</code>.</p> <p>For a list of built-in slot types, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference">Slot Type Reference</a> in the <i>Alexa Skills Kit</i>.</p>
1839    #[serde(rename = "name")]
1840    pub name: String,
1841    /// <p>The built-in slot type used as the parent of the slot type. When you define a parent slot type, the new slot type has all of the same configuration as the parent.</p> <p>Only <code>AMAZON.AlphaNumeric</code> is supported.</p>
1842    #[serde(rename = "parentSlotTypeSignature")]
1843    #[serde(skip_serializing_if = "Option::is_none")]
1844    pub parent_slot_type_signature: Option<String>,
1845    /// <p>Configuration information that extends the parent built-in slot type. The configuration is added to the settings for the parent slot type.</p>
1846    #[serde(rename = "slotTypeConfigurations")]
1847    #[serde(skip_serializing_if = "Option::is_none")]
1848    pub slot_type_configurations: Option<Vec<SlotTypeConfiguration>>,
1849    /// <p>Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:</p> <ul> <li> <p> <code>ORIGINAL_VALUE</code> - Returns the value entered by the user, if the user value is similar to the slot value.</p> </li> <li> <p> <code>TOP_RESOLUTION</code> - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.</p> </li> </ul> <p>If you don't specify the <code>valueSelectionStrategy</code>, the default is <code>ORIGINAL_VALUE</code>.</p>
1850    #[serde(rename = "valueSelectionStrategy")]
1851    #[serde(skip_serializing_if = "Option::is_none")]
1852    pub value_selection_strategy: Option<String>,
1853}
1854
1855#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1856#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1857pub struct PutSlotTypeResponse {
1858    /// <p>Checksum of the <code>$LATEST</code> version of the slot type.</p>
1859    #[serde(rename = "checksum")]
1860    #[serde(skip_serializing_if = "Option::is_none")]
1861    pub checksum: Option<String>,
1862    /// <p> <code>True</code> if a new version of the slot type was created. If the <code>createVersion</code> field was not specified in the request, the <code>createVersion</code> field is set to false in the response.</p>
1863    #[serde(rename = "createVersion")]
1864    #[serde(skip_serializing_if = "Option::is_none")]
1865    pub create_version: Option<bool>,
1866    /// <p>The date that the slot type was created.</p>
1867    #[serde(rename = "createdDate")]
1868    #[serde(skip_serializing_if = "Option::is_none")]
1869    pub created_date: Option<f64>,
1870    /// <p>A description of the slot type.</p>
1871    #[serde(rename = "description")]
1872    #[serde(skip_serializing_if = "Option::is_none")]
1873    pub description: Option<String>,
1874    /// <p>A list of <code>EnumerationValue</code> objects that defines the values that the slot type can take.</p>
1875    #[serde(rename = "enumerationValues")]
1876    #[serde(skip_serializing_if = "Option::is_none")]
1877    pub enumeration_values: Option<Vec<EnumerationValue>>,
1878    /// <p>The date that the slot type was updated. When you create a slot type, the creation date and last update date are the same.</p>
1879    #[serde(rename = "lastUpdatedDate")]
1880    #[serde(skip_serializing_if = "Option::is_none")]
1881    pub last_updated_date: Option<f64>,
1882    /// <p>The name of the slot type.</p>
1883    #[serde(rename = "name")]
1884    #[serde(skip_serializing_if = "Option::is_none")]
1885    pub name: Option<String>,
1886    /// <p>The built-in slot type used as the parent of the slot type.</p>
1887    #[serde(rename = "parentSlotTypeSignature")]
1888    #[serde(skip_serializing_if = "Option::is_none")]
1889    pub parent_slot_type_signature: Option<String>,
1890    /// <p>Configuration information that extends the parent built-in slot type.</p>
1891    #[serde(rename = "slotTypeConfigurations")]
1892    #[serde(skip_serializing_if = "Option::is_none")]
1893    pub slot_type_configurations: Option<Vec<SlotTypeConfiguration>>,
1894    /// <p>The slot resolution strategy that Amazon Lex uses to determine the value of the slot. For more information, see <a>PutSlotType</a>.</p>
1895    #[serde(rename = "valueSelectionStrategy")]
1896    #[serde(skip_serializing_if = "Option::is_none")]
1897    pub value_selection_strategy: Option<String>,
1898    /// <p>The version of the slot type. For a new slot type, the version is always <code>$LATEST</code>. </p>
1899    #[serde(rename = "version")]
1900    #[serde(skip_serializing_if = "Option::is_none")]
1901    pub version: Option<String>,
1902}
1903
1904/// <p>Describes the resource that refers to the resource that you are attempting to delete. This object is returned as part of the <code>ResourceInUseException</code> exception. </p>
1905#[derive(Clone, Debug, Default, PartialEq)]
1906pub struct ResourceReference {
1907    /// <p>The name of the resource that is using the resource that you are trying to delete.</p>
1908    pub name: Option<String>,
1909    /// <p>The version of the resource that is using the resource that you are trying to delete.</p>
1910    pub version: Option<String>,
1911}
1912
1913/// <p>Identifies the version of a specific slot.</p>
1914#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1915pub struct Slot {
1916    /// <p>A description of the slot.</p>
1917    #[serde(rename = "description")]
1918    #[serde(skip_serializing_if = "Option::is_none")]
1919    pub description: Option<String>,
1920    /// <p>The name of the slot.</p>
1921    #[serde(rename = "name")]
1922    pub name: String,
1923    /// <p>Determines whether a slot is obfuscated in conversation logs and stored utterances. When you obfuscate a slot, the value is replaced by the slot name in curly braces ({}). For example, if the slot name is "full_name", obfuscated values are replaced with "{full_name}". For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/how-obfuscate.html"> Slot Obfuscation </a>. </p>
1924    #[serde(rename = "obfuscationSetting")]
1925    #[serde(skip_serializing_if = "Option::is_none")]
1926    pub obfuscation_setting: Option<String>,
1927    /// <p> Directs Amazon Lex the order in which to elicit this slot value from the user. For example, if the intent has two slots with priorities 1 and 2, AWS Amazon Lex first elicits a value for the slot with priority 1.</p> <p>If multiple slots share the same priority, the order in which Amazon Lex elicits values is arbitrary.</p>
1928    #[serde(rename = "priority")]
1929    #[serde(skip_serializing_if = "Option::is_none")]
1930    pub priority: Option<i64>,
1931    /// <p> A set of possible responses for the slot type used by text-based clients. A user chooses an option from the response card, instead of using text to reply. </p>
1932    #[serde(rename = "responseCard")]
1933    #[serde(skip_serializing_if = "Option::is_none")]
1934    pub response_card: Option<String>,
1935    /// <p> If you know a specific pattern with which users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances. </p>
1936    #[serde(rename = "sampleUtterances")]
1937    #[serde(skip_serializing_if = "Option::is_none")]
1938    pub sample_utterances: Option<Vec<String>>,
1939    /// <p>Specifies whether the slot is required or optional. </p>
1940    #[serde(rename = "slotConstraint")]
1941    pub slot_constraint: String,
1942    /// <p>The type of the slot, either a custom slot type that you defined or one of the built-in slot types.</p>
1943    #[serde(rename = "slotType")]
1944    #[serde(skip_serializing_if = "Option::is_none")]
1945    pub slot_type: Option<String>,
1946    /// <p>The version of the slot type.</p>
1947    #[serde(rename = "slotTypeVersion")]
1948    #[serde(skip_serializing_if = "Option::is_none")]
1949    pub slot_type_version: Option<String>,
1950    /// <p>The prompt that Amazon Lex uses to elicit the slot value from the user.</p>
1951    #[serde(rename = "valueElicitationPrompt")]
1952    #[serde(skip_serializing_if = "Option::is_none")]
1953    pub value_elicitation_prompt: Option<Prompt>,
1954}
1955
1956/// <p>Provides configuration information for a slot type.</p>
1957#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1958pub struct SlotTypeConfiguration {
1959    /// <p>A regular expression used to validate the value of a slot.</p>
1960    #[serde(rename = "regexConfiguration")]
1961    #[serde(skip_serializing_if = "Option::is_none")]
1962    pub regex_configuration: Option<SlotTypeRegexConfiguration>,
1963}
1964
1965/// <p>Provides information about a slot type..</p>
1966#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1967#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1968pub struct SlotTypeMetadata {
1969    /// <p>The date that the slot type was created.</p>
1970    #[serde(rename = "createdDate")]
1971    #[serde(skip_serializing_if = "Option::is_none")]
1972    pub created_date: Option<f64>,
1973    /// <p>A description of the slot type.</p>
1974    #[serde(rename = "description")]
1975    #[serde(skip_serializing_if = "Option::is_none")]
1976    pub description: Option<String>,
1977    /// <p>The date that the slot type was updated. When you create a resource, the creation date and last updated date are the same. </p>
1978    #[serde(rename = "lastUpdatedDate")]
1979    #[serde(skip_serializing_if = "Option::is_none")]
1980    pub last_updated_date: Option<f64>,
1981    /// <p>The name of the slot type.</p>
1982    #[serde(rename = "name")]
1983    #[serde(skip_serializing_if = "Option::is_none")]
1984    pub name: Option<String>,
1985    /// <p>The version of the slot type.</p>
1986    #[serde(rename = "version")]
1987    #[serde(skip_serializing_if = "Option::is_none")]
1988    pub version: Option<String>,
1989}
1990
1991/// <p>Provides a regular expression used to validate the value of a slot.</p>
1992#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1993pub struct SlotTypeRegexConfiguration {
1994    /// <p><p>A regular expression used to validate the value of a slot. </p> <p>Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:</p> <ul> <li> <p>A-Z, a-z</p> </li> <li> <p>0-9</p> </li> <li> <p>Unicode characters (&quot;\ u&lt;Unicode&gt;&quot;)</p> </li> </ul> <p>Represent Unicode characters with four digits, for example &quot;\u0041&quot; or &quot;\u005A&quot;.</p> <p>The following regular expression operators are not supported:</p> <ul> <li> <p>Infinite repeaters: *, +, or {x,} with no upper bound.</p> </li> <li> <p>Wild card (.)</p> </li> </ul></p>
1995    #[serde(rename = "pattern")]
1996    pub pattern: String,
1997}
1998
1999#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2000#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2001pub struct StartImportRequest {
2002    /// <p><p>Specifies the action that the <code>StartImport</code> operation should take when there is an existing resource with the same name.</p> <ul> <li> <p>FAIL<em>ON</em>CONFLICT - The import operation is stopped on the first conflict between a resource in the import file and an existing resource. The name of the resource causing the conflict is in the <code>failureReason</code> field of the response to the <code>GetImport</code> operation.</p> <p>OVERWRITE_LATEST - The import operation proceeds even if there is a conflict with an existing resource. The $LASTEST version of the existing resource is overwritten with the data from the import file.</p> </li> </ul></p>
2003    #[serde(rename = "mergeStrategy")]
2004    pub merge_strategy: String,
2005    /// <p>A zip archive in binary format. The archive should contain one file, a JSON file containing the resource to import. The resource should match the type specified in the <code>resourceType</code> field.</p>
2006    #[serde(rename = "payload")]
2007    #[serde(
2008        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
2009        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
2010        default
2011    )]
2012    pub payload: bytes::Bytes,
2013    /// <p><p>Specifies the type of resource to export. Each resource also exports any resources that it depends on. </p> <ul> <li> <p>A bot exports dependent intents.</p> </li> <li> <p>An intent exports dependent slot types.</p> </li> </ul></p>
2014    #[serde(rename = "resourceType")]
2015    pub resource_type: String,
2016    /// <p>A list of tags to add to the imported bot. You can only add tags when you import a bot, you can't add tags to an intent or slot type.</p>
2017    #[serde(rename = "tags")]
2018    #[serde(skip_serializing_if = "Option::is_none")]
2019    pub tags: Option<Vec<Tag>>,
2020}
2021
2022#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2023#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2024pub struct StartImportResponse {
2025    /// <p>A timestamp for the date and time that the import job was requested.</p>
2026    #[serde(rename = "createdDate")]
2027    #[serde(skip_serializing_if = "Option::is_none")]
2028    pub created_date: Option<f64>,
2029    /// <p>The identifier for the specific import job.</p>
2030    #[serde(rename = "importId")]
2031    #[serde(skip_serializing_if = "Option::is_none")]
2032    pub import_id: Option<String>,
2033    /// <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure using the <code>GetImport</code> operation.</p>
2034    #[serde(rename = "importStatus")]
2035    #[serde(skip_serializing_if = "Option::is_none")]
2036    pub import_status: Option<String>,
2037    /// <p>The action to take when there is a merge conflict.</p>
2038    #[serde(rename = "mergeStrategy")]
2039    #[serde(skip_serializing_if = "Option::is_none")]
2040    pub merge_strategy: Option<String>,
2041    /// <p>The name given to the import job.</p>
2042    #[serde(rename = "name")]
2043    #[serde(skip_serializing_if = "Option::is_none")]
2044    pub name: Option<String>,
2045    /// <p>The type of resource to import.</p>
2046    #[serde(rename = "resourceType")]
2047    #[serde(skip_serializing_if = "Option::is_none")]
2048    pub resource_type: Option<String>,
2049    /// <p>A list of tags added to the imported bot.</p>
2050    #[serde(rename = "tags")]
2051    #[serde(skip_serializing_if = "Option::is_none")]
2052    pub tags: Option<Vec<Tag>>,
2053}
2054
2055/// <p>A collection of messages that convey information to the user. At runtime, Amazon Lex selects the message to convey. </p>
2056#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2057pub struct Statement {
2058    /// <p>A collection of message objects.</p>
2059    #[serde(rename = "messages")]
2060    pub messages: Vec<Message>,
2061    /// <p> At runtime, if the client is using the <a href="http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html">PostText</a> API, Amazon Lex includes the response card in the response. It substitutes all of the session attributes and slot values for placeholders in the response card. </p>
2062    #[serde(rename = "responseCard")]
2063    #[serde(skip_serializing_if = "Option::is_none")]
2064    pub response_card: Option<String>,
2065}
2066
2067/// <p>A list of key/value pairs that identify a bot, bot alias, or bot channel. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @. </p>
2068#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2069pub struct Tag {
2070    /// <p>The key for the tag. Keys are not case-sensitive and must be unique.</p>
2071    #[serde(rename = "key")]
2072    pub key: String,
2073    /// <p>The value associated with a key. The value may be an empty string but it can't be null.</p>
2074    #[serde(rename = "value")]
2075    pub value: String,
2076}
2077
2078#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2079#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2080pub struct TagResourceRequest {
2081    /// <p>The Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag.</p>
2082    #[serde(rename = "resourceArn")]
2083    pub resource_arn: String,
2084    /// <p>A list of tag keys to add to the resource. If a tag key already exists, the existing value is replaced with the new value.</p>
2085    #[serde(rename = "tags")]
2086    pub tags: Vec<Tag>,
2087}
2088
2089#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2090#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2091pub struct TagResourceResponse {}
2092
2093#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2094#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2095pub struct UntagResourceRequest {
2096    /// <p>The Amazon Resource Name (ARN) of the resource to remove the tags from.</p>
2097    #[serde(rename = "resourceArn")]
2098    pub resource_arn: String,
2099    /// <p>A list of tag keys to remove from the resource. If a tag key does not exist on the resource, it is ignored.</p>
2100    #[serde(rename = "tagKeys")]
2101    pub tag_keys: Vec<String>,
2102}
2103
2104#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2105#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2106pub struct UntagResourceResponse {}
2107
2108/// <p>Provides information about a single utterance that was made to your bot. </p>
2109#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2110#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2111pub struct UtteranceData {
2112    /// <p>The number of times that the utterance was processed.</p>
2113    #[serde(rename = "count")]
2114    #[serde(skip_serializing_if = "Option::is_none")]
2115    pub count: Option<i64>,
2116    /// <p>The total number of individuals that used the utterance.</p>
2117    #[serde(rename = "distinctUsers")]
2118    #[serde(skip_serializing_if = "Option::is_none")]
2119    pub distinct_users: Option<i64>,
2120    /// <p>The date that the utterance was first recorded.</p>
2121    #[serde(rename = "firstUtteredDate")]
2122    #[serde(skip_serializing_if = "Option::is_none")]
2123    pub first_uttered_date: Option<f64>,
2124    /// <p>The date that the utterance was last recorded.</p>
2125    #[serde(rename = "lastUtteredDate")]
2126    #[serde(skip_serializing_if = "Option::is_none")]
2127    pub last_uttered_date: Option<f64>,
2128    /// <p>The text that was entered by the user or the text representation of an audio clip.</p>
2129    #[serde(rename = "utteranceString")]
2130    #[serde(skip_serializing_if = "Option::is_none")]
2131    pub utterance_string: Option<String>,
2132}
2133
2134/// <p>Provides a list of utterances that have been made to a specific version of your bot. The list contains a maximum of 100 utterances.</p>
2135#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2136#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2137pub struct UtteranceList {
2138    /// <p>The version of the bot that processed the list.</p>
2139    #[serde(rename = "botVersion")]
2140    #[serde(skip_serializing_if = "Option::is_none")]
2141    pub bot_version: Option<String>,
2142    /// <p>One or more <a>UtteranceData</a> objects that contain information about the utterances that have been made to a bot. The maximum number of object is 100.</p>
2143    #[serde(rename = "utterances")]
2144    #[serde(skip_serializing_if = "Option::is_none")]
2145    pub utterances: Option<Vec<UtteranceData>>,
2146}
2147
2148/// Errors returned by CreateBotVersion
2149#[derive(Debug, PartialEq)]
2150pub enum CreateBotVersionError {
2151    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2152    BadRequest(String),
2153    /// <p> There was a conflict processing the request. Try your request again. </p>
2154    Conflict(String),
2155    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2156    InternalFailure(String),
2157    /// <p>The request exceeded a limit. Try your request again.</p>
2158    LimitExceeded(String),
2159    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2160    NotFound(String),
2161    /// <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
2162    PreconditionFailed(String),
2163}
2164
2165impl CreateBotVersionError {
2166    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBotVersionError> {
2167        if let Some(err) = proto::json::Error::parse_rest(&res) {
2168            match err.typ.as_str() {
2169                "BadRequestException" => {
2170                    return RusotoError::Service(CreateBotVersionError::BadRequest(err.msg))
2171                }
2172                "ConflictException" => {
2173                    return RusotoError::Service(CreateBotVersionError::Conflict(err.msg))
2174                }
2175                "InternalFailureException" => {
2176                    return RusotoError::Service(CreateBotVersionError::InternalFailure(err.msg))
2177                }
2178                "LimitExceededException" => {
2179                    return RusotoError::Service(CreateBotVersionError::LimitExceeded(err.msg))
2180                }
2181                "NotFoundException" => {
2182                    return RusotoError::Service(CreateBotVersionError::NotFound(err.msg))
2183                }
2184                "PreconditionFailedException" => {
2185                    return RusotoError::Service(CreateBotVersionError::PreconditionFailed(err.msg))
2186                }
2187                "ValidationException" => return RusotoError::Validation(err.msg),
2188                _ => {}
2189            }
2190        }
2191        RusotoError::Unknown(res)
2192    }
2193}
2194impl fmt::Display for CreateBotVersionError {
2195    #[allow(unused_variables)]
2196    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2197        match *self {
2198            CreateBotVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
2199            CreateBotVersionError::Conflict(ref cause) => write!(f, "{}", cause),
2200            CreateBotVersionError::InternalFailure(ref cause) => write!(f, "{}", cause),
2201            CreateBotVersionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2202            CreateBotVersionError::NotFound(ref cause) => write!(f, "{}", cause),
2203            CreateBotVersionError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
2204        }
2205    }
2206}
2207impl Error for CreateBotVersionError {}
2208/// Errors returned by CreateIntentVersion
2209#[derive(Debug, PartialEq)]
2210pub enum CreateIntentVersionError {
2211    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2212    BadRequest(String),
2213    /// <p> There was a conflict processing the request. Try your request again. </p>
2214    Conflict(String),
2215    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2216    InternalFailure(String),
2217    /// <p>The request exceeded a limit. Try your request again.</p>
2218    LimitExceeded(String),
2219    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2220    NotFound(String),
2221    /// <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
2222    PreconditionFailed(String),
2223}
2224
2225impl CreateIntentVersionError {
2226    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateIntentVersionError> {
2227        if let Some(err) = proto::json::Error::parse_rest(&res) {
2228            match err.typ.as_str() {
2229                "BadRequestException" => {
2230                    return RusotoError::Service(CreateIntentVersionError::BadRequest(err.msg))
2231                }
2232                "ConflictException" => {
2233                    return RusotoError::Service(CreateIntentVersionError::Conflict(err.msg))
2234                }
2235                "InternalFailureException" => {
2236                    return RusotoError::Service(CreateIntentVersionError::InternalFailure(err.msg))
2237                }
2238                "LimitExceededException" => {
2239                    return RusotoError::Service(CreateIntentVersionError::LimitExceeded(err.msg))
2240                }
2241                "NotFoundException" => {
2242                    return RusotoError::Service(CreateIntentVersionError::NotFound(err.msg))
2243                }
2244                "PreconditionFailedException" => {
2245                    return RusotoError::Service(CreateIntentVersionError::PreconditionFailed(
2246                        err.msg,
2247                    ))
2248                }
2249                "ValidationException" => return RusotoError::Validation(err.msg),
2250                _ => {}
2251            }
2252        }
2253        RusotoError::Unknown(res)
2254    }
2255}
2256impl fmt::Display for CreateIntentVersionError {
2257    #[allow(unused_variables)]
2258    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2259        match *self {
2260            CreateIntentVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
2261            CreateIntentVersionError::Conflict(ref cause) => write!(f, "{}", cause),
2262            CreateIntentVersionError::InternalFailure(ref cause) => write!(f, "{}", cause),
2263            CreateIntentVersionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2264            CreateIntentVersionError::NotFound(ref cause) => write!(f, "{}", cause),
2265            CreateIntentVersionError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
2266        }
2267    }
2268}
2269impl Error for CreateIntentVersionError {}
2270/// Errors returned by CreateSlotTypeVersion
2271#[derive(Debug, PartialEq)]
2272pub enum CreateSlotTypeVersionError {
2273    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2274    BadRequest(String),
2275    /// <p> There was a conflict processing the request. Try your request again. </p>
2276    Conflict(String),
2277    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2278    InternalFailure(String),
2279    /// <p>The request exceeded a limit. Try your request again.</p>
2280    LimitExceeded(String),
2281    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2282    NotFound(String),
2283    /// <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
2284    PreconditionFailed(String),
2285}
2286
2287impl CreateSlotTypeVersionError {
2288    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSlotTypeVersionError> {
2289        if let Some(err) = proto::json::Error::parse_rest(&res) {
2290            match err.typ.as_str() {
2291                "BadRequestException" => {
2292                    return RusotoError::Service(CreateSlotTypeVersionError::BadRequest(err.msg))
2293                }
2294                "ConflictException" => {
2295                    return RusotoError::Service(CreateSlotTypeVersionError::Conflict(err.msg))
2296                }
2297                "InternalFailureException" => {
2298                    return RusotoError::Service(CreateSlotTypeVersionError::InternalFailure(
2299                        err.msg,
2300                    ))
2301                }
2302                "LimitExceededException" => {
2303                    return RusotoError::Service(CreateSlotTypeVersionError::LimitExceeded(err.msg))
2304                }
2305                "NotFoundException" => {
2306                    return RusotoError::Service(CreateSlotTypeVersionError::NotFound(err.msg))
2307                }
2308                "PreconditionFailedException" => {
2309                    return RusotoError::Service(CreateSlotTypeVersionError::PreconditionFailed(
2310                        err.msg,
2311                    ))
2312                }
2313                "ValidationException" => return RusotoError::Validation(err.msg),
2314                _ => {}
2315            }
2316        }
2317        RusotoError::Unknown(res)
2318    }
2319}
2320impl fmt::Display for CreateSlotTypeVersionError {
2321    #[allow(unused_variables)]
2322    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2323        match *self {
2324            CreateSlotTypeVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
2325            CreateSlotTypeVersionError::Conflict(ref cause) => write!(f, "{}", cause),
2326            CreateSlotTypeVersionError::InternalFailure(ref cause) => write!(f, "{}", cause),
2327            CreateSlotTypeVersionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2328            CreateSlotTypeVersionError::NotFound(ref cause) => write!(f, "{}", cause),
2329            CreateSlotTypeVersionError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
2330        }
2331    }
2332}
2333impl Error for CreateSlotTypeVersionError {}
2334/// Errors returned by DeleteBot
2335#[derive(Debug, PartialEq)]
2336pub enum DeleteBotError {
2337    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2338    BadRequest(String),
2339    /// <p> There was a conflict processing the request. Try your request again. </p>
2340    Conflict(String),
2341    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2342    InternalFailure(String),
2343    /// <p>The request exceeded a limit. Try your request again.</p>
2344    LimitExceeded(String),
2345    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2346    NotFound(String),
2347    /// <p>The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.</p> <p>The body of the exception contains a JSON object that describes the resource.</p> <p> <code>{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,</code> </p> <p> <code>"resourceReference": {</code> </p> <p> <code>"name": <i>string</i>, "version": <i>string</i> } }</code> </p>
2348    ResourceInUse(String),
2349}
2350
2351impl DeleteBotError {
2352    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBotError> {
2353        if let Some(err) = proto::json::Error::parse_rest(&res) {
2354            match err.typ.as_str() {
2355                "BadRequestException" => {
2356                    return RusotoError::Service(DeleteBotError::BadRequest(err.msg))
2357                }
2358                "ConflictException" => {
2359                    return RusotoError::Service(DeleteBotError::Conflict(err.msg))
2360                }
2361                "InternalFailureException" => {
2362                    return RusotoError::Service(DeleteBotError::InternalFailure(err.msg))
2363                }
2364                "LimitExceededException" => {
2365                    return RusotoError::Service(DeleteBotError::LimitExceeded(err.msg))
2366                }
2367                "NotFoundException" => {
2368                    return RusotoError::Service(DeleteBotError::NotFound(err.msg))
2369                }
2370                "ResourceInUseException" => {
2371                    return RusotoError::Service(DeleteBotError::ResourceInUse(err.msg))
2372                }
2373                "ValidationException" => return RusotoError::Validation(err.msg),
2374                _ => {}
2375            }
2376        }
2377        RusotoError::Unknown(res)
2378    }
2379}
2380impl fmt::Display for DeleteBotError {
2381    #[allow(unused_variables)]
2382    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2383        match *self {
2384            DeleteBotError::BadRequest(ref cause) => write!(f, "{}", cause),
2385            DeleteBotError::Conflict(ref cause) => write!(f, "{}", cause),
2386            DeleteBotError::InternalFailure(ref cause) => write!(f, "{}", cause),
2387            DeleteBotError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2388            DeleteBotError::NotFound(ref cause) => write!(f, "{}", cause),
2389            DeleteBotError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2390        }
2391    }
2392}
2393impl Error for DeleteBotError {}
2394/// Errors returned by DeleteBotAlias
2395#[derive(Debug, PartialEq)]
2396pub enum DeleteBotAliasError {
2397    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2398    BadRequest(String),
2399    /// <p> There was a conflict processing the request. Try your request again. </p>
2400    Conflict(String),
2401    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2402    InternalFailure(String),
2403    /// <p>The request exceeded a limit. Try your request again.</p>
2404    LimitExceeded(String),
2405    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2406    NotFound(String),
2407    /// <p>The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.</p> <p>The body of the exception contains a JSON object that describes the resource.</p> <p> <code>{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,</code> </p> <p> <code>"resourceReference": {</code> </p> <p> <code>"name": <i>string</i>, "version": <i>string</i> } }</code> </p>
2408    ResourceInUse(String),
2409}
2410
2411impl DeleteBotAliasError {
2412    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBotAliasError> {
2413        if let Some(err) = proto::json::Error::parse_rest(&res) {
2414            match err.typ.as_str() {
2415                "BadRequestException" => {
2416                    return RusotoError::Service(DeleteBotAliasError::BadRequest(err.msg))
2417                }
2418                "ConflictException" => {
2419                    return RusotoError::Service(DeleteBotAliasError::Conflict(err.msg))
2420                }
2421                "InternalFailureException" => {
2422                    return RusotoError::Service(DeleteBotAliasError::InternalFailure(err.msg))
2423                }
2424                "LimitExceededException" => {
2425                    return RusotoError::Service(DeleteBotAliasError::LimitExceeded(err.msg))
2426                }
2427                "NotFoundException" => {
2428                    return RusotoError::Service(DeleteBotAliasError::NotFound(err.msg))
2429                }
2430                "ResourceInUseException" => {
2431                    return RusotoError::Service(DeleteBotAliasError::ResourceInUse(err.msg))
2432                }
2433                "ValidationException" => return RusotoError::Validation(err.msg),
2434                _ => {}
2435            }
2436        }
2437        RusotoError::Unknown(res)
2438    }
2439}
2440impl fmt::Display for DeleteBotAliasError {
2441    #[allow(unused_variables)]
2442    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2443        match *self {
2444            DeleteBotAliasError::BadRequest(ref cause) => write!(f, "{}", cause),
2445            DeleteBotAliasError::Conflict(ref cause) => write!(f, "{}", cause),
2446            DeleteBotAliasError::InternalFailure(ref cause) => write!(f, "{}", cause),
2447            DeleteBotAliasError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2448            DeleteBotAliasError::NotFound(ref cause) => write!(f, "{}", cause),
2449            DeleteBotAliasError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2450        }
2451    }
2452}
2453impl Error for DeleteBotAliasError {}
2454/// Errors returned by DeleteBotChannelAssociation
2455#[derive(Debug, PartialEq)]
2456pub enum DeleteBotChannelAssociationError {
2457    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2458    BadRequest(String),
2459    /// <p> There was a conflict processing the request. Try your request again. </p>
2460    Conflict(String),
2461    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2462    InternalFailure(String),
2463    /// <p>The request exceeded a limit. Try your request again.</p>
2464    LimitExceeded(String),
2465    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2466    NotFound(String),
2467}
2468
2469impl DeleteBotChannelAssociationError {
2470    pub fn from_response(
2471        res: BufferedHttpResponse,
2472    ) -> RusotoError<DeleteBotChannelAssociationError> {
2473        if let Some(err) = proto::json::Error::parse_rest(&res) {
2474            match err.typ.as_str() {
2475                "BadRequestException" => {
2476                    return RusotoError::Service(DeleteBotChannelAssociationError::BadRequest(
2477                        err.msg,
2478                    ))
2479                }
2480                "ConflictException" => {
2481                    return RusotoError::Service(DeleteBotChannelAssociationError::Conflict(
2482                        err.msg,
2483                    ))
2484                }
2485                "InternalFailureException" => {
2486                    return RusotoError::Service(DeleteBotChannelAssociationError::InternalFailure(
2487                        err.msg,
2488                    ))
2489                }
2490                "LimitExceededException" => {
2491                    return RusotoError::Service(DeleteBotChannelAssociationError::LimitExceeded(
2492                        err.msg,
2493                    ))
2494                }
2495                "NotFoundException" => {
2496                    return RusotoError::Service(DeleteBotChannelAssociationError::NotFound(
2497                        err.msg,
2498                    ))
2499                }
2500                "ValidationException" => return RusotoError::Validation(err.msg),
2501                _ => {}
2502            }
2503        }
2504        RusotoError::Unknown(res)
2505    }
2506}
2507impl fmt::Display for DeleteBotChannelAssociationError {
2508    #[allow(unused_variables)]
2509    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2510        match *self {
2511            DeleteBotChannelAssociationError::BadRequest(ref cause) => write!(f, "{}", cause),
2512            DeleteBotChannelAssociationError::Conflict(ref cause) => write!(f, "{}", cause),
2513            DeleteBotChannelAssociationError::InternalFailure(ref cause) => write!(f, "{}", cause),
2514            DeleteBotChannelAssociationError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2515            DeleteBotChannelAssociationError::NotFound(ref cause) => write!(f, "{}", cause),
2516        }
2517    }
2518}
2519impl Error for DeleteBotChannelAssociationError {}
2520/// Errors returned by DeleteBotVersion
2521#[derive(Debug, PartialEq)]
2522pub enum DeleteBotVersionError {
2523    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2524    BadRequest(String),
2525    /// <p> There was a conflict processing the request. Try your request again. </p>
2526    Conflict(String),
2527    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2528    InternalFailure(String),
2529    /// <p>The request exceeded a limit. Try your request again.</p>
2530    LimitExceeded(String),
2531    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2532    NotFound(String),
2533    /// <p>The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.</p> <p>The body of the exception contains a JSON object that describes the resource.</p> <p> <code>{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,</code> </p> <p> <code>"resourceReference": {</code> </p> <p> <code>"name": <i>string</i>, "version": <i>string</i> } }</code> </p>
2534    ResourceInUse(String),
2535}
2536
2537impl DeleteBotVersionError {
2538    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBotVersionError> {
2539        if let Some(err) = proto::json::Error::parse_rest(&res) {
2540            match err.typ.as_str() {
2541                "BadRequestException" => {
2542                    return RusotoError::Service(DeleteBotVersionError::BadRequest(err.msg))
2543                }
2544                "ConflictException" => {
2545                    return RusotoError::Service(DeleteBotVersionError::Conflict(err.msg))
2546                }
2547                "InternalFailureException" => {
2548                    return RusotoError::Service(DeleteBotVersionError::InternalFailure(err.msg))
2549                }
2550                "LimitExceededException" => {
2551                    return RusotoError::Service(DeleteBotVersionError::LimitExceeded(err.msg))
2552                }
2553                "NotFoundException" => {
2554                    return RusotoError::Service(DeleteBotVersionError::NotFound(err.msg))
2555                }
2556                "ResourceInUseException" => {
2557                    return RusotoError::Service(DeleteBotVersionError::ResourceInUse(err.msg))
2558                }
2559                "ValidationException" => return RusotoError::Validation(err.msg),
2560                _ => {}
2561            }
2562        }
2563        RusotoError::Unknown(res)
2564    }
2565}
2566impl fmt::Display for DeleteBotVersionError {
2567    #[allow(unused_variables)]
2568    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2569        match *self {
2570            DeleteBotVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
2571            DeleteBotVersionError::Conflict(ref cause) => write!(f, "{}", cause),
2572            DeleteBotVersionError::InternalFailure(ref cause) => write!(f, "{}", cause),
2573            DeleteBotVersionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2574            DeleteBotVersionError::NotFound(ref cause) => write!(f, "{}", cause),
2575            DeleteBotVersionError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2576        }
2577    }
2578}
2579impl Error for DeleteBotVersionError {}
2580/// Errors returned by DeleteIntent
2581#[derive(Debug, PartialEq)]
2582pub enum DeleteIntentError {
2583    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2584    BadRequest(String),
2585    /// <p> There was a conflict processing the request. Try your request again. </p>
2586    Conflict(String),
2587    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2588    InternalFailure(String),
2589    /// <p>The request exceeded a limit. Try your request again.</p>
2590    LimitExceeded(String),
2591    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2592    NotFound(String),
2593    /// <p>The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.</p> <p>The body of the exception contains a JSON object that describes the resource.</p> <p> <code>{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,</code> </p> <p> <code>"resourceReference": {</code> </p> <p> <code>"name": <i>string</i>, "version": <i>string</i> } }</code> </p>
2594    ResourceInUse(String),
2595}
2596
2597impl DeleteIntentError {
2598    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIntentError> {
2599        if let Some(err) = proto::json::Error::parse_rest(&res) {
2600            match err.typ.as_str() {
2601                "BadRequestException" => {
2602                    return RusotoError::Service(DeleteIntentError::BadRequest(err.msg))
2603                }
2604                "ConflictException" => {
2605                    return RusotoError::Service(DeleteIntentError::Conflict(err.msg))
2606                }
2607                "InternalFailureException" => {
2608                    return RusotoError::Service(DeleteIntentError::InternalFailure(err.msg))
2609                }
2610                "LimitExceededException" => {
2611                    return RusotoError::Service(DeleteIntentError::LimitExceeded(err.msg))
2612                }
2613                "NotFoundException" => {
2614                    return RusotoError::Service(DeleteIntentError::NotFound(err.msg))
2615                }
2616                "ResourceInUseException" => {
2617                    return RusotoError::Service(DeleteIntentError::ResourceInUse(err.msg))
2618                }
2619                "ValidationException" => return RusotoError::Validation(err.msg),
2620                _ => {}
2621            }
2622        }
2623        RusotoError::Unknown(res)
2624    }
2625}
2626impl fmt::Display for DeleteIntentError {
2627    #[allow(unused_variables)]
2628    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2629        match *self {
2630            DeleteIntentError::BadRequest(ref cause) => write!(f, "{}", cause),
2631            DeleteIntentError::Conflict(ref cause) => write!(f, "{}", cause),
2632            DeleteIntentError::InternalFailure(ref cause) => write!(f, "{}", cause),
2633            DeleteIntentError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2634            DeleteIntentError::NotFound(ref cause) => write!(f, "{}", cause),
2635            DeleteIntentError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2636        }
2637    }
2638}
2639impl Error for DeleteIntentError {}
2640/// Errors returned by DeleteIntentVersion
2641#[derive(Debug, PartialEq)]
2642pub enum DeleteIntentVersionError {
2643    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2644    BadRequest(String),
2645    /// <p> There was a conflict processing the request. Try your request again. </p>
2646    Conflict(String),
2647    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2648    InternalFailure(String),
2649    /// <p>The request exceeded a limit. Try your request again.</p>
2650    LimitExceeded(String),
2651    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2652    NotFound(String),
2653    /// <p>The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.</p> <p>The body of the exception contains a JSON object that describes the resource.</p> <p> <code>{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,</code> </p> <p> <code>"resourceReference": {</code> </p> <p> <code>"name": <i>string</i>, "version": <i>string</i> } }</code> </p>
2654    ResourceInUse(String),
2655}
2656
2657impl DeleteIntentVersionError {
2658    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIntentVersionError> {
2659        if let Some(err) = proto::json::Error::parse_rest(&res) {
2660            match err.typ.as_str() {
2661                "BadRequestException" => {
2662                    return RusotoError::Service(DeleteIntentVersionError::BadRequest(err.msg))
2663                }
2664                "ConflictException" => {
2665                    return RusotoError::Service(DeleteIntentVersionError::Conflict(err.msg))
2666                }
2667                "InternalFailureException" => {
2668                    return RusotoError::Service(DeleteIntentVersionError::InternalFailure(err.msg))
2669                }
2670                "LimitExceededException" => {
2671                    return RusotoError::Service(DeleteIntentVersionError::LimitExceeded(err.msg))
2672                }
2673                "NotFoundException" => {
2674                    return RusotoError::Service(DeleteIntentVersionError::NotFound(err.msg))
2675                }
2676                "ResourceInUseException" => {
2677                    return RusotoError::Service(DeleteIntentVersionError::ResourceInUse(err.msg))
2678                }
2679                "ValidationException" => return RusotoError::Validation(err.msg),
2680                _ => {}
2681            }
2682        }
2683        RusotoError::Unknown(res)
2684    }
2685}
2686impl fmt::Display for DeleteIntentVersionError {
2687    #[allow(unused_variables)]
2688    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2689        match *self {
2690            DeleteIntentVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
2691            DeleteIntentVersionError::Conflict(ref cause) => write!(f, "{}", cause),
2692            DeleteIntentVersionError::InternalFailure(ref cause) => write!(f, "{}", cause),
2693            DeleteIntentVersionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2694            DeleteIntentVersionError::NotFound(ref cause) => write!(f, "{}", cause),
2695            DeleteIntentVersionError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2696        }
2697    }
2698}
2699impl Error for DeleteIntentVersionError {}
2700/// Errors returned by DeleteSlotType
2701#[derive(Debug, PartialEq)]
2702pub enum DeleteSlotTypeError {
2703    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2704    BadRequest(String),
2705    /// <p> There was a conflict processing the request. Try your request again. </p>
2706    Conflict(String),
2707    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2708    InternalFailure(String),
2709    /// <p>The request exceeded a limit. Try your request again.</p>
2710    LimitExceeded(String),
2711    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2712    NotFound(String),
2713    /// <p>The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.</p> <p>The body of the exception contains a JSON object that describes the resource.</p> <p> <code>{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,</code> </p> <p> <code>"resourceReference": {</code> </p> <p> <code>"name": <i>string</i>, "version": <i>string</i> } }</code> </p>
2714    ResourceInUse(String),
2715}
2716
2717impl DeleteSlotTypeError {
2718    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSlotTypeError> {
2719        if let Some(err) = proto::json::Error::parse_rest(&res) {
2720            match err.typ.as_str() {
2721                "BadRequestException" => {
2722                    return RusotoError::Service(DeleteSlotTypeError::BadRequest(err.msg))
2723                }
2724                "ConflictException" => {
2725                    return RusotoError::Service(DeleteSlotTypeError::Conflict(err.msg))
2726                }
2727                "InternalFailureException" => {
2728                    return RusotoError::Service(DeleteSlotTypeError::InternalFailure(err.msg))
2729                }
2730                "LimitExceededException" => {
2731                    return RusotoError::Service(DeleteSlotTypeError::LimitExceeded(err.msg))
2732                }
2733                "NotFoundException" => {
2734                    return RusotoError::Service(DeleteSlotTypeError::NotFound(err.msg))
2735                }
2736                "ResourceInUseException" => {
2737                    return RusotoError::Service(DeleteSlotTypeError::ResourceInUse(err.msg))
2738                }
2739                "ValidationException" => return RusotoError::Validation(err.msg),
2740                _ => {}
2741            }
2742        }
2743        RusotoError::Unknown(res)
2744    }
2745}
2746impl fmt::Display for DeleteSlotTypeError {
2747    #[allow(unused_variables)]
2748    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2749        match *self {
2750            DeleteSlotTypeError::BadRequest(ref cause) => write!(f, "{}", cause),
2751            DeleteSlotTypeError::Conflict(ref cause) => write!(f, "{}", cause),
2752            DeleteSlotTypeError::InternalFailure(ref cause) => write!(f, "{}", cause),
2753            DeleteSlotTypeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2754            DeleteSlotTypeError::NotFound(ref cause) => write!(f, "{}", cause),
2755            DeleteSlotTypeError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2756        }
2757    }
2758}
2759impl Error for DeleteSlotTypeError {}
2760/// Errors returned by DeleteSlotTypeVersion
2761#[derive(Debug, PartialEq)]
2762pub enum DeleteSlotTypeVersionError {
2763    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2764    BadRequest(String),
2765    /// <p> There was a conflict processing the request. Try your request again. </p>
2766    Conflict(String),
2767    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2768    InternalFailure(String),
2769    /// <p>The request exceeded a limit. Try your request again.</p>
2770    LimitExceeded(String),
2771    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2772    NotFound(String),
2773    /// <p>The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.</p> <p>The body of the exception contains a JSON object that describes the resource.</p> <p> <code>{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,</code> </p> <p> <code>"resourceReference": {</code> </p> <p> <code>"name": <i>string</i>, "version": <i>string</i> } }</code> </p>
2774    ResourceInUse(String),
2775}
2776
2777impl DeleteSlotTypeVersionError {
2778    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSlotTypeVersionError> {
2779        if let Some(err) = proto::json::Error::parse_rest(&res) {
2780            match err.typ.as_str() {
2781                "BadRequestException" => {
2782                    return RusotoError::Service(DeleteSlotTypeVersionError::BadRequest(err.msg))
2783                }
2784                "ConflictException" => {
2785                    return RusotoError::Service(DeleteSlotTypeVersionError::Conflict(err.msg))
2786                }
2787                "InternalFailureException" => {
2788                    return RusotoError::Service(DeleteSlotTypeVersionError::InternalFailure(
2789                        err.msg,
2790                    ))
2791                }
2792                "LimitExceededException" => {
2793                    return RusotoError::Service(DeleteSlotTypeVersionError::LimitExceeded(err.msg))
2794                }
2795                "NotFoundException" => {
2796                    return RusotoError::Service(DeleteSlotTypeVersionError::NotFound(err.msg))
2797                }
2798                "ResourceInUseException" => {
2799                    return RusotoError::Service(DeleteSlotTypeVersionError::ResourceInUse(err.msg))
2800                }
2801                "ValidationException" => return RusotoError::Validation(err.msg),
2802                _ => {}
2803            }
2804        }
2805        RusotoError::Unknown(res)
2806    }
2807}
2808impl fmt::Display for DeleteSlotTypeVersionError {
2809    #[allow(unused_variables)]
2810    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2811        match *self {
2812            DeleteSlotTypeVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
2813            DeleteSlotTypeVersionError::Conflict(ref cause) => write!(f, "{}", cause),
2814            DeleteSlotTypeVersionError::InternalFailure(ref cause) => write!(f, "{}", cause),
2815            DeleteSlotTypeVersionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2816            DeleteSlotTypeVersionError::NotFound(ref cause) => write!(f, "{}", cause),
2817            DeleteSlotTypeVersionError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2818        }
2819    }
2820}
2821impl Error for DeleteSlotTypeVersionError {}
2822/// Errors returned by DeleteUtterances
2823#[derive(Debug, PartialEq)]
2824pub enum DeleteUtterancesError {
2825    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2826    BadRequest(String),
2827    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2828    InternalFailure(String),
2829    /// <p>The request exceeded a limit. Try your request again.</p>
2830    LimitExceeded(String),
2831    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2832    NotFound(String),
2833}
2834
2835impl DeleteUtterancesError {
2836    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUtterancesError> {
2837        if let Some(err) = proto::json::Error::parse_rest(&res) {
2838            match err.typ.as_str() {
2839                "BadRequestException" => {
2840                    return RusotoError::Service(DeleteUtterancesError::BadRequest(err.msg))
2841                }
2842                "InternalFailureException" => {
2843                    return RusotoError::Service(DeleteUtterancesError::InternalFailure(err.msg))
2844                }
2845                "LimitExceededException" => {
2846                    return RusotoError::Service(DeleteUtterancesError::LimitExceeded(err.msg))
2847                }
2848                "NotFoundException" => {
2849                    return RusotoError::Service(DeleteUtterancesError::NotFound(err.msg))
2850                }
2851                "ValidationException" => return RusotoError::Validation(err.msg),
2852                _ => {}
2853            }
2854        }
2855        RusotoError::Unknown(res)
2856    }
2857}
2858impl fmt::Display for DeleteUtterancesError {
2859    #[allow(unused_variables)]
2860    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2861        match *self {
2862            DeleteUtterancesError::BadRequest(ref cause) => write!(f, "{}", cause),
2863            DeleteUtterancesError::InternalFailure(ref cause) => write!(f, "{}", cause),
2864            DeleteUtterancesError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2865            DeleteUtterancesError::NotFound(ref cause) => write!(f, "{}", cause),
2866        }
2867    }
2868}
2869impl Error for DeleteUtterancesError {}
2870/// Errors returned by GetBot
2871#[derive(Debug, PartialEq)]
2872pub enum GetBotError {
2873    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2874    BadRequest(String),
2875    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2876    InternalFailure(String),
2877    /// <p>The request exceeded a limit. Try your request again.</p>
2878    LimitExceeded(String),
2879    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2880    NotFound(String),
2881}
2882
2883impl GetBotError {
2884    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotError> {
2885        if let Some(err) = proto::json::Error::parse_rest(&res) {
2886            match err.typ.as_str() {
2887                "BadRequestException" => {
2888                    return RusotoError::Service(GetBotError::BadRequest(err.msg))
2889                }
2890                "InternalFailureException" => {
2891                    return RusotoError::Service(GetBotError::InternalFailure(err.msg))
2892                }
2893                "LimitExceededException" => {
2894                    return RusotoError::Service(GetBotError::LimitExceeded(err.msg))
2895                }
2896                "NotFoundException" => return RusotoError::Service(GetBotError::NotFound(err.msg)),
2897                "ValidationException" => return RusotoError::Validation(err.msg),
2898                _ => {}
2899            }
2900        }
2901        RusotoError::Unknown(res)
2902    }
2903}
2904impl fmt::Display for GetBotError {
2905    #[allow(unused_variables)]
2906    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2907        match *self {
2908            GetBotError::BadRequest(ref cause) => write!(f, "{}", cause),
2909            GetBotError::InternalFailure(ref cause) => write!(f, "{}", cause),
2910            GetBotError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2911            GetBotError::NotFound(ref cause) => write!(f, "{}", cause),
2912        }
2913    }
2914}
2915impl Error for GetBotError {}
2916/// Errors returned by GetBotAlias
2917#[derive(Debug, PartialEq)]
2918pub enum GetBotAliasError {
2919    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2920    BadRequest(String),
2921    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2922    InternalFailure(String),
2923    /// <p>The request exceeded a limit. Try your request again.</p>
2924    LimitExceeded(String),
2925    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
2926    NotFound(String),
2927}
2928
2929impl GetBotAliasError {
2930    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotAliasError> {
2931        if let Some(err) = proto::json::Error::parse_rest(&res) {
2932            match err.typ.as_str() {
2933                "BadRequestException" => {
2934                    return RusotoError::Service(GetBotAliasError::BadRequest(err.msg))
2935                }
2936                "InternalFailureException" => {
2937                    return RusotoError::Service(GetBotAliasError::InternalFailure(err.msg))
2938                }
2939                "LimitExceededException" => {
2940                    return RusotoError::Service(GetBotAliasError::LimitExceeded(err.msg))
2941                }
2942                "NotFoundException" => {
2943                    return RusotoError::Service(GetBotAliasError::NotFound(err.msg))
2944                }
2945                "ValidationException" => return RusotoError::Validation(err.msg),
2946                _ => {}
2947            }
2948        }
2949        RusotoError::Unknown(res)
2950    }
2951}
2952impl fmt::Display for GetBotAliasError {
2953    #[allow(unused_variables)]
2954    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2955        match *self {
2956            GetBotAliasError::BadRequest(ref cause) => write!(f, "{}", cause),
2957            GetBotAliasError::InternalFailure(ref cause) => write!(f, "{}", cause),
2958            GetBotAliasError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2959            GetBotAliasError::NotFound(ref cause) => write!(f, "{}", cause),
2960        }
2961    }
2962}
2963impl Error for GetBotAliasError {}
2964/// Errors returned by GetBotAliases
2965#[derive(Debug, PartialEq)]
2966pub enum GetBotAliasesError {
2967    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
2968    BadRequest(String),
2969    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
2970    InternalFailure(String),
2971    /// <p>The request exceeded a limit. Try your request again.</p>
2972    LimitExceeded(String),
2973}
2974
2975impl GetBotAliasesError {
2976    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotAliasesError> {
2977        if let Some(err) = proto::json::Error::parse_rest(&res) {
2978            match err.typ.as_str() {
2979                "BadRequestException" => {
2980                    return RusotoError::Service(GetBotAliasesError::BadRequest(err.msg))
2981                }
2982                "InternalFailureException" => {
2983                    return RusotoError::Service(GetBotAliasesError::InternalFailure(err.msg))
2984                }
2985                "LimitExceededException" => {
2986                    return RusotoError::Service(GetBotAliasesError::LimitExceeded(err.msg))
2987                }
2988                "ValidationException" => return RusotoError::Validation(err.msg),
2989                _ => {}
2990            }
2991        }
2992        RusotoError::Unknown(res)
2993    }
2994}
2995impl fmt::Display for GetBotAliasesError {
2996    #[allow(unused_variables)]
2997    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2998        match *self {
2999            GetBotAliasesError::BadRequest(ref cause) => write!(f, "{}", cause),
3000            GetBotAliasesError::InternalFailure(ref cause) => write!(f, "{}", cause),
3001            GetBotAliasesError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3002        }
3003    }
3004}
3005impl Error for GetBotAliasesError {}
3006/// Errors returned by GetBotChannelAssociation
3007#[derive(Debug, PartialEq)]
3008pub enum GetBotChannelAssociationError {
3009    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3010    BadRequest(String),
3011    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3012    InternalFailure(String),
3013    /// <p>The request exceeded a limit. Try your request again.</p>
3014    LimitExceeded(String),
3015    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3016    NotFound(String),
3017}
3018
3019impl GetBotChannelAssociationError {
3020    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotChannelAssociationError> {
3021        if let Some(err) = proto::json::Error::parse_rest(&res) {
3022            match err.typ.as_str() {
3023                "BadRequestException" => {
3024                    return RusotoError::Service(GetBotChannelAssociationError::BadRequest(err.msg))
3025                }
3026                "InternalFailureException" => {
3027                    return RusotoError::Service(GetBotChannelAssociationError::InternalFailure(
3028                        err.msg,
3029                    ))
3030                }
3031                "LimitExceededException" => {
3032                    return RusotoError::Service(GetBotChannelAssociationError::LimitExceeded(
3033                        err.msg,
3034                    ))
3035                }
3036                "NotFoundException" => {
3037                    return RusotoError::Service(GetBotChannelAssociationError::NotFound(err.msg))
3038                }
3039                "ValidationException" => return RusotoError::Validation(err.msg),
3040                _ => {}
3041            }
3042        }
3043        RusotoError::Unknown(res)
3044    }
3045}
3046impl fmt::Display for GetBotChannelAssociationError {
3047    #[allow(unused_variables)]
3048    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3049        match *self {
3050            GetBotChannelAssociationError::BadRequest(ref cause) => write!(f, "{}", cause),
3051            GetBotChannelAssociationError::InternalFailure(ref cause) => write!(f, "{}", cause),
3052            GetBotChannelAssociationError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3053            GetBotChannelAssociationError::NotFound(ref cause) => write!(f, "{}", cause),
3054        }
3055    }
3056}
3057impl Error for GetBotChannelAssociationError {}
3058/// Errors returned by GetBotChannelAssociations
3059#[derive(Debug, PartialEq)]
3060pub enum GetBotChannelAssociationsError {
3061    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3062    BadRequest(String),
3063    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3064    InternalFailure(String),
3065    /// <p>The request exceeded a limit. Try your request again.</p>
3066    LimitExceeded(String),
3067}
3068
3069impl GetBotChannelAssociationsError {
3070    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotChannelAssociationsError> {
3071        if let Some(err) = proto::json::Error::parse_rest(&res) {
3072            match err.typ.as_str() {
3073                "BadRequestException" => {
3074                    return RusotoError::Service(GetBotChannelAssociationsError::BadRequest(
3075                        err.msg,
3076                    ))
3077                }
3078                "InternalFailureException" => {
3079                    return RusotoError::Service(GetBotChannelAssociationsError::InternalFailure(
3080                        err.msg,
3081                    ))
3082                }
3083                "LimitExceededException" => {
3084                    return RusotoError::Service(GetBotChannelAssociationsError::LimitExceeded(
3085                        err.msg,
3086                    ))
3087                }
3088                "ValidationException" => return RusotoError::Validation(err.msg),
3089                _ => {}
3090            }
3091        }
3092        RusotoError::Unknown(res)
3093    }
3094}
3095impl fmt::Display for GetBotChannelAssociationsError {
3096    #[allow(unused_variables)]
3097    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3098        match *self {
3099            GetBotChannelAssociationsError::BadRequest(ref cause) => write!(f, "{}", cause),
3100            GetBotChannelAssociationsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3101            GetBotChannelAssociationsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3102        }
3103    }
3104}
3105impl Error for GetBotChannelAssociationsError {}
3106/// Errors returned by GetBotVersions
3107#[derive(Debug, PartialEq)]
3108pub enum GetBotVersionsError {
3109    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3110    BadRequest(String),
3111    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3112    InternalFailure(String),
3113    /// <p>The request exceeded a limit. Try your request again.</p>
3114    LimitExceeded(String),
3115    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3116    NotFound(String),
3117}
3118
3119impl GetBotVersionsError {
3120    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotVersionsError> {
3121        if let Some(err) = proto::json::Error::parse_rest(&res) {
3122            match err.typ.as_str() {
3123                "BadRequestException" => {
3124                    return RusotoError::Service(GetBotVersionsError::BadRequest(err.msg))
3125                }
3126                "InternalFailureException" => {
3127                    return RusotoError::Service(GetBotVersionsError::InternalFailure(err.msg))
3128                }
3129                "LimitExceededException" => {
3130                    return RusotoError::Service(GetBotVersionsError::LimitExceeded(err.msg))
3131                }
3132                "NotFoundException" => {
3133                    return RusotoError::Service(GetBotVersionsError::NotFound(err.msg))
3134                }
3135                "ValidationException" => return RusotoError::Validation(err.msg),
3136                _ => {}
3137            }
3138        }
3139        RusotoError::Unknown(res)
3140    }
3141}
3142impl fmt::Display for GetBotVersionsError {
3143    #[allow(unused_variables)]
3144    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3145        match *self {
3146            GetBotVersionsError::BadRequest(ref cause) => write!(f, "{}", cause),
3147            GetBotVersionsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3148            GetBotVersionsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3149            GetBotVersionsError::NotFound(ref cause) => write!(f, "{}", cause),
3150        }
3151    }
3152}
3153impl Error for GetBotVersionsError {}
3154/// Errors returned by GetBots
3155#[derive(Debug, PartialEq)]
3156pub enum GetBotsError {
3157    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3158    BadRequest(String),
3159    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3160    InternalFailure(String),
3161    /// <p>The request exceeded a limit. Try your request again.</p>
3162    LimitExceeded(String),
3163    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3164    NotFound(String),
3165}
3166
3167impl GetBotsError {
3168    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBotsError> {
3169        if let Some(err) = proto::json::Error::parse_rest(&res) {
3170            match err.typ.as_str() {
3171                "BadRequestException" => {
3172                    return RusotoError::Service(GetBotsError::BadRequest(err.msg))
3173                }
3174                "InternalFailureException" => {
3175                    return RusotoError::Service(GetBotsError::InternalFailure(err.msg))
3176                }
3177                "LimitExceededException" => {
3178                    return RusotoError::Service(GetBotsError::LimitExceeded(err.msg))
3179                }
3180                "NotFoundException" => {
3181                    return RusotoError::Service(GetBotsError::NotFound(err.msg))
3182                }
3183                "ValidationException" => return RusotoError::Validation(err.msg),
3184                _ => {}
3185            }
3186        }
3187        RusotoError::Unknown(res)
3188    }
3189}
3190impl fmt::Display for GetBotsError {
3191    #[allow(unused_variables)]
3192    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3193        match *self {
3194            GetBotsError::BadRequest(ref cause) => write!(f, "{}", cause),
3195            GetBotsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3196            GetBotsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3197            GetBotsError::NotFound(ref cause) => write!(f, "{}", cause),
3198        }
3199    }
3200}
3201impl Error for GetBotsError {}
3202/// Errors returned by GetBuiltinIntent
3203#[derive(Debug, PartialEq)]
3204pub enum GetBuiltinIntentError {
3205    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3206    BadRequest(String),
3207    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3208    InternalFailure(String),
3209    /// <p>The request exceeded a limit. Try your request again.</p>
3210    LimitExceeded(String),
3211    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3212    NotFound(String),
3213}
3214
3215impl GetBuiltinIntentError {
3216    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBuiltinIntentError> {
3217        if let Some(err) = proto::json::Error::parse_rest(&res) {
3218            match err.typ.as_str() {
3219                "BadRequestException" => {
3220                    return RusotoError::Service(GetBuiltinIntentError::BadRequest(err.msg))
3221                }
3222                "InternalFailureException" => {
3223                    return RusotoError::Service(GetBuiltinIntentError::InternalFailure(err.msg))
3224                }
3225                "LimitExceededException" => {
3226                    return RusotoError::Service(GetBuiltinIntentError::LimitExceeded(err.msg))
3227                }
3228                "NotFoundException" => {
3229                    return RusotoError::Service(GetBuiltinIntentError::NotFound(err.msg))
3230                }
3231                "ValidationException" => return RusotoError::Validation(err.msg),
3232                _ => {}
3233            }
3234        }
3235        RusotoError::Unknown(res)
3236    }
3237}
3238impl fmt::Display for GetBuiltinIntentError {
3239    #[allow(unused_variables)]
3240    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3241        match *self {
3242            GetBuiltinIntentError::BadRequest(ref cause) => write!(f, "{}", cause),
3243            GetBuiltinIntentError::InternalFailure(ref cause) => write!(f, "{}", cause),
3244            GetBuiltinIntentError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3245            GetBuiltinIntentError::NotFound(ref cause) => write!(f, "{}", cause),
3246        }
3247    }
3248}
3249impl Error for GetBuiltinIntentError {}
3250/// Errors returned by GetBuiltinIntents
3251#[derive(Debug, PartialEq)]
3252pub enum GetBuiltinIntentsError {
3253    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3254    BadRequest(String),
3255    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3256    InternalFailure(String),
3257    /// <p>The request exceeded a limit. Try your request again.</p>
3258    LimitExceeded(String),
3259}
3260
3261impl GetBuiltinIntentsError {
3262    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBuiltinIntentsError> {
3263        if let Some(err) = proto::json::Error::parse_rest(&res) {
3264            match err.typ.as_str() {
3265                "BadRequestException" => {
3266                    return RusotoError::Service(GetBuiltinIntentsError::BadRequest(err.msg))
3267                }
3268                "InternalFailureException" => {
3269                    return RusotoError::Service(GetBuiltinIntentsError::InternalFailure(err.msg))
3270                }
3271                "LimitExceededException" => {
3272                    return RusotoError::Service(GetBuiltinIntentsError::LimitExceeded(err.msg))
3273                }
3274                "ValidationException" => return RusotoError::Validation(err.msg),
3275                _ => {}
3276            }
3277        }
3278        RusotoError::Unknown(res)
3279    }
3280}
3281impl fmt::Display for GetBuiltinIntentsError {
3282    #[allow(unused_variables)]
3283    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3284        match *self {
3285            GetBuiltinIntentsError::BadRequest(ref cause) => write!(f, "{}", cause),
3286            GetBuiltinIntentsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3287            GetBuiltinIntentsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3288        }
3289    }
3290}
3291impl Error for GetBuiltinIntentsError {}
3292/// Errors returned by GetBuiltinSlotTypes
3293#[derive(Debug, PartialEq)]
3294pub enum GetBuiltinSlotTypesError {
3295    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3296    BadRequest(String),
3297    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3298    InternalFailure(String),
3299    /// <p>The request exceeded a limit. Try your request again.</p>
3300    LimitExceeded(String),
3301}
3302
3303impl GetBuiltinSlotTypesError {
3304    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBuiltinSlotTypesError> {
3305        if let Some(err) = proto::json::Error::parse_rest(&res) {
3306            match err.typ.as_str() {
3307                "BadRequestException" => {
3308                    return RusotoError::Service(GetBuiltinSlotTypesError::BadRequest(err.msg))
3309                }
3310                "InternalFailureException" => {
3311                    return RusotoError::Service(GetBuiltinSlotTypesError::InternalFailure(err.msg))
3312                }
3313                "LimitExceededException" => {
3314                    return RusotoError::Service(GetBuiltinSlotTypesError::LimitExceeded(err.msg))
3315                }
3316                "ValidationException" => return RusotoError::Validation(err.msg),
3317                _ => {}
3318            }
3319        }
3320        RusotoError::Unknown(res)
3321    }
3322}
3323impl fmt::Display for GetBuiltinSlotTypesError {
3324    #[allow(unused_variables)]
3325    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3326        match *self {
3327            GetBuiltinSlotTypesError::BadRequest(ref cause) => write!(f, "{}", cause),
3328            GetBuiltinSlotTypesError::InternalFailure(ref cause) => write!(f, "{}", cause),
3329            GetBuiltinSlotTypesError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3330        }
3331    }
3332}
3333impl Error for GetBuiltinSlotTypesError {}
3334/// Errors returned by GetExport
3335#[derive(Debug, PartialEq)]
3336pub enum GetExportError {
3337    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3338    BadRequest(String),
3339    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3340    InternalFailure(String),
3341    /// <p>The request exceeded a limit. Try your request again.</p>
3342    LimitExceeded(String),
3343    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3344    NotFound(String),
3345}
3346
3347impl GetExportError {
3348    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetExportError> {
3349        if let Some(err) = proto::json::Error::parse_rest(&res) {
3350            match err.typ.as_str() {
3351                "BadRequestException" => {
3352                    return RusotoError::Service(GetExportError::BadRequest(err.msg))
3353                }
3354                "InternalFailureException" => {
3355                    return RusotoError::Service(GetExportError::InternalFailure(err.msg))
3356                }
3357                "LimitExceededException" => {
3358                    return RusotoError::Service(GetExportError::LimitExceeded(err.msg))
3359                }
3360                "NotFoundException" => {
3361                    return RusotoError::Service(GetExportError::NotFound(err.msg))
3362                }
3363                "ValidationException" => return RusotoError::Validation(err.msg),
3364                _ => {}
3365            }
3366        }
3367        RusotoError::Unknown(res)
3368    }
3369}
3370impl fmt::Display for GetExportError {
3371    #[allow(unused_variables)]
3372    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3373        match *self {
3374            GetExportError::BadRequest(ref cause) => write!(f, "{}", cause),
3375            GetExportError::InternalFailure(ref cause) => write!(f, "{}", cause),
3376            GetExportError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3377            GetExportError::NotFound(ref cause) => write!(f, "{}", cause),
3378        }
3379    }
3380}
3381impl Error for GetExportError {}
3382/// Errors returned by GetImport
3383#[derive(Debug, PartialEq)]
3384pub enum GetImportError {
3385    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3386    BadRequest(String),
3387    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3388    InternalFailure(String),
3389    /// <p>The request exceeded a limit. Try your request again.</p>
3390    LimitExceeded(String),
3391    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3392    NotFound(String),
3393}
3394
3395impl GetImportError {
3396    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetImportError> {
3397        if let Some(err) = proto::json::Error::parse_rest(&res) {
3398            match err.typ.as_str() {
3399                "BadRequestException" => {
3400                    return RusotoError::Service(GetImportError::BadRequest(err.msg))
3401                }
3402                "InternalFailureException" => {
3403                    return RusotoError::Service(GetImportError::InternalFailure(err.msg))
3404                }
3405                "LimitExceededException" => {
3406                    return RusotoError::Service(GetImportError::LimitExceeded(err.msg))
3407                }
3408                "NotFoundException" => {
3409                    return RusotoError::Service(GetImportError::NotFound(err.msg))
3410                }
3411                "ValidationException" => return RusotoError::Validation(err.msg),
3412                _ => {}
3413            }
3414        }
3415        RusotoError::Unknown(res)
3416    }
3417}
3418impl fmt::Display for GetImportError {
3419    #[allow(unused_variables)]
3420    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3421        match *self {
3422            GetImportError::BadRequest(ref cause) => write!(f, "{}", cause),
3423            GetImportError::InternalFailure(ref cause) => write!(f, "{}", cause),
3424            GetImportError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3425            GetImportError::NotFound(ref cause) => write!(f, "{}", cause),
3426        }
3427    }
3428}
3429impl Error for GetImportError {}
3430/// Errors returned by GetIntent
3431#[derive(Debug, PartialEq)]
3432pub enum GetIntentError {
3433    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3434    BadRequest(String),
3435    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3436    InternalFailure(String),
3437    /// <p>The request exceeded a limit. Try your request again.</p>
3438    LimitExceeded(String),
3439    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3440    NotFound(String),
3441}
3442
3443impl GetIntentError {
3444    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntentError> {
3445        if let Some(err) = proto::json::Error::parse_rest(&res) {
3446            match err.typ.as_str() {
3447                "BadRequestException" => {
3448                    return RusotoError::Service(GetIntentError::BadRequest(err.msg))
3449                }
3450                "InternalFailureException" => {
3451                    return RusotoError::Service(GetIntentError::InternalFailure(err.msg))
3452                }
3453                "LimitExceededException" => {
3454                    return RusotoError::Service(GetIntentError::LimitExceeded(err.msg))
3455                }
3456                "NotFoundException" => {
3457                    return RusotoError::Service(GetIntentError::NotFound(err.msg))
3458                }
3459                "ValidationException" => return RusotoError::Validation(err.msg),
3460                _ => {}
3461            }
3462        }
3463        RusotoError::Unknown(res)
3464    }
3465}
3466impl fmt::Display for GetIntentError {
3467    #[allow(unused_variables)]
3468    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3469        match *self {
3470            GetIntentError::BadRequest(ref cause) => write!(f, "{}", cause),
3471            GetIntentError::InternalFailure(ref cause) => write!(f, "{}", cause),
3472            GetIntentError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3473            GetIntentError::NotFound(ref cause) => write!(f, "{}", cause),
3474        }
3475    }
3476}
3477impl Error for GetIntentError {}
3478/// Errors returned by GetIntentVersions
3479#[derive(Debug, PartialEq)]
3480pub enum GetIntentVersionsError {
3481    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3482    BadRequest(String),
3483    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3484    InternalFailure(String),
3485    /// <p>The request exceeded a limit. Try your request again.</p>
3486    LimitExceeded(String),
3487    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3488    NotFound(String),
3489}
3490
3491impl GetIntentVersionsError {
3492    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntentVersionsError> {
3493        if let Some(err) = proto::json::Error::parse_rest(&res) {
3494            match err.typ.as_str() {
3495                "BadRequestException" => {
3496                    return RusotoError::Service(GetIntentVersionsError::BadRequest(err.msg))
3497                }
3498                "InternalFailureException" => {
3499                    return RusotoError::Service(GetIntentVersionsError::InternalFailure(err.msg))
3500                }
3501                "LimitExceededException" => {
3502                    return RusotoError::Service(GetIntentVersionsError::LimitExceeded(err.msg))
3503                }
3504                "NotFoundException" => {
3505                    return RusotoError::Service(GetIntentVersionsError::NotFound(err.msg))
3506                }
3507                "ValidationException" => return RusotoError::Validation(err.msg),
3508                _ => {}
3509            }
3510        }
3511        RusotoError::Unknown(res)
3512    }
3513}
3514impl fmt::Display for GetIntentVersionsError {
3515    #[allow(unused_variables)]
3516    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3517        match *self {
3518            GetIntentVersionsError::BadRequest(ref cause) => write!(f, "{}", cause),
3519            GetIntentVersionsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3520            GetIntentVersionsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3521            GetIntentVersionsError::NotFound(ref cause) => write!(f, "{}", cause),
3522        }
3523    }
3524}
3525impl Error for GetIntentVersionsError {}
3526/// Errors returned by GetIntents
3527#[derive(Debug, PartialEq)]
3528pub enum GetIntentsError {
3529    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3530    BadRequest(String),
3531    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3532    InternalFailure(String),
3533    /// <p>The request exceeded a limit. Try your request again.</p>
3534    LimitExceeded(String),
3535    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3536    NotFound(String),
3537}
3538
3539impl GetIntentsError {
3540    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntentsError> {
3541        if let Some(err) = proto::json::Error::parse_rest(&res) {
3542            match err.typ.as_str() {
3543                "BadRequestException" => {
3544                    return RusotoError::Service(GetIntentsError::BadRequest(err.msg))
3545                }
3546                "InternalFailureException" => {
3547                    return RusotoError::Service(GetIntentsError::InternalFailure(err.msg))
3548                }
3549                "LimitExceededException" => {
3550                    return RusotoError::Service(GetIntentsError::LimitExceeded(err.msg))
3551                }
3552                "NotFoundException" => {
3553                    return RusotoError::Service(GetIntentsError::NotFound(err.msg))
3554                }
3555                "ValidationException" => return RusotoError::Validation(err.msg),
3556                _ => {}
3557            }
3558        }
3559        RusotoError::Unknown(res)
3560    }
3561}
3562impl fmt::Display for GetIntentsError {
3563    #[allow(unused_variables)]
3564    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3565        match *self {
3566            GetIntentsError::BadRequest(ref cause) => write!(f, "{}", cause),
3567            GetIntentsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3568            GetIntentsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3569            GetIntentsError::NotFound(ref cause) => write!(f, "{}", cause),
3570        }
3571    }
3572}
3573impl Error for GetIntentsError {}
3574/// Errors returned by GetSlotType
3575#[derive(Debug, PartialEq)]
3576pub enum GetSlotTypeError {
3577    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3578    BadRequest(String),
3579    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3580    InternalFailure(String),
3581    /// <p>The request exceeded a limit. Try your request again.</p>
3582    LimitExceeded(String),
3583    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3584    NotFound(String),
3585}
3586
3587impl GetSlotTypeError {
3588    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSlotTypeError> {
3589        if let Some(err) = proto::json::Error::parse_rest(&res) {
3590            match err.typ.as_str() {
3591                "BadRequestException" => {
3592                    return RusotoError::Service(GetSlotTypeError::BadRequest(err.msg))
3593                }
3594                "InternalFailureException" => {
3595                    return RusotoError::Service(GetSlotTypeError::InternalFailure(err.msg))
3596                }
3597                "LimitExceededException" => {
3598                    return RusotoError::Service(GetSlotTypeError::LimitExceeded(err.msg))
3599                }
3600                "NotFoundException" => {
3601                    return RusotoError::Service(GetSlotTypeError::NotFound(err.msg))
3602                }
3603                "ValidationException" => return RusotoError::Validation(err.msg),
3604                _ => {}
3605            }
3606        }
3607        RusotoError::Unknown(res)
3608    }
3609}
3610impl fmt::Display for GetSlotTypeError {
3611    #[allow(unused_variables)]
3612    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3613        match *self {
3614            GetSlotTypeError::BadRequest(ref cause) => write!(f, "{}", cause),
3615            GetSlotTypeError::InternalFailure(ref cause) => write!(f, "{}", cause),
3616            GetSlotTypeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3617            GetSlotTypeError::NotFound(ref cause) => write!(f, "{}", cause),
3618        }
3619    }
3620}
3621impl Error for GetSlotTypeError {}
3622/// Errors returned by GetSlotTypeVersions
3623#[derive(Debug, PartialEq)]
3624pub enum GetSlotTypeVersionsError {
3625    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3626    BadRequest(String),
3627    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3628    InternalFailure(String),
3629    /// <p>The request exceeded a limit. Try your request again.</p>
3630    LimitExceeded(String),
3631    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3632    NotFound(String),
3633}
3634
3635impl GetSlotTypeVersionsError {
3636    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSlotTypeVersionsError> {
3637        if let Some(err) = proto::json::Error::parse_rest(&res) {
3638            match err.typ.as_str() {
3639                "BadRequestException" => {
3640                    return RusotoError::Service(GetSlotTypeVersionsError::BadRequest(err.msg))
3641                }
3642                "InternalFailureException" => {
3643                    return RusotoError::Service(GetSlotTypeVersionsError::InternalFailure(err.msg))
3644                }
3645                "LimitExceededException" => {
3646                    return RusotoError::Service(GetSlotTypeVersionsError::LimitExceeded(err.msg))
3647                }
3648                "NotFoundException" => {
3649                    return RusotoError::Service(GetSlotTypeVersionsError::NotFound(err.msg))
3650                }
3651                "ValidationException" => return RusotoError::Validation(err.msg),
3652                _ => {}
3653            }
3654        }
3655        RusotoError::Unknown(res)
3656    }
3657}
3658impl fmt::Display for GetSlotTypeVersionsError {
3659    #[allow(unused_variables)]
3660    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3661        match *self {
3662            GetSlotTypeVersionsError::BadRequest(ref cause) => write!(f, "{}", cause),
3663            GetSlotTypeVersionsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3664            GetSlotTypeVersionsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3665            GetSlotTypeVersionsError::NotFound(ref cause) => write!(f, "{}", cause),
3666        }
3667    }
3668}
3669impl Error for GetSlotTypeVersionsError {}
3670/// Errors returned by GetSlotTypes
3671#[derive(Debug, PartialEq)]
3672pub enum GetSlotTypesError {
3673    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3674    BadRequest(String),
3675    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3676    InternalFailure(String),
3677    /// <p>The request exceeded a limit. Try your request again.</p>
3678    LimitExceeded(String),
3679    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3680    NotFound(String),
3681}
3682
3683impl GetSlotTypesError {
3684    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSlotTypesError> {
3685        if let Some(err) = proto::json::Error::parse_rest(&res) {
3686            match err.typ.as_str() {
3687                "BadRequestException" => {
3688                    return RusotoError::Service(GetSlotTypesError::BadRequest(err.msg))
3689                }
3690                "InternalFailureException" => {
3691                    return RusotoError::Service(GetSlotTypesError::InternalFailure(err.msg))
3692                }
3693                "LimitExceededException" => {
3694                    return RusotoError::Service(GetSlotTypesError::LimitExceeded(err.msg))
3695                }
3696                "NotFoundException" => {
3697                    return RusotoError::Service(GetSlotTypesError::NotFound(err.msg))
3698                }
3699                "ValidationException" => return RusotoError::Validation(err.msg),
3700                _ => {}
3701            }
3702        }
3703        RusotoError::Unknown(res)
3704    }
3705}
3706impl fmt::Display for GetSlotTypesError {
3707    #[allow(unused_variables)]
3708    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3709        match *self {
3710            GetSlotTypesError::BadRequest(ref cause) => write!(f, "{}", cause),
3711            GetSlotTypesError::InternalFailure(ref cause) => write!(f, "{}", cause),
3712            GetSlotTypesError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3713            GetSlotTypesError::NotFound(ref cause) => write!(f, "{}", cause),
3714        }
3715    }
3716}
3717impl Error for GetSlotTypesError {}
3718/// Errors returned by GetUtterancesView
3719#[derive(Debug, PartialEq)]
3720pub enum GetUtterancesViewError {
3721    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3722    BadRequest(String),
3723    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3724    InternalFailure(String),
3725    /// <p>The request exceeded a limit. Try your request again.</p>
3726    LimitExceeded(String),
3727}
3728
3729impl GetUtterancesViewError {
3730    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUtterancesViewError> {
3731        if let Some(err) = proto::json::Error::parse_rest(&res) {
3732            match err.typ.as_str() {
3733                "BadRequestException" => {
3734                    return RusotoError::Service(GetUtterancesViewError::BadRequest(err.msg))
3735                }
3736                "InternalFailureException" => {
3737                    return RusotoError::Service(GetUtterancesViewError::InternalFailure(err.msg))
3738                }
3739                "LimitExceededException" => {
3740                    return RusotoError::Service(GetUtterancesViewError::LimitExceeded(err.msg))
3741                }
3742                "ValidationException" => return RusotoError::Validation(err.msg),
3743                _ => {}
3744            }
3745        }
3746        RusotoError::Unknown(res)
3747    }
3748}
3749impl fmt::Display for GetUtterancesViewError {
3750    #[allow(unused_variables)]
3751    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3752        match *self {
3753            GetUtterancesViewError::BadRequest(ref cause) => write!(f, "{}", cause),
3754            GetUtterancesViewError::InternalFailure(ref cause) => write!(f, "{}", cause),
3755            GetUtterancesViewError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3756        }
3757    }
3758}
3759impl Error for GetUtterancesViewError {}
3760/// Errors returned by ListTagsForResource
3761#[derive(Debug, PartialEq)]
3762pub enum ListTagsForResourceError {
3763    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3764    BadRequest(String),
3765    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3766    InternalFailure(String),
3767    /// <p>The request exceeded a limit. Try your request again.</p>
3768    LimitExceeded(String),
3769    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
3770    NotFound(String),
3771}
3772
3773impl ListTagsForResourceError {
3774    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
3775        if let Some(err) = proto::json::Error::parse_rest(&res) {
3776            match err.typ.as_str() {
3777                "BadRequestException" => {
3778                    return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
3779                }
3780                "InternalFailureException" => {
3781                    return RusotoError::Service(ListTagsForResourceError::InternalFailure(err.msg))
3782                }
3783                "LimitExceededException" => {
3784                    return RusotoError::Service(ListTagsForResourceError::LimitExceeded(err.msg))
3785                }
3786                "NotFoundException" => {
3787                    return RusotoError::Service(ListTagsForResourceError::NotFound(err.msg))
3788                }
3789                "ValidationException" => return RusotoError::Validation(err.msg),
3790                _ => {}
3791            }
3792        }
3793        RusotoError::Unknown(res)
3794    }
3795}
3796impl fmt::Display for ListTagsForResourceError {
3797    #[allow(unused_variables)]
3798    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3799        match *self {
3800            ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
3801            ListTagsForResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3802            ListTagsForResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3803            ListTagsForResourceError::NotFound(ref cause) => write!(f, "{}", cause),
3804        }
3805    }
3806}
3807impl Error for ListTagsForResourceError {}
3808/// Errors returned by PutBot
3809#[derive(Debug, PartialEq)]
3810pub enum PutBotError {
3811    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3812    BadRequest(String),
3813    /// <p> There was a conflict processing the request. Try your request again. </p>
3814    Conflict(String),
3815    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3816    InternalFailure(String),
3817    /// <p>The request exceeded a limit. Try your request again.</p>
3818    LimitExceeded(String),
3819    /// <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
3820    PreconditionFailed(String),
3821}
3822
3823impl PutBotError {
3824    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBotError> {
3825        if let Some(err) = proto::json::Error::parse_rest(&res) {
3826            match err.typ.as_str() {
3827                "BadRequestException" => {
3828                    return RusotoError::Service(PutBotError::BadRequest(err.msg))
3829                }
3830                "ConflictException" => return RusotoError::Service(PutBotError::Conflict(err.msg)),
3831                "InternalFailureException" => {
3832                    return RusotoError::Service(PutBotError::InternalFailure(err.msg))
3833                }
3834                "LimitExceededException" => {
3835                    return RusotoError::Service(PutBotError::LimitExceeded(err.msg))
3836                }
3837                "PreconditionFailedException" => {
3838                    return RusotoError::Service(PutBotError::PreconditionFailed(err.msg))
3839                }
3840                "ValidationException" => return RusotoError::Validation(err.msg),
3841                _ => {}
3842            }
3843        }
3844        RusotoError::Unknown(res)
3845    }
3846}
3847impl fmt::Display for PutBotError {
3848    #[allow(unused_variables)]
3849    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3850        match *self {
3851            PutBotError::BadRequest(ref cause) => write!(f, "{}", cause),
3852            PutBotError::Conflict(ref cause) => write!(f, "{}", cause),
3853            PutBotError::InternalFailure(ref cause) => write!(f, "{}", cause),
3854            PutBotError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3855            PutBotError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
3856        }
3857    }
3858}
3859impl Error for PutBotError {}
3860/// Errors returned by PutBotAlias
3861#[derive(Debug, PartialEq)]
3862pub enum PutBotAliasError {
3863    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3864    BadRequest(String),
3865    /// <p> There was a conflict processing the request. Try your request again. </p>
3866    Conflict(String),
3867    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3868    InternalFailure(String),
3869    /// <p>The request exceeded a limit. Try your request again.</p>
3870    LimitExceeded(String),
3871    /// <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
3872    PreconditionFailed(String),
3873}
3874
3875impl PutBotAliasError {
3876    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBotAliasError> {
3877        if let Some(err) = proto::json::Error::parse_rest(&res) {
3878            match err.typ.as_str() {
3879                "BadRequestException" => {
3880                    return RusotoError::Service(PutBotAliasError::BadRequest(err.msg))
3881                }
3882                "ConflictException" => {
3883                    return RusotoError::Service(PutBotAliasError::Conflict(err.msg))
3884                }
3885                "InternalFailureException" => {
3886                    return RusotoError::Service(PutBotAliasError::InternalFailure(err.msg))
3887                }
3888                "LimitExceededException" => {
3889                    return RusotoError::Service(PutBotAliasError::LimitExceeded(err.msg))
3890                }
3891                "PreconditionFailedException" => {
3892                    return RusotoError::Service(PutBotAliasError::PreconditionFailed(err.msg))
3893                }
3894                "ValidationException" => return RusotoError::Validation(err.msg),
3895                _ => {}
3896            }
3897        }
3898        RusotoError::Unknown(res)
3899    }
3900}
3901impl fmt::Display for PutBotAliasError {
3902    #[allow(unused_variables)]
3903    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3904        match *self {
3905            PutBotAliasError::BadRequest(ref cause) => write!(f, "{}", cause),
3906            PutBotAliasError::Conflict(ref cause) => write!(f, "{}", cause),
3907            PutBotAliasError::InternalFailure(ref cause) => write!(f, "{}", cause),
3908            PutBotAliasError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3909            PutBotAliasError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
3910        }
3911    }
3912}
3913impl Error for PutBotAliasError {}
3914/// Errors returned by PutIntent
3915#[derive(Debug, PartialEq)]
3916pub enum PutIntentError {
3917    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3918    BadRequest(String),
3919    /// <p> There was a conflict processing the request. Try your request again. </p>
3920    Conflict(String),
3921    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3922    InternalFailure(String),
3923    /// <p>The request exceeded a limit. Try your request again.</p>
3924    LimitExceeded(String),
3925    /// <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
3926    PreconditionFailed(String),
3927}
3928
3929impl PutIntentError {
3930    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutIntentError> {
3931        if let Some(err) = proto::json::Error::parse_rest(&res) {
3932            match err.typ.as_str() {
3933                "BadRequestException" => {
3934                    return RusotoError::Service(PutIntentError::BadRequest(err.msg))
3935                }
3936                "ConflictException" => {
3937                    return RusotoError::Service(PutIntentError::Conflict(err.msg))
3938                }
3939                "InternalFailureException" => {
3940                    return RusotoError::Service(PutIntentError::InternalFailure(err.msg))
3941                }
3942                "LimitExceededException" => {
3943                    return RusotoError::Service(PutIntentError::LimitExceeded(err.msg))
3944                }
3945                "PreconditionFailedException" => {
3946                    return RusotoError::Service(PutIntentError::PreconditionFailed(err.msg))
3947                }
3948                "ValidationException" => return RusotoError::Validation(err.msg),
3949                _ => {}
3950            }
3951        }
3952        RusotoError::Unknown(res)
3953    }
3954}
3955impl fmt::Display for PutIntentError {
3956    #[allow(unused_variables)]
3957    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3958        match *self {
3959            PutIntentError::BadRequest(ref cause) => write!(f, "{}", cause),
3960            PutIntentError::Conflict(ref cause) => write!(f, "{}", cause),
3961            PutIntentError::InternalFailure(ref cause) => write!(f, "{}", cause),
3962            PutIntentError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3963            PutIntentError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
3964        }
3965    }
3966}
3967impl Error for PutIntentError {}
3968/// Errors returned by PutSlotType
3969#[derive(Debug, PartialEq)]
3970pub enum PutSlotTypeError {
3971    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
3972    BadRequest(String),
3973    /// <p> There was a conflict processing the request. Try your request again. </p>
3974    Conflict(String),
3975    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
3976    InternalFailure(String),
3977    /// <p>The request exceeded a limit. Try your request again.</p>
3978    LimitExceeded(String),
3979    /// <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
3980    PreconditionFailed(String),
3981}
3982
3983impl PutSlotTypeError {
3984    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutSlotTypeError> {
3985        if let Some(err) = proto::json::Error::parse_rest(&res) {
3986            match err.typ.as_str() {
3987                "BadRequestException" => {
3988                    return RusotoError::Service(PutSlotTypeError::BadRequest(err.msg))
3989                }
3990                "ConflictException" => {
3991                    return RusotoError::Service(PutSlotTypeError::Conflict(err.msg))
3992                }
3993                "InternalFailureException" => {
3994                    return RusotoError::Service(PutSlotTypeError::InternalFailure(err.msg))
3995                }
3996                "LimitExceededException" => {
3997                    return RusotoError::Service(PutSlotTypeError::LimitExceeded(err.msg))
3998                }
3999                "PreconditionFailedException" => {
4000                    return RusotoError::Service(PutSlotTypeError::PreconditionFailed(err.msg))
4001                }
4002                "ValidationException" => return RusotoError::Validation(err.msg),
4003                _ => {}
4004            }
4005        }
4006        RusotoError::Unknown(res)
4007    }
4008}
4009impl fmt::Display for PutSlotTypeError {
4010    #[allow(unused_variables)]
4011    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4012        match *self {
4013            PutSlotTypeError::BadRequest(ref cause) => write!(f, "{}", cause),
4014            PutSlotTypeError::Conflict(ref cause) => write!(f, "{}", cause),
4015            PutSlotTypeError::InternalFailure(ref cause) => write!(f, "{}", cause),
4016            PutSlotTypeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4017            PutSlotTypeError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
4018        }
4019    }
4020}
4021impl Error for PutSlotTypeError {}
4022/// Errors returned by StartImport
4023#[derive(Debug, PartialEq)]
4024pub enum StartImportError {
4025    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
4026    BadRequest(String),
4027    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
4028    InternalFailure(String),
4029    /// <p>The request exceeded a limit. Try your request again.</p>
4030    LimitExceeded(String),
4031}
4032
4033impl StartImportError {
4034    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartImportError> {
4035        if let Some(err) = proto::json::Error::parse_rest(&res) {
4036            match err.typ.as_str() {
4037                "BadRequestException" => {
4038                    return RusotoError::Service(StartImportError::BadRequest(err.msg))
4039                }
4040                "InternalFailureException" => {
4041                    return RusotoError::Service(StartImportError::InternalFailure(err.msg))
4042                }
4043                "LimitExceededException" => {
4044                    return RusotoError::Service(StartImportError::LimitExceeded(err.msg))
4045                }
4046                "ValidationException" => return RusotoError::Validation(err.msg),
4047                _ => {}
4048            }
4049        }
4050        RusotoError::Unknown(res)
4051    }
4052}
4053impl fmt::Display for StartImportError {
4054    #[allow(unused_variables)]
4055    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4056        match *self {
4057            StartImportError::BadRequest(ref cause) => write!(f, "{}", cause),
4058            StartImportError::InternalFailure(ref cause) => write!(f, "{}", cause),
4059            StartImportError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4060        }
4061    }
4062}
4063impl Error for StartImportError {}
4064/// Errors returned by TagResource
4065#[derive(Debug, PartialEq)]
4066pub enum TagResourceError {
4067    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
4068    BadRequest(String),
4069    /// <p> There was a conflict processing the request. Try your request again. </p>
4070    Conflict(String),
4071    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
4072    InternalFailure(String),
4073    /// <p>The request exceeded a limit. Try your request again.</p>
4074    LimitExceeded(String),
4075    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
4076    NotFound(String),
4077}
4078
4079impl TagResourceError {
4080    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
4081        if let Some(err) = proto::json::Error::parse_rest(&res) {
4082            match err.typ.as_str() {
4083                "BadRequestException" => {
4084                    return RusotoError::Service(TagResourceError::BadRequest(err.msg))
4085                }
4086                "ConflictException" => {
4087                    return RusotoError::Service(TagResourceError::Conflict(err.msg))
4088                }
4089                "InternalFailureException" => {
4090                    return RusotoError::Service(TagResourceError::InternalFailure(err.msg))
4091                }
4092                "LimitExceededException" => {
4093                    return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
4094                }
4095                "NotFoundException" => {
4096                    return RusotoError::Service(TagResourceError::NotFound(err.msg))
4097                }
4098                "ValidationException" => return RusotoError::Validation(err.msg),
4099                _ => {}
4100            }
4101        }
4102        RusotoError::Unknown(res)
4103    }
4104}
4105impl fmt::Display for TagResourceError {
4106    #[allow(unused_variables)]
4107    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4108        match *self {
4109            TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
4110            TagResourceError::Conflict(ref cause) => write!(f, "{}", cause),
4111            TagResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
4112            TagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4113            TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
4114        }
4115    }
4116}
4117impl Error for TagResourceError {}
4118/// Errors returned by UntagResource
4119#[derive(Debug, PartialEq)]
4120pub enum UntagResourceError {
4121    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
4122    BadRequest(String),
4123    /// <p> There was a conflict processing the request. Try your request again. </p>
4124    Conflict(String),
4125    /// <p>An internal Amazon Lex error occurred. Try your request again.</p>
4126    InternalFailure(String),
4127    /// <p>The request exceeded a limit. Try your request again.</p>
4128    LimitExceeded(String),
4129    /// <p>The resource specified in the request was not found. Check the resource and try again.</p>
4130    NotFound(String),
4131}
4132
4133impl UntagResourceError {
4134    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
4135        if let Some(err) = proto::json::Error::parse_rest(&res) {
4136            match err.typ.as_str() {
4137                "BadRequestException" => {
4138                    return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
4139                }
4140                "ConflictException" => {
4141                    return RusotoError::Service(UntagResourceError::Conflict(err.msg))
4142                }
4143                "InternalFailureException" => {
4144                    return RusotoError::Service(UntagResourceError::InternalFailure(err.msg))
4145                }
4146                "LimitExceededException" => {
4147                    return RusotoError::Service(UntagResourceError::LimitExceeded(err.msg))
4148                }
4149                "NotFoundException" => {
4150                    return RusotoError::Service(UntagResourceError::NotFound(err.msg))
4151                }
4152                "ValidationException" => return RusotoError::Validation(err.msg),
4153                _ => {}
4154            }
4155        }
4156        RusotoError::Unknown(res)
4157    }
4158}
4159impl fmt::Display for UntagResourceError {
4160    #[allow(unused_variables)]
4161    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4162        match *self {
4163            UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
4164            UntagResourceError::Conflict(ref cause) => write!(f, "{}", cause),
4165            UntagResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
4166            UntagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4167            UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
4168        }
4169    }
4170}
4171impl Error for UntagResourceError {}
4172/// Trait representing the capabilities of the Amazon Lex Model Building Service API. Amazon Lex Model Building Service clients implement this trait.
4173#[async_trait]
4174pub trait LexModels {
4175    /// <p>Creates a new version of the bot based on the <code>$LATEST</code> version. If the <code>$LATEST</code> version of this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version. It returns the last created version.</p> <note> <p>You can update only the <code>$LATEST</code> version of the bot. You can't update the numbered versions that you create with the <code>CreateBotVersion</code> operation.</p> </note> <p> When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see <a>versioning-intro</a>. </p> <p> This operation requires permission for the <code>lex:CreateBotVersion</code> action. </p>
4176    async fn create_bot_version(
4177        &self,
4178        input: CreateBotVersionRequest,
4179    ) -> Result<CreateBotVersionResponse, RusotoError<CreateBotVersionError>>;
4180
4181    /// <p>Creates a new version of an intent based on the <code>$LATEST</code> version of the intent. If the <code>$LATEST</code> version of this intent hasn't changed since you last updated it, Amazon Lex doesn't create a new version. It returns the last version you created.</p> <note> <p>You can update only the <code>$LATEST</code> version of the intent. You can't update the numbered versions that you create with the <code>CreateIntentVersion</code> operation.</p> </note> <p> When you create a version of an intent, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see <a>versioning-intro</a>. </p> <p>This operation requires permissions to perform the <code>lex:CreateIntentVersion</code> action. </p>
4182    async fn create_intent_version(
4183        &self,
4184        input: CreateIntentVersionRequest,
4185    ) -> Result<CreateIntentVersionResponse, RusotoError<CreateIntentVersionError>>;
4186
4187    /// <p>Creates a new version of a slot type based on the <code>$LATEST</code> version of the specified slot type. If the <code>$LATEST</code> version of this resource has not changed since the last version that you created, Amazon Lex doesn't create a new version. It returns the last version that you created. </p> <note> <p>You can update only the <code>$LATEST</code> version of a slot type. You can't update the numbered versions that you create with the <code>CreateSlotTypeVersion</code> operation.</p> </note> <p>When you create a version of a slot type, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see <a>versioning-intro</a>. </p> <p>This operation requires permissions for the <code>lex:CreateSlotTypeVersion</code> action.</p>
4188    async fn create_slot_type_version(
4189        &self,
4190        input: CreateSlotTypeVersionRequest,
4191    ) -> Result<CreateSlotTypeVersionResponse, RusotoError<CreateSlotTypeVersionError>>;
4192
4193    /// <p>Deletes all versions of the bot, including the <code>$LATEST</code> version. To delete a specific version of the bot, use the <a>DeleteBotVersion</a> operation. The <code>DeleteBot</code> operation doesn't immediately remove the bot schema. Instead, it is marked for deletion and removed later.</p> <p>Amazon Lex stores utterances indefinitely for improving the ability of your bot to respond to user inputs. These utterances are not removed when the bot is deleted. To remove the utterances, use the <a>DeleteUtterances</a> operation.</p> <p>If a bot has an alias, you can't delete it. Instead, the <code>DeleteBot</code> operation returns a <code>ResourceInUseException</code> exception that includes a reference to the alias that refers to the bot. To remove the reference to the bot, delete the alias. If you get the same exception again, delete the referring alias until the <code>DeleteBot</code> operation is successful.</p> <p>This operation requires permissions for the <code>lex:DeleteBot</code> action.</p>
4194    async fn delete_bot(&self, input: DeleteBotRequest) -> Result<(), RusotoError<DeleteBotError>>;
4195
4196    /// <p>Deletes an alias for the specified bot. </p> <p>You can't delete an alias that is used in the association between a bot and a messaging channel. If an alias is used in a channel association, the <code>DeleteBot</code> operation returns a <code>ResourceInUseException</code> exception that includes a reference to the channel association that refers to the bot. You can remove the reference to the alias by deleting the channel association. If you get the same exception again, delete the referring association until the <code>DeleteBotAlias</code> operation is successful.</p>
4197    async fn delete_bot_alias(
4198        &self,
4199        input: DeleteBotAliasRequest,
4200    ) -> Result<(), RusotoError<DeleteBotAliasError>>;
4201
4202    /// <p>Deletes the association between an Amazon Lex bot and a messaging platform.</p> <p>This operation requires permission for the <code>lex:DeleteBotChannelAssociation</code> action.</p>
4203    async fn delete_bot_channel_association(
4204        &self,
4205        input: DeleteBotChannelAssociationRequest,
4206    ) -> Result<(), RusotoError<DeleteBotChannelAssociationError>>;
4207
4208    /// <p>Deletes a specific version of a bot. To delete all versions of a bot, use the <a>DeleteBot</a> operation. </p> <p>This operation requires permissions for the <code>lex:DeleteBotVersion</code> action.</p>
4209    async fn delete_bot_version(
4210        &self,
4211        input: DeleteBotVersionRequest,
4212    ) -> Result<(), RusotoError<DeleteBotVersionError>>;
4213
4214    /// <p>Deletes all versions of the intent, including the <code>$LATEST</code> version. To delete a specific version of the intent, use the <a>DeleteIntentVersion</a> operation.</p> <p> You can delete a version of an intent only if it is not referenced. To delete an intent that is referred to in one or more bots (see <a>how-it-works</a>), you must remove those references first. </p> <note> <p> If you get the <code>ResourceInUseException</code> exception, it provides an example reference that shows where the intent is referenced. To remove the reference to the intent, either update the bot or delete it. If you get the same exception when you attempt to delete the intent again, repeat until the intent has no references and the call to <code>DeleteIntent</code> is successful. </p> </note> <p> This operation requires permission for the <code>lex:DeleteIntent</code> action. </p>
4215    async fn delete_intent(
4216        &self,
4217        input: DeleteIntentRequest,
4218    ) -> Result<(), RusotoError<DeleteIntentError>>;
4219
4220    /// <p>Deletes a specific version of an intent. To delete all versions of a intent, use the <a>DeleteIntent</a> operation. </p> <p>This operation requires permissions for the <code>lex:DeleteIntentVersion</code> action.</p>
4221    async fn delete_intent_version(
4222        &self,
4223        input: DeleteIntentVersionRequest,
4224    ) -> Result<(), RusotoError<DeleteIntentVersionError>>;
4225
4226    /// <p>Deletes all versions of the slot type, including the <code>$LATEST</code> version. To delete a specific version of the slot type, use the <a>DeleteSlotTypeVersion</a> operation.</p> <p> You can delete a version of a slot type only if it is not referenced. To delete a slot type that is referred to in one or more intents, you must remove those references first. </p> <note> <p> If you get the <code>ResourceInUseException</code> exception, the exception provides an example reference that shows the intent where the slot type is referenced. To remove the reference to the slot type, either update the intent or delete it. If you get the same exception when you attempt to delete the slot type again, repeat until the slot type has no references and the <code>DeleteSlotType</code> call is successful. </p> </note> <p>This operation requires permission for the <code>lex:DeleteSlotType</code> action.</p>
4227    async fn delete_slot_type(
4228        &self,
4229        input: DeleteSlotTypeRequest,
4230    ) -> Result<(), RusotoError<DeleteSlotTypeError>>;
4231
4232    /// <p>Deletes a specific version of a slot type. To delete all versions of a slot type, use the <a>DeleteSlotType</a> operation. </p> <p>This operation requires permissions for the <code>lex:DeleteSlotTypeVersion</code> action.</p>
4233    async fn delete_slot_type_version(
4234        &self,
4235        input: DeleteSlotTypeVersionRequest,
4236    ) -> Result<(), RusotoError<DeleteSlotTypeVersionError>>;
4237
4238    /// <p>Deletes stored utterances.</p> <p>Amazon Lex stores the utterances that users send to your bot. Utterances are stored for 15 days for use with the <a>GetUtterancesView</a> operation, and then stored indefinitely for use in improving the ability of your bot to respond to user input.</p> <p>Use the <code>DeleteUtterances</code> operation to manually delete stored utterances for a specific user. When you use the <code>DeleteUtterances</code> operation, utterances stored for improving your bot's ability to respond to user input are deleted immediately. Utterances stored for use with the <code>GetUtterancesView</code> operation are deleted after 15 days.</p> <p>This operation requires permissions for the <code>lex:DeleteUtterances</code> action.</p>
4239    async fn delete_utterances(
4240        &self,
4241        input: DeleteUtterancesRequest,
4242    ) -> Result<(), RusotoError<DeleteUtterancesError>>;
4243
4244    /// <p>Returns metadata information for a specific bot. You must provide the bot name and the bot version or alias. </p> <p> This operation requires permissions for the <code>lex:GetBot</code> action. </p>
4245    async fn get_bot(
4246        &self,
4247        input: GetBotRequest,
4248    ) -> Result<GetBotResponse, RusotoError<GetBotError>>;
4249
4250    /// <p>Returns information about an Amazon Lex bot alias. For more information about aliases, see <a>versioning-aliases</a>.</p> <p>This operation requires permissions for the <code>lex:GetBotAlias</code> action.</p>
4251    async fn get_bot_alias(
4252        &self,
4253        input: GetBotAliasRequest,
4254    ) -> Result<GetBotAliasResponse, RusotoError<GetBotAliasError>>;
4255
4256    /// <p>Returns a list of aliases for a specified Amazon Lex bot.</p> <p>This operation requires permissions for the <code>lex:GetBotAliases</code> action.</p>
4257    async fn get_bot_aliases(
4258        &self,
4259        input: GetBotAliasesRequest,
4260    ) -> Result<GetBotAliasesResponse, RusotoError<GetBotAliasesError>>;
4261
4262    /// <p>Returns information about the association between an Amazon Lex bot and a messaging platform.</p> <p>This operation requires permissions for the <code>lex:GetBotChannelAssociation</code> action.</p>
4263    async fn get_bot_channel_association(
4264        &self,
4265        input: GetBotChannelAssociationRequest,
4266    ) -> Result<GetBotChannelAssociationResponse, RusotoError<GetBotChannelAssociationError>>;
4267
4268    /// <p> Returns a list of all of the channels associated with the specified bot. </p> <p>The <code>GetBotChannelAssociations</code> operation requires permissions for the <code>lex:GetBotChannelAssociations</code> action.</p>
4269    async fn get_bot_channel_associations(
4270        &self,
4271        input: GetBotChannelAssociationsRequest,
4272    ) -> Result<GetBotChannelAssociationsResponse, RusotoError<GetBotChannelAssociationsError>>;
4273
4274    /// <p>Gets information about all of the versions of a bot.</p> <p>The <code>GetBotVersions</code> operation returns a <code>BotMetadata</code> object for each version of a bot. For example, if a bot has three numbered versions, the <code>GetBotVersions</code> operation returns four <code>BotMetadata</code> objects in the response, one for each numbered version and one for the <code>$LATEST</code> version. </p> <p>The <code>GetBotVersions</code> operation always returns at least one version, the <code>$LATEST</code> version.</p> <p>This operation requires permissions for the <code>lex:GetBotVersions</code> action.</p>
4275    async fn get_bot_versions(
4276        &self,
4277        input: GetBotVersionsRequest,
4278    ) -> Result<GetBotVersionsResponse, RusotoError<GetBotVersionsError>>;
4279
4280    /// <p>Returns bot information as follows: </p> <ul> <li> <p>If you provide the <code>nameContains</code> field, the response includes information for the <code>$LATEST</code> version of all bots whose name contains the specified string.</p> </li> <li> <p>If you don't specify the <code>nameContains</code> field, the operation returns information about the <code>$LATEST</code> version of all of your bots.</p> </li> </ul> <p>This operation requires permission for the <code>lex:GetBots</code> action.</p>
4281    async fn get_bots(
4282        &self,
4283        input: GetBotsRequest,
4284    ) -> Result<GetBotsResponse, RusotoError<GetBotsError>>;
4285
4286    /// <p>Returns information about a built-in intent.</p> <p>This operation requires permission for the <code>lex:GetBuiltinIntent</code> action.</p>
4287    async fn get_builtin_intent(
4288        &self,
4289        input: GetBuiltinIntentRequest,
4290    ) -> Result<GetBuiltinIntentResponse, RusotoError<GetBuiltinIntentError>>;
4291
4292    /// <p>Gets a list of built-in intents that meet the specified criteria.</p> <p>This operation requires permission for the <code>lex:GetBuiltinIntents</code> action.</p>
4293    async fn get_builtin_intents(
4294        &self,
4295        input: GetBuiltinIntentsRequest,
4296    ) -> Result<GetBuiltinIntentsResponse, RusotoError<GetBuiltinIntentsError>>;
4297
4298    /// <p>Gets a list of built-in slot types that meet the specified criteria.</p> <p>For a list of built-in slot types, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference">Slot Type Reference</a> in the <i>Alexa Skills Kit</i>.</p> <p>This operation requires permission for the <code>lex:GetBuiltInSlotTypes</code> action.</p>
4299    async fn get_builtin_slot_types(
4300        &self,
4301        input: GetBuiltinSlotTypesRequest,
4302    ) -> Result<GetBuiltinSlotTypesResponse, RusotoError<GetBuiltinSlotTypesError>>;
4303
4304    /// <p>Exports the contents of a Amazon Lex resource in a specified format. </p>
4305    async fn get_export(
4306        &self,
4307        input: GetExportRequest,
4308    ) -> Result<GetExportResponse, RusotoError<GetExportError>>;
4309
4310    /// <p>Gets information about an import job started with the <code>StartImport</code> operation.</p>
4311    async fn get_import(
4312        &self,
4313        input: GetImportRequest,
4314    ) -> Result<GetImportResponse, RusotoError<GetImportError>>;
4315
4316    /// <p> Returns information about an intent. In addition to the intent name, you must specify the intent version. </p> <p> This operation requires permissions to perform the <code>lex:GetIntent</code> action. </p>
4317    async fn get_intent(
4318        &self,
4319        input: GetIntentRequest,
4320    ) -> Result<GetIntentResponse, RusotoError<GetIntentError>>;
4321
4322    /// <p>Gets information about all of the versions of an intent.</p> <p>The <code>GetIntentVersions</code> operation returns an <code>IntentMetadata</code> object for each version of an intent. For example, if an intent has three numbered versions, the <code>GetIntentVersions</code> operation returns four <code>IntentMetadata</code> objects in the response, one for each numbered version and one for the <code>$LATEST</code> version. </p> <p>The <code>GetIntentVersions</code> operation always returns at least one version, the <code>$LATEST</code> version.</p> <p>This operation requires permissions for the <code>lex:GetIntentVersions</code> action.</p>
4323    async fn get_intent_versions(
4324        &self,
4325        input: GetIntentVersionsRequest,
4326    ) -> Result<GetIntentVersionsResponse, RusotoError<GetIntentVersionsError>>;
4327
4328    /// <p>Returns intent information as follows: </p> <ul> <li> <p>If you specify the <code>nameContains</code> field, returns the <code>$LATEST</code> version of all intents that contain the specified string.</p> </li> <li> <p> If you don't specify the <code>nameContains</code> field, returns information about the <code>$LATEST</code> version of all intents. </p> </li> </ul> <p> The operation requires permission for the <code>lex:GetIntents</code> action. </p>
4329    async fn get_intents(
4330        &self,
4331        input: GetIntentsRequest,
4332    ) -> Result<GetIntentsResponse, RusotoError<GetIntentsError>>;
4333
4334    /// <p>Returns information about a specific version of a slot type. In addition to specifying the slot type name, you must specify the slot type version.</p> <p>This operation requires permissions for the <code>lex:GetSlotType</code> action.</p>
4335    async fn get_slot_type(
4336        &self,
4337        input: GetSlotTypeRequest,
4338    ) -> Result<GetSlotTypeResponse, RusotoError<GetSlotTypeError>>;
4339
4340    /// <p>Gets information about all versions of a slot type.</p> <p>The <code>GetSlotTypeVersions</code> operation returns a <code>SlotTypeMetadata</code> object for each version of a slot type. For example, if a slot type has three numbered versions, the <code>GetSlotTypeVersions</code> operation returns four <code>SlotTypeMetadata</code> objects in the response, one for each numbered version and one for the <code>$LATEST</code> version. </p> <p>The <code>GetSlotTypeVersions</code> operation always returns at least one version, the <code>$LATEST</code> version.</p> <p>This operation requires permissions for the <code>lex:GetSlotTypeVersions</code> action.</p>
4341    async fn get_slot_type_versions(
4342        &self,
4343        input: GetSlotTypeVersionsRequest,
4344    ) -> Result<GetSlotTypeVersionsResponse, RusotoError<GetSlotTypeVersionsError>>;
4345
4346    /// <p>Returns slot type information as follows: </p> <ul> <li> <p>If you specify the <code>nameContains</code> field, returns the <code>$LATEST</code> version of all slot types that contain the specified string.</p> </li> <li> <p> If you don't specify the <code>nameContains</code> field, returns information about the <code>$LATEST</code> version of all slot types. </p> </li> </ul> <p> The operation requires permission for the <code>lex:GetSlotTypes</code> action. </p>
4347    async fn get_slot_types(
4348        &self,
4349        input: GetSlotTypesRequest,
4350    ) -> Result<GetSlotTypesResponse, RusotoError<GetSlotTypesError>>;
4351
4352    /// <p>Use the <code>GetUtterancesView</code> operation to get information about the utterances that your users have made to your bot. You can use this list to tune the utterances that your bot responds to.</p> <p>For example, say that you have created a bot to order flowers. After your users have used your bot for a while, use the <code>GetUtterancesView</code> operation to see the requests that they have made and whether they have been successful. You might find that the utterance "I want flowers" is not being recognized. You could add this utterance to the <code>OrderFlowers</code> intent so that your bot recognizes that utterance.</p> <p>After you publish a new version of a bot, you can get information about the old version and the new so that you can compare the performance across the two versions. </p> <p>Utterance statistics are generated once a day. Data is available for the last 15 days. You can request information for up to 5 versions of your bot in each request. Amazon Lex returns the most frequent utterances received by the bot in the last 15 days. The response contains information about a maximum of 100 utterances for each version.</p> <p>If you set <code>childDirected</code> field to true when you created your bot, or if you opted out of participating in improving Amazon Lex, utterances are not available.</p> <p>This operation requires permissions for the <code>lex:GetUtterancesView</code> action.</p>
4353    async fn get_utterances_view(
4354        &self,
4355        input: GetUtterancesViewRequest,
4356    ) -> Result<GetUtterancesViewResponse, RusotoError<GetUtterancesViewError>>;
4357
4358    /// <p>Gets a list of tags associated with the specified resource. Only bots, bot aliases, and bot channels can have tags associated with them.</p>
4359    async fn list_tags_for_resource(
4360        &self,
4361        input: ListTagsForResourceRequest,
4362    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
4363
4364    /// <p>Creates an Amazon Lex conversational bot or replaces an existing bot. When you create or update a bot you are only required to specify a name, a locale, and whether the bot is directed toward children under age 13. You can use this to add intents later, or to remove intents from an existing bot. When you create a bot with the minimum information, the bot is created or updated but Amazon Lex returns the <code/> response <code>FAILED</code>. You can build the bot after you add one or more intents. For more information about Amazon Lex bots, see <a>how-it-works</a>. </p> <p>If you specify the name of an existing bot, the fields in the request replace the existing values in the <code>$LATEST</code> version of the bot. Amazon Lex removes any fields that you don't provide values for in the request, except for the <code>idleTTLInSeconds</code> and <code>privacySettings</code> fields, which are set to their default values. If you don't specify values for required fields, Amazon Lex throws an exception.</p> <p>This operation requires permissions for the <code>lex:PutBot</code> action. For more information, see <a>security-iam</a>.</p>
4365    async fn put_bot(
4366        &self,
4367        input: PutBotRequest,
4368    ) -> Result<PutBotResponse, RusotoError<PutBotError>>;
4369
4370    /// <p>Creates an alias for the specified version of the bot or replaces an alias for the specified bot. To change the version of the bot that the alias points to, replace the alias. For more information about aliases, see <a>versioning-aliases</a>.</p> <p>This operation requires permissions for the <code>lex:PutBotAlias</code> action. </p>
4371    async fn put_bot_alias(
4372        &self,
4373        input: PutBotAliasRequest,
4374    ) -> Result<PutBotAliasResponse, RusotoError<PutBotAliasError>>;
4375
4376    /// <p>Creates an intent or replaces an existing intent.</p> <p>To define the interaction between the user and your bot, you use one or more intents. For a pizza ordering bot, for example, you would create an <code>OrderPizza</code> intent. </p> <p>To create an intent or replace an existing intent, you must provide the following:</p> <ul> <li> <p>Intent name. For example, <code>OrderPizza</code>.</p> </li> <li> <p>Sample utterances. For example, "Can I order a pizza, please." and "I want to order a pizza."</p> </li> <li> <p>Information to be gathered. You specify slot types for the information that your bot will request from the user. You can specify standard slot types, such as a date or a time, or custom slot types such as the size and crust of a pizza.</p> </li> <li> <p>How the intent will be fulfilled. You can provide a Lambda function or configure the intent to return the intent information to the client application. If you use a Lambda function, when all of the intent information is available, Amazon Lex invokes your Lambda function. If you configure your intent to return the intent information to the client application. </p> </li> </ul> <p>You can specify other optional information in the request, such as:</p> <ul> <li> <p>A confirmation prompt to ask the user to confirm an intent. For example, "Shall I order your pizza?"</p> </li> <li> <p>A conclusion statement to send to the user after the intent has been fulfilled. For example, "I placed your pizza order."</p> </li> <li> <p>A follow-up prompt that asks the user for additional activity. For example, asking "Do you want to order a drink with your pizza?"</p> </li> </ul> <p>If you specify an existing intent name to update the intent, Amazon Lex replaces the values in the <code>$LATEST</code> version of the intent with the values in the request. Amazon Lex removes fields that you don't provide in the request. If you don't specify the required fields, Amazon Lex throws an exception. When you update the <code>$LATEST</code> version of an intent, the <code>status</code> field of any bot that uses the <code>$LATEST</code> version of the intent is set to <code>NOT_BUILT</code>.</p> <p>For more information, see <a>how-it-works</a>.</p> <p>This operation requires permissions for the <code>lex:PutIntent</code> action.</p>
4377    async fn put_intent(
4378        &self,
4379        input: PutIntentRequest,
4380    ) -> Result<PutIntentResponse, RusotoError<PutIntentError>>;
4381
4382    /// <p>Creates a custom slot type or replaces an existing custom slot type.</p> <p>To create a custom slot type, specify a name for the slot type and a set of enumeration values, which are the values that a slot of this type can assume. For more information, see <a>how-it-works</a>.</p> <p>If you specify the name of an existing slot type, the fields in the request replace the existing values in the <code>$LATEST</code> version of the slot type. Amazon Lex removes the fields that you don't provide in the request. If you don't specify required fields, Amazon Lex throws an exception. When you update the <code>$LATEST</code> version of a slot type, if a bot uses the <code>$LATEST</code> version of an intent that contains the slot type, the bot's <code>status</code> field is set to <code>NOT_BUILT</code>.</p> <p>This operation requires permissions for the <code>lex:PutSlotType</code> action.</p>
4383    async fn put_slot_type(
4384        &self,
4385        input: PutSlotTypeRequest,
4386    ) -> Result<PutSlotTypeResponse, RusotoError<PutSlotTypeError>>;
4387
4388    /// <p>Starts a job to import a resource to Amazon Lex.</p>
4389    async fn start_import(
4390        &self,
4391        input: StartImportRequest,
4392    ) -> Result<StartImportResponse, RusotoError<StartImportError>>;
4393
4394    /// <p>Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced with the new value.</p>
4395    async fn tag_resource(
4396        &self,
4397        input: TagResourceRequest,
4398    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
4399
4400    /// <p>Removes tags from a bot, bot alias or bot channel.</p>
4401    async fn untag_resource(
4402        &self,
4403        input: UntagResourceRequest,
4404    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
4405}
4406/// A client for the Amazon Lex Model Building Service API.
4407#[derive(Clone)]
4408pub struct LexModelsClient {
4409    client: Client,
4410    region: region::Region,
4411}
4412
4413impl LexModelsClient {
4414    /// Creates a client backed by the default tokio event loop.
4415    ///
4416    /// The client will use the default credentials provider and tls client.
4417    pub fn new(region: region::Region) -> LexModelsClient {
4418        LexModelsClient {
4419            client: Client::shared(),
4420            region,
4421        }
4422    }
4423
4424    pub fn new_with<P, D>(
4425        request_dispatcher: D,
4426        credentials_provider: P,
4427        region: region::Region,
4428    ) -> LexModelsClient
4429    where
4430        P: ProvideAwsCredentials + Send + Sync + 'static,
4431        D: DispatchSignedRequest + Send + Sync + 'static,
4432    {
4433        LexModelsClient {
4434            client: Client::new_with(credentials_provider, request_dispatcher),
4435            region,
4436        }
4437    }
4438
4439    pub fn new_with_client(client: Client, region: region::Region) -> LexModelsClient {
4440        LexModelsClient { client, region }
4441    }
4442}
4443
4444#[async_trait]
4445impl LexModels for LexModelsClient {
4446    /// <p>Creates a new version of the bot based on the <code>$LATEST</code> version. If the <code>$LATEST</code> version of this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version. It returns the last created version.</p> <note> <p>You can update only the <code>$LATEST</code> version of the bot. You can't update the numbered versions that you create with the <code>CreateBotVersion</code> operation.</p> </note> <p> When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see <a>versioning-intro</a>. </p> <p> This operation requires permission for the <code>lex:CreateBotVersion</code> action. </p>
4447    #[allow(unused_mut)]
4448    async fn create_bot_version(
4449        &self,
4450        input: CreateBotVersionRequest,
4451    ) -> Result<CreateBotVersionResponse, RusotoError<CreateBotVersionError>> {
4452        let request_uri = format!("/bots/{name}/versions", name = input.name);
4453
4454        let mut request = SignedRequest::new("POST", "lex", &self.region, &request_uri);
4455        request.set_content_type("application/x-amz-json-1.1".to_owned());
4456
4457        request.set_endpoint_prefix("models.lex".to_string());
4458        let encoded = Some(serde_json::to_vec(&input).unwrap());
4459        request.set_payload(encoded);
4460
4461        let mut response = self
4462            .client
4463            .sign_and_dispatch(request)
4464            .await
4465            .map_err(RusotoError::from)?;
4466        if response.status.as_u16() == 201 {
4467            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4468            let result = proto::json::ResponsePayload::new(&response)
4469                .deserialize::<CreateBotVersionResponse, _>()?;
4470
4471            Ok(result)
4472        } else {
4473            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4474            Err(CreateBotVersionError::from_response(response))
4475        }
4476    }
4477
4478    /// <p>Creates a new version of an intent based on the <code>$LATEST</code> version of the intent. If the <code>$LATEST</code> version of this intent hasn't changed since you last updated it, Amazon Lex doesn't create a new version. It returns the last version you created.</p> <note> <p>You can update only the <code>$LATEST</code> version of the intent. You can't update the numbered versions that you create with the <code>CreateIntentVersion</code> operation.</p> </note> <p> When you create a version of an intent, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see <a>versioning-intro</a>. </p> <p>This operation requires permissions to perform the <code>lex:CreateIntentVersion</code> action. </p>
4479    #[allow(unused_mut)]
4480    async fn create_intent_version(
4481        &self,
4482        input: CreateIntentVersionRequest,
4483    ) -> Result<CreateIntentVersionResponse, RusotoError<CreateIntentVersionError>> {
4484        let request_uri = format!("/intents/{name}/versions", name = input.name);
4485
4486        let mut request = SignedRequest::new("POST", "lex", &self.region, &request_uri);
4487        request.set_content_type("application/x-amz-json-1.1".to_owned());
4488
4489        request.set_endpoint_prefix("models.lex".to_string());
4490        let encoded = Some(serde_json::to_vec(&input).unwrap());
4491        request.set_payload(encoded);
4492
4493        let mut response = self
4494            .client
4495            .sign_and_dispatch(request)
4496            .await
4497            .map_err(RusotoError::from)?;
4498        if response.status.as_u16() == 201 {
4499            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4500            let result = proto::json::ResponsePayload::new(&response)
4501                .deserialize::<CreateIntentVersionResponse, _>()?;
4502
4503            Ok(result)
4504        } else {
4505            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4506            Err(CreateIntentVersionError::from_response(response))
4507        }
4508    }
4509
4510    /// <p>Creates a new version of a slot type based on the <code>$LATEST</code> version of the specified slot type. If the <code>$LATEST</code> version of this resource has not changed since the last version that you created, Amazon Lex doesn't create a new version. It returns the last version that you created. </p> <note> <p>You can update only the <code>$LATEST</code> version of a slot type. You can't update the numbered versions that you create with the <code>CreateSlotTypeVersion</code> operation.</p> </note> <p>When you create a version of a slot type, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see <a>versioning-intro</a>. </p> <p>This operation requires permissions for the <code>lex:CreateSlotTypeVersion</code> action.</p>
4511    #[allow(unused_mut)]
4512    async fn create_slot_type_version(
4513        &self,
4514        input: CreateSlotTypeVersionRequest,
4515    ) -> Result<CreateSlotTypeVersionResponse, RusotoError<CreateSlotTypeVersionError>> {
4516        let request_uri = format!("/slottypes/{name}/versions", name = input.name);
4517
4518        let mut request = SignedRequest::new("POST", "lex", &self.region, &request_uri);
4519        request.set_content_type("application/x-amz-json-1.1".to_owned());
4520
4521        request.set_endpoint_prefix("models.lex".to_string());
4522        let encoded = Some(serde_json::to_vec(&input).unwrap());
4523        request.set_payload(encoded);
4524
4525        let mut response = self
4526            .client
4527            .sign_and_dispatch(request)
4528            .await
4529            .map_err(RusotoError::from)?;
4530        if response.status.as_u16() == 201 {
4531            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4532            let result = proto::json::ResponsePayload::new(&response)
4533                .deserialize::<CreateSlotTypeVersionResponse, _>()?;
4534
4535            Ok(result)
4536        } else {
4537            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4538            Err(CreateSlotTypeVersionError::from_response(response))
4539        }
4540    }
4541
4542    /// <p>Deletes all versions of the bot, including the <code>$LATEST</code> version. To delete a specific version of the bot, use the <a>DeleteBotVersion</a> operation. The <code>DeleteBot</code> operation doesn't immediately remove the bot schema. Instead, it is marked for deletion and removed later.</p> <p>Amazon Lex stores utterances indefinitely for improving the ability of your bot to respond to user inputs. These utterances are not removed when the bot is deleted. To remove the utterances, use the <a>DeleteUtterances</a> operation.</p> <p>If a bot has an alias, you can't delete it. Instead, the <code>DeleteBot</code> operation returns a <code>ResourceInUseException</code> exception that includes a reference to the alias that refers to the bot. To remove the reference to the bot, delete the alias. If you get the same exception again, delete the referring alias until the <code>DeleteBot</code> operation is successful.</p> <p>This operation requires permissions for the <code>lex:DeleteBot</code> action.</p>
4543    #[allow(unused_mut)]
4544    async fn delete_bot(&self, input: DeleteBotRequest) -> Result<(), RusotoError<DeleteBotError>> {
4545        let request_uri = format!("/bots/{name}", name = input.name);
4546
4547        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4548        request.set_content_type("application/x-amz-json-1.1".to_owned());
4549
4550        request.set_endpoint_prefix("models.lex".to_string());
4551
4552        let mut response = self
4553            .client
4554            .sign_and_dispatch(request)
4555            .await
4556            .map_err(RusotoError::from)?;
4557        if response.status.as_u16() == 204 {
4558            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4559            let result = ::std::mem::drop(response);
4560
4561            Ok(result)
4562        } else {
4563            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4564            Err(DeleteBotError::from_response(response))
4565        }
4566    }
4567
4568    /// <p>Deletes an alias for the specified bot. </p> <p>You can't delete an alias that is used in the association between a bot and a messaging channel. If an alias is used in a channel association, the <code>DeleteBot</code> operation returns a <code>ResourceInUseException</code> exception that includes a reference to the channel association that refers to the bot. You can remove the reference to the alias by deleting the channel association. If you get the same exception again, delete the referring association until the <code>DeleteBotAlias</code> operation is successful.</p>
4569    #[allow(unused_mut)]
4570    async fn delete_bot_alias(
4571        &self,
4572        input: DeleteBotAliasRequest,
4573    ) -> Result<(), RusotoError<DeleteBotAliasError>> {
4574        let request_uri = format!(
4575            "/bots/{bot_name}/aliases/{name}",
4576            bot_name = input.bot_name,
4577            name = input.name
4578        );
4579
4580        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4581        request.set_content_type("application/x-amz-json-1.1".to_owned());
4582
4583        request.set_endpoint_prefix("models.lex".to_string());
4584
4585        let mut response = self
4586            .client
4587            .sign_and_dispatch(request)
4588            .await
4589            .map_err(RusotoError::from)?;
4590        if response.status.as_u16() == 204 {
4591            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4592            let result = ::std::mem::drop(response);
4593
4594            Ok(result)
4595        } else {
4596            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4597            Err(DeleteBotAliasError::from_response(response))
4598        }
4599    }
4600
4601    /// <p>Deletes the association between an Amazon Lex bot and a messaging platform.</p> <p>This operation requires permission for the <code>lex:DeleteBotChannelAssociation</code> action.</p>
4602    #[allow(unused_mut)]
4603    async fn delete_bot_channel_association(
4604        &self,
4605        input: DeleteBotChannelAssociationRequest,
4606    ) -> Result<(), RusotoError<DeleteBotChannelAssociationError>> {
4607        let request_uri = format!(
4608            "/bots/{bot_name}/aliases/{alias_name}/channels/{name}",
4609            alias_name = input.bot_alias,
4610            bot_name = input.bot_name,
4611            name = input.name
4612        );
4613
4614        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4615        request.set_content_type("application/x-amz-json-1.1".to_owned());
4616
4617        request.set_endpoint_prefix("models.lex".to_string());
4618
4619        let mut response = self
4620            .client
4621            .sign_and_dispatch(request)
4622            .await
4623            .map_err(RusotoError::from)?;
4624        if response.status.as_u16() == 204 {
4625            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4626            let result = ::std::mem::drop(response);
4627
4628            Ok(result)
4629        } else {
4630            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4631            Err(DeleteBotChannelAssociationError::from_response(response))
4632        }
4633    }
4634
4635    /// <p>Deletes a specific version of a bot. To delete all versions of a bot, use the <a>DeleteBot</a> operation. </p> <p>This operation requires permissions for the <code>lex:DeleteBotVersion</code> action.</p>
4636    #[allow(unused_mut)]
4637    async fn delete_bot_version(
4638        &self,
4639        input: DeleteBotVersionRequest,
4640    ) -> Result<(), RusotoError<DeleteBotVersionError>> {
4641        let request_uri = format!(
4642            "/bots/{name}/versions/{version}",
4643            name = input.name,
4644            version = input.version
4645        );
4646
4647        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4648        request.set_content_type("application/x-amz-json-1.1".to_owned());
4649
4650        request.set_endpoint_prefix("models.lex".to_string());
4651
4652        let mut response = self
4653            .client
4654            .sign_and_dispatch(request)
4655            .await
4656            .map_err(RusotoError::from)?;
4657        if response.status.as_u16() == 204 {
4658            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4659            let result = ::std::mem::drop(response);
4660
4661            Ok(result)
4662        } else {
4663            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4664            Err(DeleteBotVersionError::from_response(response))
4665        }
4666    }
4667
4668    /// <p>Deletes all versions of the intent, including the <code>$LATEST</code> version. To delete a specific version of the intent, use the <a>DeleteIntentVersion</a> operation.</p> <p> You can delete a version of an intent only if it is not referenced. To delete an intent that is referred to in one or more bots (see <a>how-it-works</a>), you must remove those references first. </p> <note> <p> If you get the <code>ResourceInUseException</code> exception, it provides an example reference that shows where the intent is referenced. To remove the reference to the intent, either update the bot or delete it. If you get the same exception when you attempt to delete the intent again, repeat until the intent has no references and the call to <code>DeleteIntent</code> is successful. </p> </note> <p> This operation requires permission for the <code>lex:DeleteIntent</code> action. </p>
4669    #[allow(unused_mut)]
4670    async fn delete_intent(
4671        &self,
4672        input: DeleteIntentRequest,
4673    ) -> Result<(), RusotoError<DeleteIntentError>> {
4674        let request_uri = format!("/intents/{name}", name = input.name);
4675
4676        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4677        request.set_content_type("application/x-amz-json-1.1".to_owned());
4678
4679        request.set_endpoint_prefix("models.lex".to_string());
4680
4681        let mut response = self
4682            .client
4683            .sign_and_dispatch(request)
4684            .await
4685            .map_err(RusotoError::from)?;
4686        if response.status.as_u16() == 204 {
4687            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4688            let result = ::std::mem::drop(response);
4689
4690            Ok(result)
4691        } else {
4692            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4693            Err(DeleteIntentError::from_response(response))
4694        }
4695    }
4696
4697    /// <p>Deletes a specific version of an intent. To delete all versions of a intent, use the <a>DeleteIntent</a> operation. </p> <p>This operation requires permissions for the <code>lex:DeleteIntentVersion</code> action.</p>
4698    #[allow(unused_mut)]
4699    async fn delete_intent_version(
4700        &self,
4701        input: DeleteIntentVersionRequest,
4702    ) -> Result<(), RusotoError<DeleteIntentVersionError>> {
4703        let request_uri = format!(
4704            "/intents/{name}/versions/{version}",
4705            name = input.name,
4706            version = input.version
4707        );
4708
4709        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4710        request.set_content_type("application/x-amz-json-1.1".to_owned());
4711
4712        request.set_endpoint_prefix("models.lex".to_string());
4713
4714        let mut response = self
4715            .client
4716            .sign_and_dispatch(request)
4717            .await
4718            .map_err(RusotoError::from)?;
4719        if response.status.as_u16() == 204 {
4720            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4721            let result = ::std::mem::drop(response);
4722
4723            Ok(result)
4724        } else {
4725            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4726            Err(DeleteIntentVersionError::from_response(response))
4727        }
4728    }
4729
4730    /// <p>Deletes all versions of the slot type, including the <code>$LATEST</code> version. To delete a specific version of the slot type, use the <a>DeleteSlotTypeVersion</a> operation.</p> <p> You can delete a version of a slot type only if it is not referenced. To delete a slot type that is referred to in one or more intents, you must remove those references first. </p> <note> <p> If you get the <code>ResourceInUseException</code> exception, the exception provides an example reference that shows the intent where the slot type is referenced. To remove the reference to the slot type, either update the intent or delete it. If you get the same exception when you attempt to delete the slot type again, repeat until the slot type has no references and the <code>DeleteSlotType</code> call is successful. </p> </note> <p>This operation requires permission for the <code>lex:DeleteSlotType</code> action.</p>
4731    #[allow(unused_mut)]
4732    async fn delete_slot_type(
4733        &self,
4734        input: DeleteSlotTypeRequest,
4735    ) -> Result<(), RusotoError<DeleteSlotTypeError>> {
4736        let request_uri = format!("/slottypes/{name}", name = input.name);
4737
4738        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4739        request.set_content_type("application/x-amz-json-1.1".to_owned());
4740
4741        request.set_endpoint_prefix("models.lex".to_string());
4742
4743        let mut response = self
4744            .client
4745            .sign_and_dispatch(request)
4746            .await
4747            .map_err(RusotoError::from)?;
4748        if response.status.as_u16() == 204 {
4749            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4750            let result = ::std::mem::drop(response);
4751
4752            Ok(result)
4753        } else {
4754            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4755            Err(DeleteSlotTypeError::from_response(response))
4756        }
4757    }
4758
4759    /// <p>Deletes a specific version of a slot type. To delete all versions of a slot type, use the <a>DeleteSlotType</a> operation. </p> <p>This operation requires permissions for the <code>lex:DeleteSlotTypeVersion</code> action.</p>
4760    #[allow(unused_mut)]
4761    async fn delete_slot_type_version(
4762        &self,
4763        input: DeleteSlotTypeVersionRequest,
4764    ) -> Result<(), RusotoError<DeleteSlotTypeVersionError>> {
4765        let request_uri = format!(
4766            "/slottypes/{name}/version/{version}",
4767            name = input.name,
4768            version = input.version
4769        );
4770
4771        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4772        request.set_content_type("application/x-amz-json-1.1".to_owned());
4773
4774        request.set_endpoint_prefix("models.lex".to_string());
4775
4776        let mut response = self
4777            .client
4778            .sign_and_dispatch(request)
4779            .await
4780            .map_err(RusotoError::from)?;
4781        if response.status.as_u16() == 204 {
4782            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4783            let result = ::std::mem::drop(response);
4784
4785            Ok(result)
4786        } else {
4787            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4788            Err(DeleteSlotTypeVersionError::from_response(response))
4789        }
4790    }
4791
4792    /// <p>Deletes stored utterances.</p> <p>Amazon Lex stores the utterances that users send to your bot. Utterances are stored for 15 days for use with the <a>GetUtterancesView</a> operation, and then stored indefinitely for use in improving the ability of your bot to respond to user input.</p> <p>Use the <code>DeleteUtterances</code> operation to manually delete stored utterances for a specific user. When you use the <code>DeleteUtterances</code> operation, utterances stored for improving your bot's ability to respond to user input are deleted immediately. Utterances stored for use with the <code>GetUtterancesView</code> operation are deleted after 15 days.</p> <p>This operation requires permissions for the <code>lex:DeleteUtterances</code> action.</p>
4793    #[allow(unused_mut)]
4794    async fn delete_utterances(
4795        &self,
4796        input: DeleteUtterancesRequest,
4797    ) -> Result<(), RusotoError<DeleteUtterancesError>> {
4798        let request_uri = format!(
4799            "/bots/{bot_name}/utterances/{user_id}",
4800            bot_name = input.bot_name,
4801            user_id = input.user_id
4802        );
4803
4804        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
4805        request.set_content_type("application/x-amz-json-1.1".to_owned());
4806
4807        request.set_endpoint_prefix("models.lex".to_string());
4808
4809        let mut response = self
4810            .client
4811            .sign_and_dispatch(request)
4812            .await
4813            .map_err(RusotoError::from)?;
4814        if response.status.as_u16() == 204 {
4815            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4816            let result = ::std::mem::drop(response);
4817
4818            Ok(result)
4819        } else {
4820            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4821            Err(DeleteUtterancesError::from_response(response))
4822        }
4823    }
4824
4825    /// <p>Returns metadata information for a specific bot. You must provide the bot name and the bot version or alias. </p> <p> This operation requires permissions for the <code>lex:GetBot</code> action. </p>
4826    #[allow(unused_mut)]
4827    async fn get_bot(
4828        &self,
4829        input: GetBotRequest,
4830    ) -> Result<GetBotResponse, RusotoError<GetBotError>> {
4831        let request_uri = format!(
4832            "/bots/{name}/versions/{versionoralias}",
4833            name = input.name,
4834            versionoralias = input.version_or_alias
4835        );
4836
4837        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
4838        request.set_content_type("application/x-amz-json-1.1".to_owned());
4839
4840        request.set_endpoint_prefix("models.lex".to_string());
4841
4842        let mut response = self
4843            .client
4844            .sign_and_dispatch(request)
4845            .await
4846            .map_err(RusotoError::from)?;
4847        if response.status.as_u16() == 200 {
4848            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4849            let result =
4850                proto::json::ResponsePayload::new(&response).deserialize::<GetBotResponse, _>()?;
4851
4852            Ok(result)
4853        } else {
4854            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4855            Err(GetBotError::from_response(response))
4856        }
4857    }
4858
4859    /// <p>Returns information about an Amazon Lex bot alias. For more information about aliases, see <a>versioning-aliases</a>.</p> <p>This operation requires permissions for the <code>lex:GetBotAlias</code> action.</p>
4860    #[allow(unused_mut)]
4861    async fn get_bot_alias(
4862        &self,
4863        input: GetBotAliasRequest,
4864    ) -> Result<GetBotAliasResponse, RusotoError<GetBotAliasError>> {
4865        let request_uri = format!(
4866            "/bots/{bot_name}/aliases/{name}",
4867            bot_name = input.bot_name,
4868            name = input.name
4869        );
4870
4871        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
4872        request.set_content_type("application/x-amz-json-1.1".to_owned());
4873
4874        request.set_endpoint_prefix("models.lex".to_string());
4875
4876        let mut response = self
4877            .client
4878            .sign_and_dispatch(request)
4879            .await
4880            .map_err(RusotoError::from)?;
4881        if response.status.as_u16() == 200 {
4882            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4883            let result = proto::json::ResponsePayload::new(&response)
4884                .deserialize::<GetBotAliasResponse, _>()?;
4885
4886            Ok(result)
4887        } else {
4888            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4889            Err(GetBotAliasError::from_response(response))
4890        }
4891    }
4892
4893    /// <p>Returns a list of aliases for a specified Amazon Lex bot.</p> <p>This operation requires permissions for the <code>lex:GetBotAliases</code> action.</p>
4894    #[allow(unused_mut)]
4895    async fn get_bot_aliases(
4896        &self,
4897        input: GetBotAliasesRequest,
4898    ) -> Result<GetBotAliasesResponse, RusotoError<GetBotAliasesError>> {
4899        let request_uri = format!("/bots/{bot_name}/aliases/", bot_name = input.bot_name);
4900
4901        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
4902        request.set_content_type("application/x-amz-json-1.1".to_owned());
4903
4904        request.set_endpoint_prefix("models.lex".to_string());
4905
4906        let mut params = Params::new();
4907        if let Some(ref x) = input.max_results {
4908            params.put("maxResults", x);
4909        }
4910        if let Some(ref x) = input.name_contains {
4911            params.put("nameContains", x);
4912        }
4913        if let Some(ref x) = input.next_token {
4914            params.put("nextToken", x);
4915        }
4916        request.set_params(params);
4917
4918        let mut response = self
4919            .client
4920            .sign_and_dispatch(request)
4921            .await
4922            .map_err(RusotoError::from)?;
4923        if response.status.as_u16() == 200 {
4924            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4925            let result = proto::json::ResponsePayload::new(&response)
4926                .deserialize::<GetBotAliasesResponse, _>()?;
4927
4928            Ok(result)
4929        } else {
4930            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4931            Err(GetBotAliasesError::from_response(response))
4932        }
4933    }
4934
4935    /// <p>Returns information about the association between an Amazon Lex bot and a messaging platform.</p> <p>This operation requires permissions for the <code>lex:GetBotChannelAssociation</code> action.</p>
4936    #[allow(unused_mut)]
4937    async fn get_bot_channel_association(
4938        &self,
4939        input: GetBotChannelAssociationRequest,
4940    ) -> Result<GetBotChannelAssociationResponse, RusotoError<GetBotChannelAssociationError>> {
4941        let request_uri = format!(
4942            "/bots/{bot_name}/aliases/{alias_name}/channels/{name}",
4943            alias_name = input.bot_alias,
4944            bot_name = input.bot_name,
4945            name = input.name
4946        );
4947
4948        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
4949        request.set_content_type("application/x-amz-json-1.1".to_owned());
4950
4951        request.set_endpoint_prefix("models.lex".to_string());
4952
4953        let mut response = self
4954            .client
4955            .sign_and_dispatch(request)
4956            .await
4957            .map_err(RusotoError::from)?;
4958        if response.status.as_u16() == 200 {
4959            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4960            let result = proto::json::ResponsePayload::new(&response)
4961                .deserialize::<GetBotChannelAssociationResponse, _>()?;
4962
4963            Ok(result)
4964        } else {
4965            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4966            Err(GetBotChannelAssociationError::from_response(response))
4967        }
4968    }
4969
4970    /// <p> Returns a list of all of the channels associated with the specified bot. </p> <p>The <code>GetBotChannelAssociations</code> operation requires permissions for the <code>lex:GetBotChannelAssociations</code> action.</p>
4971    #[allow(unused_mut)]
4972    async fn get_bot_channel_associations(
4973        &self,
4974        input: GetBotChannelAssociationsRequest,
4975    ) -> Result<GetBotChannelAssociationsResponse, RusotoError<GetBotChannelAssociationsError>>
4976    {
4977        let request_uri = format!(
4978            "/bots/{bot_name}/aliases/{alias_name}/channels/",
4979            alias_name = input.bot_alias,
4980            bot_name = input.bot_name
4981        );
4982
4983        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
4984        request.set_content_type("application/x-amz-json-1.1".to_owned());
4985
4986        request.set_endpoint_prefix("models.lex".to_string());
4987
4988        let mut params = Params::new();
4989        if let Some(ref x) = input.max_results {
4990            params.put("maxResults", x);
4991        }
4992        if let Some(ref x) = input.name_contains {
4993            params.put("nameContains", x);
4994        }
4995        if let Some(ref x) = input.next_token {
4996            params.put("nextToken", x);
4997        }
4998        request.set_params(params);
4999
5000        let mut response = self
5001            .client
5002            .sign_and_dispatch(request)
5003            .await
5004            .map_err(RusotoError::from)?;
5005        if response.status.as_u16() == 200 {
5006            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5007            let result = proto::json::ResponsePayload::new(&response)
5008                .deserialize::<GetBotChannelAssociationsResponse, _>()?;
5009
5010            Ok(result)
5011        } else {
5012            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5013            Err(GetBotChannelAssociationsError::from_response(response))
5014        }
5015    }
5016
5017    /// <p>Gets information about all of the versions of a bot.</p> <p>The <code>GetBotVersions</code> operation returns a <code>BotMetadata</code> object for each version of a bot. For example, if a bot has three numbered versions, the <code>GetBotVersions</code> operation returns four <code>BotMetadata</code> objects in the response, one for each numbered version and one for the <code>$LATEST</code> version. </p> <p>The <code>GetBotVersions</code> operation always returns at least one version, the <code>$LATEST</code> version.</p> <p>This operation requires permissions for the <code>lex:GetBotVersions</code> action.</p>
5018    #[allow(unused_mut)]
5019    async fn get_bot_versions(
5020        &self,
5021        input: GetBotVersionsRequest,
5022    ) -> Result<GetBotVersionsResponse, RusotoError<GetBotVersionsError>> {
5023        let request_uri = format!("/bots/{name}/versions/", name = input.name);
5024
5025        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5026        request.set_content_type("application/x-amz-json-1.1".to_owned());
5027
5028        request.set_endpoint_prefix("models.lex".to_string());
5029
5030        let mut params = Params::new();
5031        if let Some(ref x) = input.max_results {
5032            params.put("maxResults", x);
5033        }
5034        if let Some(ref x) = input.next_token {
5035            params.put("nextToken", x);
5036        }
5037        request.set_params(params);
5038
5039        let mut response = self
5040            .client
5041            .sign_and_dispatch(request)
5042            .await
5043            .map_err(RusotoError::from)?;
5044        if response.status.as_u16() == 200 {
5045            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5046            let result = proto::json::ResponsePayload::new(&response)
5047                .deserialize::<GetBotVersionsResponse, _>()?;
5048
5049            Ok(result)
5050        } else {
5051            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5052            Err(GetBotVersionsError::from_response(response))
5053        }
5054    }
5055
5056    /// <p>Returns bot information as follows: </p> <ul> <li> <p>If you provide the <code>nameContains</code> field, the response includes information for the <code>$LATEST</code> version of all bots whose name contains the specified string.</p> </li> <li> <p>If you don't specify the <code>nameContains</code> field, the operation returns information about the <code>$LATEST</code> version of all of your bots.</p> </li> </ul> <p>This operation requires permission for the <code>lex:GetBots</code> action.</p>
5057    #[allow(unused_mut)]
5058    async fn get_bots(
5059        &self,
5060        input: GetBotsRequest,
5061    ) -> Result<GetBotsResponse, RusotoError<GetBotsError>> {
5062        let request_uri = "/bots/";
5063
5064        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5065        request.set_content_type("application/x-amz-json-1.1".to_owned());
5066
5067        request.set_endpoint_prefix("models.lex".to_string());
5068
5069        let mut params = Params::new();
5070        if let Some(ref x) = input.max_results {
5071            params.put("maxResults", x);
5072        }
5073        if let Some(ref x) = input.name_contains {
5074            params.put("nameContains", x);
5075        }
5076        if let Some(ref x) = input.next_token {
5077            params.put("nextToken", x);
5078        }
5079        request.set_params(params);
5080
5081        let mut response = self
5082            .client
5083            .sign_and_dispatch(request)
5084            .await
5085            .map_err(RusotoError::from)?;
5086        if response.status.as_u16() == 200 {
5087            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5088            let result =
5089                proto::json::ResponsePayload::new(&response).deserialize::<GetBotsResponse, _>()?;
5090
5091            Ok(result)
5092        } else {
5093            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5094            Err(GetBotsError::from_response(response))
5095        }
5096    }
5097
5098    /// <p>Returns information about a built-in intent.</p> <p>This operation requires permission for the <code>lex:GetBuiltinIntent</code> action.</p>
5099    #[allow(unused_mut)]
5100    async fn get_builtin_intent(
5101        &self,
5102        input: GetBuiltinIntentRequest,
5103    ) -> Result<GetBuiltinIntentResponse, RusotoError<GetBuiltinIntentError>> {
5104        let request_uri = format!("/builtins/intents/{signature}", signature = input.signature);
5105
5106        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5107        request.set_content_type("application/x-amz-json-1.1".to_owned());
5108
5109        request.set_endpoint_prefix("models.lex".to_string());
5110
5111        let mut response = self
5112            .client
5113            .sign_and_dispatch(request)
5114            .await
5115            .map_err(RusotoError::from)?;
5116        if response.status.as_u16() == 200 {
5117            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5118            let result = proto::json::ResponsePayload::new(&response)
5119                .deserialize::<GetBuiltinIntentResponse, _>()?;
5120
5121            Ok(result)
5122        } else {
5123            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5124            Err(GetBuiltinIntentError::from_response(response))
5125        }
5126    }
5127
5128    /// <p>Gets a list of built-in intents that meet the specified criteria.</p> <p>This operation requires permission for the <code>lex:GetBuiltinIntents</code> action.</p>
5129    #[allow(unused_mut)]
5130    async fn get_builtin_intents(
5131        &self,
5132        input: GetBuiltinIntentsRequest,
5133    ) -> Result<GetBuiltinIntentsResponse, RusotoError<GetBuiltinIntentsError>> {
5134        let request_uri = "/builtins/intents/";
5135
5136        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5137        request.set_content_type("application/x-amz-json-1.1".to_owned());
5138
5139        request.set_endpoint_prefix("models.lex".to_string());
5140
5141        let mut params = Params::new();
5142        if let Some(ref x) = input.locale {
5143            params.put("locale", x);
5144        }
5145        if let Some(ref x) = input.max_results {
5146            params.put("maxResults", x);
5147        }
5148        if let Some(ref x) = input.next_token {
5149            params.put("nextToken", x);
5150        }
5151        if let Some(ref x) = input.signature_contains {
5152            params.put("signatureContains", x);
5153        }
5154        request.set_params(params);
5155
5156        let mut response = self
5157            .client
5158            .sign_and_dispatch(request)
5159            .await
5160            .map_err(RusotoError::from)?;
5161        if response.status.as_u16() == 200 {
5162            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5163            let result = proto::json::ResponsePayload::new(&response)
5164                .deserialize::<GetBuiltinIntentsResponse, _>()?;
5165
5166            Ok(result)
5167        } else {
5168            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5169            Err(GetBuiltinIntentsError::from_response(response))
5170        }
5171    }
5172
5173    /// <p>Gets a list of built-in slot types that meet the specified criteria.</p> <p>For a list of built-in slot types, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference">Slot Type Reference</a> in the <i>Alexa Skills Kit</i>.</p> <p>This operation requires permission for the <code>lex:GetBuiltInSlotTypes</code> action.</p>
5174    #[allow(unused_mut)]
5175    async fn get_builtin_slot_types(
5176        &self,
5177        input: GetBuiltinSlotTypesRequest,
5178    ) -> Result<GetBuiltinSlotTypesResponse, RusotoError<GetBuiltinSlotTypesError>> {
5179        let request_uri = "/builtins/slottypes/";
5180
5181        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5182        request.set_content_type("application/x-amz-json-1.1".to_owned());
5183
5184        request.set_endpoint_prefix("models.lex".to_string());
5185
5186        let mut params = Params::new();
5187        if let Some(ref x) = input.locale {
5188            params.put("locale", x);
5189        }
5190        if let Some(ref x) = input.max_results {
5191            params.put("maxResults", x);
5192        }
5193        if let Some(ref x) = input.next_token {
5194            params.put("nextToken", x);
5195        }
5196        if let Some(ref x) = input.signature_contains {
5197            params.put("signatureContains", x);
5198        }
5199        request.set_params(params);
5200
5201        let mut response = self
5202            .client
5203            .sign_and_dispatch(request)
5204            .await
5205            .map_err(RusotoError::from)?;
5206        if response.status.as_u16() == 200 {
5207            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5208            let result = proto::json::ResponsePayload::new(&response)
5209                .deserialize::<GetBuiltinSlotTypesResponse, _>()?;
5210
5211            Ok(result)
5212        } else {
5213            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5214            Err(GetBuiltinSlotTypesError::from_response(response))
5215        }
5216    }
5217
5218    /// <p>Exports the contents of a Amazon Lex resource in a specified format. </p>
5219    #[allow(unused_mut)]
5220    async fn get_export(
5221        &self,
5222        input: GetExportRequest,
5223    ) -> Result<GetExportResponse, RusotoError<GetExportError>> {
5224        let request_uri = "/exports/";
5225
5226        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5227        request.set_content_type("application/x-amz-json-1.1".to_owned());
5228
5229        request.set_endpoint_prefix("models.lex".to_string());
5230
5231        let mut params = Params::new();
5232        params.put("exportType", &input.export_type);
5233        params.put("name", &input.name);
5234        params.put("resourceType", &input.resource_type);
5235        params.put("version", &input.version);
5236        request.set_params(params);
5237
5238        let mut response = self
5239            .client
5240            .sign_and_dispatch(request)
5241            .await
5242            .map_err(RusotoError::from)?;
5243        if response.status.as_u16() == 200 {
5244            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5245            let result = proto::json::ResponsePayload::new(&response)
5246                .deserialize::<GetExportResponse, _>()?;
5247
5248            Ok(result)
5249        } else {
5250            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5251            Err(GetExportError::from_response(response))
5252        }
5253    }
5254
5255    /// <p>Gets information about an import job started with the <code>StartImport</code> operation.</p>
5256    #[allow(unused_mut)]
5257    async fn get_import(
5258        &self,
5259        input: GetImportRequest,
5260    ) -> Result<GetImportResponse, RusotoError<GetImportError>> {
5261        let request_uri = format!("/imports/{import_id}", import_id = input.import_id);
5262
5263        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5264        request.set_content_type("application/x-amz-json-1.1".to_owned());
5265
5266        request.set_endpoint_prefix("models.lex".to_string());
5267
5268        let mut response = self
5269            .client
5270            .sign_and_dispatch(request)
5271            .await
5272            .map_err(RusotoError::from)?;
5273        if response.status.as_u16() == 200 {
5274            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5275            let result = proto::json::ResponsePayload::new(&response)
5276                .deserialize::<GetImportResponse, _>()?;
5277
5278            Ok(result)
5279        } else {
5280            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5281            Err(GetImportError::from_response(response))
5282        }
5283    }
5284
5285    /// <p> Returns information about an intent. In addition to the intent name, you must specify the intent version. </p> <p> This operation requires permissions to perform the <code>lex:GetIntent</code> action. </p>
5286    #[allow(unused_mut)]
5287    async fn get_intent(
5288        &self,
5289        input: GetIntentRequest,
5290    ) -> Result<GetIntentResponse, RusotoError<GetIntentError>> {
5291        let request_uri = format!(
5292            "/intents/{name}/versions/{version}",
5293            name = input.name,
5294            version = input.version
5295        );
5296
5297        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5298        request.set_content_type("application/x-amz-json-1.1".to_owned());
5299
5300        request.set_endpoint_prefix("models.lex".to_string());
5301
5302        let mut response = self
5303            .client
5304            .sign_and_dispatch(request)
5305            .await
5306            .map_err(RusotoError::from)?;
5307        if response.status.as_u16() == 200 {
5308            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5309            let result = proto::json::ResponsePayload::new(&response)
5310                .deserialize::<GetIntentResponse, _>()?;
5311
5312            Ok(result)
5313        } else {
5314            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5315            Err(GetIntentError::from_response(response))
5316        }
5317    }
5318
5319    /// <p>Gets information about all of the versions of an intent.</p> <p>The <code>GetIntentVersions</code> operation returns an <code>IntentMetadata</code> object for each version of an intent. For example, if an intent has three numbered versions, the <code>GetIntentVersions</code> operation returns four <code>IntentMetadata</code> objects in the response, one for each numbered version and one for the <code>$LATEST</code> version. </p> <p>The <code>GetIntentVersions</code> operation always returns at least one version, the <code>$LATEST</code> version.</p> <p>This operation requires permissions for the <code>lex:GetIntentVersions</code> action.</p>
5320    #[allow(unused_mut)]
5321    async fn get_intent_versions(
5322        &self,
5323        input: GetIntentVersionsRequest,
5324    ) -> Result<GetIntentVersionsResponse, RusotoError<GetIntentVersionsError>> {
5325        let request_uri = format!("/intents/{name}/versions/", name = input.name);
5326
5327        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5328        request.set_content_type("application/x-amz-json-1.1".to_owned());
5329
5330        request.set_endpoint_prefix("models.lex".to_string());
5331
5332        let mut params = Params::new();
5333        if let Some(ref x) = input.max_results {
5334            params.put("maxResults", x);
5335        }
5336        if let Some(ref x) = input.next_token {
5337            params.put("nextToken", x);
5338        }
5339        request.set_params(params);
5340
5341        let mut response = self
5342            .client
5343            .sign_and_dispatch(request)
5344            .await
5345            .map_err(RusotoError::from)?;
5346        if response.status.as_u16() == 200 {
5347            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5348            let result = proto::json::ResponsePayload::new(&response)
5349                .deserialize::<GetIntentVersionsResponse, _>()?;
5350
5351            Ok(result)
5352        } else {
5353            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5354            Err(GetIntentVersionsError::from_response(response))
5355        }
5356    }
5357
5358    /// <p>Returns intent information as follows: </p> <ul> <li> <p>If you specify the <code>nameContains</code> field, returns the <code>$LATEST</code> version of all intents that contain the specified string.</p> </li> <li> <p> If you don't specify the <code>nameContains</code> field, returns information about the <code>$LATEST</code> version of all intents. </p> </li> </ul> <p> The operation requires permission for the <code>lex:GetIntents</code> action. </p>
5359    #[allow(unused_mut)]
5360    async fn get_intents(
5361        &self,
5362        input: GetIntentsRequest,
5363    ) -> Result<GetIntentsResponse, RusotoError<GetIntentsError>> {
5364        let request_uri = "/intents/";
5365
5366        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5367        request.set_content_type("application/x-amz-json-1.1".to_owned());
5368
5369        request.set_endpoint_prefix("models.lex".to_string());
5370
5371        let mut params = Params::new();
5372        if let Some(ref x) = input.max_results {
5373            params.put("maxResults", x);
5374        }
5375        if let Some(ref x) = input.name_contains {
5376            params.put("nameContains", x);
5377        }
5378        if let Some(ref x) = input.next_token {
5379            params.put("nextToken", x);
5380        }
5381        request.set_params(params);
5382
5383        let mut response = self
5384            .client
5385            .sign_and_dispatch(request)
5386            .await
5387            .map_err(RusotoError::from)?;
5388        if response.status.as_u16() == 200 {
5389            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5390            let result = proto::json::ResponsePayload::new(&response)
5391                .deserialize::<GetIntentsResponse, _>()?;
5392
5393            Ok(result)
5394        } else {
5395            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5396            Err(GetIntentsError::from_response(response))
5397        }
5398    }
5399
5400    /// <p>Returns information about a specific version of a slot type. In addition to specifying the slot type name, you must specify the slot type version.</p> <p>This operation requires permissions for the <code>lex:GetSlotType</code> action.</p>
5401    #[allow(unused_mut)]
5402    async fn get_slot_type(
5403        &self,
5404        input: GetSlotTypeRequest,
5405    ) -> Result<GetSlotTypeResponse, RusotoError<GetSlotTypeError>> {
5406        let request_uri = format!(
5407            "/slottypes/{name}/versions/{version}",
5408            name = input.name,
5409            version = input.version
5410        );
5411
5412        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5413        request.set_content_type("application/x-amz-json-1.1".to_owned());
5414
5415        request.set_endpoint_prefix("models.lex".to_string());
5416
5417        let mut response = self
5418            .client
5419            .sign_and_dispatch(request)
5420            .await
5421            .map_err(RusotoError::from)?;
5422        if response.status.as_u16() == 200 {
5423            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5424            let result = proto::json::ResponsePayload::new(&response)
5425                .deserialize::<GetSlotTypeResponse, _>()?;
5426
5427            Ok(result)
5428        } else {
5429            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5430            Err(GetSlotTypeError::from_response(response))
5431        }
5432    }
5433
5434    /// <p>Gets information about all versions of a slot type.</p> <p>The <code>GetSlotTypeVersions</code> operation returns a <code>SlotTypeMetadata</code> object for each version of a slot type. For example, if a slot type has three numbered versions, the <code>GetSlotTypeVersions</code> operation returns four <code>SlotTypeMetadata</code> objects in the response, one for each numbered version and one for the <code>$LATEST</code> version. </p> <p>The <code>GetSlotTypeVersions</code> operation always returns at least one version, the <code>$LATEST</code> version.</p> <p>This operation requires permissions for the <code>lex:GetSlotTypeVersions</code> action.</p>
5435    #[allow(unused_mut)]
5436    async fn get_slot_type_versions(
5437        &self,
5438        input: GetSlotTypeVersionsRequest,
5439    ) -> Result<GetSlotTypeVersionsResponse, RusotoError<GetSlotTypeVersionsError>> {
5440        let request_uri = format!("/slottypes/{name}/versions/", name = input.name);
5441
5442        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5443        request.set_content_type("application/x-amz-json-1.1".to_owned());
5444
5445        request.set_endpoint_prefix("models.lex".to_string());
5446
5447        let mut params = Params::new();
5448        if let Some(ref x) = input.max_results {
5449            params.put("maxResults", x);
5450        }
5451        if let Some(ref x) = input.next_token {
5452            params.put("nextToken", x);
5453        }
5454        request.set_params(params);
5455
5456        let mut response = self
5457            .client
5458            .sign_and_dispatch(request)
5459            .await
5460            .map_err(RusotoError::from)?;
5461        if response.status.as_u16() == 200 {
5462            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5463            let result = proto::json::ResponsePayload::new(&response)
5464                .deserialize::<GetSlotTypeVersionsResponse, _>()?;
5465
5466            Ok(result)
5467        } else {
5468            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5469            Err(GetSlotTypeVersionsError::from_response(response))
5470        }
5471    }
5472
5473    /// <p>Returns slot type information as follows: </p> <ul> <li> <p>If you specify the <code>nameContains</code> field, returns the <code>$LATEST</code> version of all slot types that contain the specified string.</p> </li> <li> <p> If you don't specify the <code>nameContains</code> field, returns information about the <code>$LATEST</code> version of all slot types. </p> </li> </ul> <p> The operation requires permission for the <code>lex:GetSlotTypes</code> action. </p>
5474    #[allow(unused_mut)]
5475    async fn get_slot_types(
5476        &self,
5477        input: GetSlotTypesRequest,
5478    ) -> Result<GetSlotTypesResponse, RusotoError<GetSlotTypesError>> {
5479        let request_uri = "/slottypes/";
5480
5481        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5482        request.set_content_type("application/x-amz-json-1.1".to_owned());
5483
5484        request.set_endpoint_prefix("models.lex".to_string());
5485
5486        let mut params = Params::new();
5487        if let Some(ref x) = input.max_results {
5488            params.put("maxResults", x);
5489        }
5490        if let Some(ref x) = input.name_contains {
5491            params.put("nameContains", x);
5492        }
5493        if let Some(ref x) = input.next_token {
5494            params.put("nextToken", x);
5495        }
5496        request.set_params(params);
5497
5498        let mut response = self
5499            .client
5500            .sign_and_dispatch(request)
5501            .await
5502            .map_err(RusotoError::from)?;
5503        if response.status.as_u16() == 200 {
5504            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5505            let result = proto::json::ResponsePayload::new(&response)
5506                .deserialize::<GetSlotTypesResponse, _>()?;
5507
5508            Ok(result)
5509        } else {
5510            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5511            Err(GetSlotTypesError::from_response(response))
5512        }
5513    }
5514
5515    /// <p>Use the <code>GetUtterancesView</code> operation to get information about the utterances that your users have made to your bot. You can use this list to tune the utterances that your bot responds to.</p> <p>For example, say that you have created a bot to order flowers. After your users have used your bot for a while, use the <code>GetUtterancesView</code> operation to see the requests that they have made and whether they have been successful. You might find that the utterance "I want flowers" is not being recognized. You could add this utterance to the <code>OrderFlowers</code> intent so that your bot recognizes that utterance.</p> <p>After you publish a new version of a bot, you can get information about the old version and the new so that you can compare the performance across the two versions. </p> <p>Utterance statistics are generated once a day. Data is available for the last 15 days. You can request information for up to 5 versions of your bot in each request. Amazon Lex returns the most frequent utterances received by the bot in the last 15 days. The response contains information about a maximum of 100 utterances for each version.</p> <p>If you set <code>childDirected</code> field to true when you created your bot, or if you opted out of participating in improving Amazon Lex, utterances are not available.</p> <p>This operation requires permissions for the <code>lex:GetUtterancesView</code> action.</p>
5516    #[allow(unused_mut)]
5517    async fn get_utterances_view(
5518        &self,
5519        input: GetUtterancesViewRequest,
5520    ) -> Result<GetUtterancesViewResponse, RusotoError<GetUtterancesViewError>> {
5521        let request_uri = format!("/bots/{botname}/utterances", botname = input.bot_name);
5522
5523        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5524        request.set_content_type("application/x-amz-json-1.1".to_owned());
5525
5526        request.set_endpoint_prefix("models.lex".to_string());
5527
5528        let mut params = Params::new();
5529        for item in input.bot_versions.iter() {
5530            params.put("bot_versions", item);
5531        }
5532        params.put("status_type", &input.status_type);
5533        params.put("view", "aggregation");
5534        request.set_params(params);
5535
5536        let mut response = self
5537            .client
5538            .sign_and_dispatch(request)
5539            .await
5540            .map_err(RusotoError::from)?;
5541        if response.status.as_u16() == 200 {
5542            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5543            let result = proto::json::ResponsePayload::new(&response)
5544                .deserialize::<GetUtterancesViewResponse, _>()?;
5545
5546            Ok(result)
5547        } else {
5548            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5549            Err(GetUtterancesViewError::from_response(response))
5550        }
5551    }
5552
5553    /// <p>Gets a list of tags associated with the specified resource. Only bots, bot aliases, and bot channels can have tags associated with them.</p>
5554    #[allow(unused_mut)]
5555    async fn list_tags_for_resource(
5556        &self,
5557        input: ListTagsForResourceRequest,
5558    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
5559        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
5560
5561        let mut request = SignedRequest::new("GET", "lex", &self.region, &request_uri);
5562        request.set_content_type("application/x-amz-json-1.1".to_owned());
5563
5564        request.set_endpoint_prefix("models.lex".to_string());
5565
5566        let mut response = self
5567            .client
5568            .sign_and_dispatch(request)
5569            .await
5570            .map_err(RusotoError::from)?;
5571        if response.status.as_u16() == 200 {
5572            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5573            let result = proto::json::ResponsePayload::new(&response)
5574                .deserialize::<ListTagsForResourceResponse, _>()?;
5575
5576            Ok(result)
5577        } else {
5578            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5579            Err(ListTagsForResourceError::from_response(response))
5580        }
5581    }
5582
5583    /// <p>Creates an Amazon Lex conversational bot or replaces an existing bot. When you create or update a bot you are only required to specify a name, a locale, and whether the bot is directed toward children under age 13. You can use this to add intents later, or to remove intents from an existing bot. When you create a bot with the minimum information, the bot is created or updated but Amazon Lex returns the <code/> response <code>FAILED</code>. You can build the bot after you add one or more intents. For more information about Amazon Lex bots, see <a>how-it-works</a>. </p> <p>If you specify the name of an existing bot, the fields in the request replace the existing values in the <code>$LATEST</code> version of the bot. Amazon Lex removes any fields that you don't provide values for in the request, except for the <code>idleTTLInSeconds</code> and <code>privacySettings</code> fields, which are set to their default values. If you don't specify values for required fields, Amazon Lex throws an exception.</p> <p>This operation requires permissions for the <code>lex:PutBot</code> action. For more information, see <a>security-iam</a>.</p>
5584    #[allow(unused_mut)]
5585    async fn put_bot(
5586        &self,
5587        input: PutBotRequest,
5588    ) -> Result<PutBotResponse, RusotoError<PutBotError>> {
5589        let request_uri = format!("/bots/{name}/versions/$LATEST", name = input.name);
5590
5591        let mut request = SignedRequest::new("PUT", "lex", &self.region, &request_uri);
5592        request.set_content_type("application/x-amz-json-1.1".to_owned());
5593
5594        request.set_endpoint_prefix("models.lex".to_string());
5595        let encoded = Some(serde_json::to_vec(&input).unwrap());
5596        request.set_payload(encoded);
5597
5598        let mut response = self
5599            .client
5600            .sign_and_dispatch(request)
5601            .await
5602            .map_err(RusotoError::from)?;
5603        if response.status.as_u16() == 200 {
5604            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5605            let result =
5606                proto::json::ResponsePayload::new(&response).deserialize::<PutBotResponse, _>()?;
5607
5608            Ok(result)
5609        } else {
5610            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5611            Err(PutBotError::from_response(response))
5612        }
5613    }
5614
5615    /// <p>Creates an alias for the specified version of the bot or replaces an alias for the specified bot. To change the version of the bot that the alias points to, replace the alias. For more information about aliases, see <a>versioning-aliases</a>.</p> <p>This operation requires permissions for the <code>lex:PutBotAlias</code> action. </p>
5616    #[allow(unused_mut)]
5617    async fn put_bot_alias(
5618        &self,
5619        input: PutBotAliasRequest,
5620    ) -> Result<PutBotAliasResponse, RusotoError<PutBotAliasError>> {
5621        let request_uri = format!(
5622            "/bots/{bot_name}/aliases/{name}",
5623            bot_name = input.bot_name,
5624            name = input.name
5625        );
5626
5627        let mut request = SignedRequest::new("PUT", "lex", &self.region, &request_uri);
5628        request.set_content_type("application/x-amz-json-1.1".to_owned());
5629
5630        request.set_endpoint_prefix("models.lex".to_string());
5631        let encoded = Some(serde_json::to_vec(&input).unwrap());
5632        request.set_payload(encoded);
5633
5634        let mut response = self
5635            .client
5636            .sign_and_dispatch(request)
5637            .await
5638            .map_err(RusotoError::from)?;
5639        if response.status.as_u16() == 200 {
5640            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5641            let result = proto::json::ResponsePayload::new(&response)
5642                .deserialize::<PutBotAliasResponse, _>()?;
5643
5644            Ok(result)
5645        } else {
5646            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5647            Err(PutBotAliasError::from_response(response))
5648        }
5649    }
5650
5651    /// <p>Creates an intent or replaces an existing intent.</p> <p>To define the interaction between the user and your bot, you use one or more intents. For a pizza ordering bot, for example, you would create an <code>OrderPizza</code> intent. </p> <p>To create an intent or replace an existing intent, you must provide the following:</p> <ul> <li> <p>Intent name. For example, <code>OrderPizza</code>.</p> </li> <li> <p>Sample utterances. For example, "Can I order a pizza, please." and "I want to order a pizza."</p> </li> <li> <p>Information to be gathered. You specify slot types for the information that your bot will request from the user. You can specify standard slot types, such as a date or a time, or custom slot types such as the size and crust of a pizza.</p> </li> <li> <p>How the intent will be fulfilled. You can provide a Lambda function or configure the intent to return the intent information to the client application. If you use a Lambda function, when all of the intent information is available, Amazon Lex invokes your Lambda function. If you configure your intent to return the intent information to the client application. </p> </li> </ul> <p>You can specify other optional information in the request, such as:</p> <ul> <li> <p>A confirmation prompt to ask the user to confirm an intent. For example, "Shall I order your pizza?"</p> </li> <li> <p>A conclusion statement to send to the user after the intent has been fulfilled. For example, "I placed your pizza order."</p> </li> <li> <p>A follow-up prompt that asks the user for additional activity. For example, asking "Do you want to order a drink with your pizza?"</p> </li> </ul> <p>If you specify an existing intent name to update the intent, Amazon Lex replaces the values in the <code>$LATEST</code> version of the intent with the values in the request. Amazon Lex removes fields that you don't provide in the request. If you don't specify the required fields, Amazon Lex throws an exception. When you update the <code>$LATEST</code> version of an intent, the <code>status</code> field of any bot that uses the <code>$LATEST</code> version of the intent is set to <code>NOT_BUILT</code>.</p> <p>For more information, see <a>how-it-works</a>.</p> <p>This operation requires permissions for the <code>lex:PutIntent</code> action.</p>
5652    #[allow(unused_mut)]
5653    async fn put_intent(
5654        &self,
5655        input: PutIntentRequest,
5656    ) -> Result<PutIntentResponse, RusotoError<PutIntentError>> {
5657        let request_uri = format!("/intents/{name}/versions/$LATEST", name = input.name);
5658
5659        let mut request = SignedRequest::new("PUT", "lex", &self.region, &request_uri);
5660        request.set_content_type("application/x-amz-json-1.1".to_owned());
5661
5662        request.set_endpoint_prefix("models.lex".to_string());
5663        let encoded = Some(serde_json::to_vec(&input).unwrap());
5664        request.set_payload(encoded);
5665
5666        let mut response = self
5667            .client
5668            .sign_and_dispatch(request)
5669            .await
5670            .map_err(RusotoError::from)?;
5671        if response.status.as_u16() == 200 {
5672            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5673            let result = proto::json::ResponsePayload::new(&response)
5674                .deserialize::<PutIntentResponse, _>()?;
5675
5676            Ok(result)
5677        } else {
5678            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5679            Err(PutIntentError::from_response(response))
5680        }
5681    }
5682
5683    /// <p>Creates a custom slot type or replaces an existing custom slot type.</p> <p>To create a custom slot type, specify a name for the slot type and a set of enumeration values, which are the values that a slot of this type can assume. For more information, see <a>how-it-works</a>.</p> <p>If you specify the name of an existing slot type, the fields in the request replace the existing values in the <code>$LATEST</code> version of the slot type. Amazon Lex removes the fields that you don't provide in the request. If you don't specify required fields, Amazon Lex throws an exception. When you update the <code>$LATEST</code> version of a slot type, if a bot uses the <code>$LATEST</code> version of an intent that contains the slot type, the bot's <code>status</code> field is set to <code>NOT_BUILT</code>.</p> <p>This operation requires permissions for the <code>lex:PutSlotType</code> action.</p>
5684    #[allow(unused_mut)]
5685    async fn put_slot_type(
5686        &self,
5687        input: PutSlotTypeRequest,
5688    ) -> Result<PutSlotTypeResponse, RusotoError<PutSlotTypeError>> {
5689        let request_uri = format!("/slottypes/{name}/versions/$LATEST", name = input.name);
5690
5691        let mut request = SignedRequest::new("PUT", "lex", &self.region, &request_uri);
5692        request.set_content_type("application/x-amz-json-1.1".to_owned());
5693
5694        request.set_endpoint_prefix("models.lex".to_string());
5695        let encoded = Some(serde_json::to_vec(&input).unwrap());
5696        request.set_payload(encoded);
5697
5698        let mut response = self
5699            .client
5700            .sign_and_dispatch(request)
5701            .await
5702            .map_err(RusotoError::from)?;
5703        if response.status.as_u16() == 200 {
5704            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5705            let result = proto::json::ResponsePayload::new(&response)
5706                .deserialize::<PutSlotTypeResponse, _>()?;
5707
5708            Ok(result)
5709        } else {
5710            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5711            Err(PutSlotTypeError::from_response(response))
5712        }
5713    }
5714
5715    /// <p>Starts a job to import a resource to Amazon Lex.</p>
5716    #[allow(unused_mut)]
5717    async fn start_import(
5718        &self,
5719        input: StartImportRequest,
5720    ) -> Result<StartImportResponse, RusotoError<StartImportError>> {
5721        let request_uri = "/imports/";
5722
5723        let mut request = SignedRequest::new("POST", "lex", &self.region, &request_uri);
5724        request.set_content_type("application/x-amz-json-1.1".to_owned());
5725
5726        request.set_endpoint_prefix("models.lex".to_string());
5727        let encoded = Some(serde_json::to_vec(&input).unwrap());
5728        request.set_payload(encoded);
5729
5730        let mut response = self
5731            .client
5732            .sign_and_dispatch(request)
5733            .await
5734            .map_err(RusotoError::from)?;
5735        if response.status.as_u16() == 201 {
5736            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5737            let result = proto::json::ResponsePayload::new(&response)
5738                .deserialize::<StartImportResponse, _>()?;
5739
5740            Ok(result)
5741        } else {
5742            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5743            Err(StartImportError::from_response(response))
5744        }
5745    }
5746
5747    /// <p>Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced with the new value.</p>
5748    #[allow(unused_mut)]
5749    async fn tag_resource(
5750        &self,
5751        input: TagResourceRequest,
5752    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
5753        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
5754
5755        let mut request = SignedRequest::new("POST", "lex", &self.region, &request_uri);
5756        request.set_content_type("application/x-amz-json-1.1".to_owned());
5757
5758        request.set_endpoint_prefix("models.lex".to_string());
5759        let encoded = Some(serde_json::to_vec(&input).unwrap());
5760        request.set_payload(encoded);
5761
5762        let mut response = self
5763            .client
5764            .sign_and_dispatch(request)
5765            .await
5766            .map_err(RusotoError::from)?;
5767        if response.status.as_u16() == 204 {
5768            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5769            let result = proto::json::ResponsePayload::new(&response)
5770                .deserialize::<TagResourceResponse, _>()?;
5771
5772            Ok(result)
5773        } else {
5774            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5775            Err(TagResourceError::from_response(response))
5776        }
5777    }
5778
5779    /// <p>Removes tags from a bot, bot alias or bot channel.</p>
5780    #[allow(unused_mut)]
5781    async fn untag_resource(
5782        &self,
5783        input: UntagResourceRequest,
5784    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
5785        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
5786
5787        let mut request = SignedRequest::new("DELETE", "lex", &self.region, &request_uri);
5788        request.set_content_type("application/x-amz-json-1.1".to_owned());
5789
5790        request.set_endpoint_prefix("models.lex".to_string());
5791
5792        let mut params = Params::new();
5793        for item in input.tag_keys.iter() {
5794            params.put("tagKeys", item);
5795        }
5796        request.set_params(params);
5797
5798        let mut response = self
5799            .client
5800            .sign_and_dispatch(request)
5801            .await
5802            .map_err(RusotoError::from)?;
5803        if response.status.as_u16() == 204 {
5804            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5805            let result = proto::json::ResponsePayload::new(&response)
5806                .deserialize::<UntagResourceResponse, _>()?;
5807
5808            Ok(result)
5809        } else {
5810            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5811            Err(UntagResourceError::from_response(response))
5812        }
5813    }
5814}