aws_sdk_lexmodelbuilding/operation/put_bot/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::put_bot::_put_bot_output::PutBotOutputBuilder;
3
4pub use crate::operation::put_bot::_put_bot_input::PutBotInputBuilder;
5
6impl crate::operation::put_bot::builders::PutBotInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::put_bot::PutBotOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::put_bot::PutBotError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.put_bot();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `PutBot`.
24///
25/// <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></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 <code>how-it-works</code>.</p>
26/// <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>
27/// <p>This operation requires permissions for the <code>lex:PutBot</code> action. For more information, see <code>security-iam</code>.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct PutBotFluentBuilder {
30 handle: ::std::sync::Arc<crate::client::Handle>,
31 inner: crate::operation::put_bot::builders::PutBotInputBuilder,
32 config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl crate::client::customize::internal::CustomizableSend<crate::operation::put_bot::PutBotOutput, crate::operation::put_bot::PutBotError>
35 for PutBotFluentBuilder
36{
37 fn send(
38 self,
39 config_override: crate::config::Builder,
40 ) -> crate::client::customize::internal::BoxFuture<
41 crate::client::customize::internal::SendResult<crate::operation::put_bot::PutBotOutput, crate::operation::put_bot::PutBotError>,
42 > {
43 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
44 }
45}
46impl PutBotFluentBuilder {
47 /// Creates a new `PutBotFluentBuilder`.
48 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
49 Self {
50 handle,
51 inner: ::std::default::Default::default(),
52 config_override: ::std::option::Option::None,
53 }
54 }
55 /// Access the PutBot as a reference.
56 pub fn as_input(&self) -> &crate::operation::put_bot::builders::PutBotInputBuilder {
57 &self.inner
58 }
59 /// Sends the request and returns the response.
60 ///
61 /// If an error occurs, an `SdkError` will be returned with additional details that
62 /// can be matched against.
63 ///
64 /// By default, any retryable failures will be retried twice. Retry behavior
65 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
66 /// set when configuring the client.
67 pub async fn send(
68 self,
69 ) -> ::std::result::Result<
70 crate::operation::put_bot::PutBotOutput,
71 ::aws_smithy_runtime_api::client::result::SdkError<
72 crate::operation::put_bot::PutBotError,
73 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
74 >,
75 > {
76 let input = self
77 .inner
78 .build()
79 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
80 let runtime_plugins = crate::operation::put_bot::PutBot::operation_runtime_plugins(
81 self.handle.runtime_plugins.clone(),
82 &self.handle.conf,
83 self.config_override,
84 );
85 crate::operation::put_bot::PutBot::orchestrate(&runtime_plugins, input).await
86 }
87
88 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
89 pub fn customize(
90 self,
91 ) -> crate::client::customize::CustomizableOperation<crate::operation::put_bot::PutBotOutput, crate::operation::put_bot::PutBotError, Self> {
92 crate::client::customize::CustomizableOperation::new(self)
93 }
94 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
95 self.set_config_override(::std::option::Option::Some(config_override.into()));
96 self
97 }
98
99 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
100 self.config_override = config_override;
101 self
102 }
103 /// <p>The name of the bot. The name is <i>not</i> case sensitive.</p>
104 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.inner = self.inner.name(input.into());
106 self
107 }
108 /// <p>The name of the bot. The name is <i>not</i> case sensitive.</p>
109 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.inner = self.inner.set_name(input);
111 self
112 }
113 /// <p>The name of the bot. The name is <i>not</i> case sensitive.</p>
114 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
115 self.inner.get_name()
116 }
117 /// <p>A description of the bot.</p>
118 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.description(input.into());
120 self
121 }
122 /// <p>A description of the bot.</p>
123 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_description(input);
125 self
126 }
127 /// <p>A description of the bot.</p>
128 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
129 self.inner.get_description()
130 }
131 ///
132 /// Appends an item to `intents`.
133 ///
134 /// To override the contents of this collection use [`set_intents`](Self::set_intents).
135 ///
136 /// <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 <code>how-it-works</code>.</p>
137 pub fn intents(mut self, input: crate::types::Intent) -> Self {
138 self.inner = self.inner.intents(input);
139 self
140 }
141 /// <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 <code>how-it-works</code>.</p>
142 pub fn set_intents(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Intent>>) -> Self {
143 self.inner = self.inner.set_intents(input);
144 self
145 }
146 /// <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 <code>how-it-works</code>.</p>
147 pub fn get_intents(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Intent>> {
148 self.inner.get_intents()
149 }
150 /// <p>Set to <code>true</code> to enable access to natural language understanding improvements.</p>
151 /// <p>When you set the <code>enableModelImprovements</code> parameter to <code>true</code> you can use the <code>nluIntentConfidenceThreshold</code> parameter to configure confidence scores. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html">Confidence Scores</a>.</p>
152 /// <p>You can only set the <code>enableModelImprovements</code> parameter in certain Regions. If you set the parameter to <code>true</code>, your bot has access to accuracy improvements.</p>
153 /// <p>The Regions where you can set the <code>enableModelImprovements</code> parameter to <code>true</code> are:</p>
154 /// <ul>
155 /// <li>
156 /// <p>US East (N. Virginia) (us-east-1)</p></li>
157 /// <li>
158 /// <p>US West (Oregon) (us-west-2)</p></li>
159 /// <li>
160 /// <p>Asia Pacific (Sydney) (ap-southeast-2)</p></li>
161 /// <li>
162 /// <p>EU (Ireland) (eu-west-1)</p></li>
163 /// </ul>
164 /// <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default. In these Regions setting the parameter to <code>false</code> throws a <code>ValidationException</code> exception.</p>
165 pub fn enable_model_improvements(mut self, input: bool) -> Self {
166 self.inner = self.inner.enable_model_improvements(input);
167 self
168 }
169 /// <p>Set to <code>true</code> to enable access to natural language understanding improvements.</p>
170 /// <p>When you set the <code>enableModelImprovements</code> parameter to <code>true</code> you can use the <code>nluIntentConfidenceThreshold</code> parameter to configure confidence scores. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html">Confidence Scores</a>.</p>
171 /// <p>You can only set the <code>enableModelImprovements</code> parameter in certain Regions. If you set the parameter to <code>true</code>, your bot has access to accuracy improvements.</p>
172 /// <p>The Regions where you can set the <code>enableModelImprovements</code> parameter to <code>true</code> are:</p>
173 /// <ul>
174 /// <li>
175 /// <p>US East (N. Virginia) (us-east-1)</p></li>
176 /// <li>
177 /// <p>US West (Oregon) (us-west-2)</p></li>
178 /// <li>
179 /// <p>Asia Pacific (Sydney) (ap-southeast-2)</p></li>
180 /// <li>
181 /// <p>EU (Ireland) (eu-west-1)</p></li>
182 /// </ul>
183 /// <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default. In these Regions setting the parameter to <code>false</code> throws a <code>ValidationException</code> exception.</p>
184 pub fn set_enable_model_improvements(mut self, input: ::std::option::Option<bool>) -> Self {
185 self.inner = self.inner.set_enable_model_improvements(input);
186 self
187 }
188 /// <p>Set to <code>true</code> to enable access to natural language understanding improvements.</p>
189 /// <p>When you set the <code>enableModelImprovements</code> parameter to <code>true</code> you can use the <code>nluIntentConfidenceThreshold</code> parameter to configure confidence scores. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html">Confidence Scores</a>.</p>
190 /// <p>You can only set the <code>enableModelImprovements</code> parameter in certain Regions. If you set the parameter to <code>true</code>, your bot has access to accuracy improvements.</p>
191 /// <p>The Regions where you can set the <code>enableModelImprovements</code> parameter to <code>true</code> are:</p>
192 /// <ul>
193 /// <li>
194 /// <p>US East (N. Virginia) (us-east-1)</p></li>
195 /// <li>
196 /// <p>US West (Oregon) (us-west-2)</p></li>
197 /// <li>
198 /// <p>Asia Pacific (Sydney) (ap-southeast-2)</p></li>
199 /// <li>
200 /// <p>EU (Ireland) (eu-west-1)</p></li>
201 /// </ul>
202 /// <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default. In these Regions setting the parameter to <code>false</code> throws a <code>ValidationException</code> exception.</p>
203 pub fn get_enable_model_improvements(&self) -> &::std::option::Option<bool> {
204 self.inner.get_enable_model_improvements()
205 }
206 /// <p>Determines the threshold where Amazon Lex will insert the <code>AMAZON.FallbackIntent</code>, <code>AMAZON.KendraSearchIntent</code>, or both when returning alternative intents in a <a href="https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html">PostContent</a> or <a href="https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html">PostText</a> response. <code>AMAZON.FallbackIntent</code> and <code>AMAZON.KendraSearchIntent</code> are only inserted if they are configured for the bot.</p>
207 /// <p>You must set the <code>enableModelImprovements</code> parameter to <code>true</code> to use confidence scores in the following regions.</p>
208 /// <ul>
209 /// <li>
210 /// <p>US East (N. Virginia) (us-east-1)</p></li>
211 /// <li>
212 /// <p>US West (Oregon) (us-west-2)</p></li>
213 /// <li>
214 /// <p>Asia Pacific (Sydney) (ap-southeast-2)</p></li>
215 /// <li>
216 /// <p>EU (Ireland) (eu-west-1)</p></li>
217 /// </ul>
218 /// <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default.</p>
219 /// <p>For example, suppose a bot is configured with the confidence threshold of 0.80 and the <code>AMAZON.FallbackIntent</code>. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the <code>PostText</code> operation would be:</p>
220 /// <ul>
221 /// <li>
222 /// <p>AMAZON.FallbackIntent</p></li>
223 /// <li>
224 /// <p>IntentA</p></li>
225 /// <li>
226 /// <p>IntentB</p></li>
227 /// <li>
228 /// <p>IntentC</p></li>
229 /// </ul>
230 pub fn nlu_intent_confidence_threshold(mut self, input: f64) -> Self {
231 self.inner = self.inner.nlu_intent_confidence_threshold(input);
232 self
233 }
234 /// <p>Determines the threshold where Amazon Lex will insert the <code>AMAZON.FallbackIntent</code>, <code>AMAZON.KendraSearchIntent</code>, or both when returning alternative intents in a <a href="https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html">PostContent</a> or <a href="https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html">PostText</a> response. <code>AMAZON.FallbackIntent</code> and <code>AMAZON.KendraSearchIntent</code> are only inserted if they are configured for the bot.</p>
235 /// <p>You must set the <code>enableModelImprovements</code> parameter to <code>true</code> to use confidence scores in the following regions.</p>
236 /// <ul>
237 /// <li>
238 /// <p>US East (N. Virginia) (us-east-1)</p></li>
239 /// <li>
240 /// <p>US West (Oregon) (us-west-2)</p></li>
241 /// <li>
242 /// <p>Asia Pacific (Sydney) (ap-southeast-2)</p></li>
243 /// <li>
244 /// <p>EU (Ireland) (eu-west-1)</p></li>
245 /// </ul>
246 /// <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default.</p>
247 /// <p>For example, suppose a bot is configured with the confidence threshold of 0.80 and the <code>AMAZON.FallbackIntent</code>. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the <code>PostText</code> operation would be:</p>
248 /// <ul>
249 /// <li>
250 /// <p>AMAZON.FallbackIntent</p></li>
251 /// <li>
252 /// <p>IntentA</p></li>
253 /// <li>
254 /// <p>IntentB</p></li>
255 /// <li>
256 /// <p>IntentC</p></li>
257 /// </ul>
258 pub fn set_nlu_intent_confidence_threshold(mut self, input: ::std::option::Option<f64>) -> Self {
259 self.inner = self.inner.set_nlu_intent_confidence_threshold(input);
260 self
261 }
262 /// <p>Determines the threshold where Amazon Lex will insert the <code>AMAZON.FallbackIntent</code>, <code>AMAZON.KendraSearchIntent</code>, or both when returning alternative intents in a <a href="https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html">PostContent</a> or <a href="https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html">PostText</a> response. <code>AMAZON.FallbackIntent</code> and <code>AMAZON.KendraSearchIntent</code> are only inserted if they are configured for the bot.</p>
263 /// <p>You must set the <code>enableModelImprovements</code> parameter to <code>true</code> to use confidence scores in the following regions.</p>
264 /// <ul>
265 /// <li>
266 /// <p>US East (N. Virginia) (us-east-1)</p></li>
267 /// <li>
268 /// <p>US West (Oregon) (us-west-2)</p></li>
269 /// <li>
270 /// <p>Asia Pacific (Sydney) (ap-southeast-2)</p></li>
271 /// <li>
272 /// <p>EU (Ireland) (eu-west-1)</p></li>
273 /// </ul>
274 /// <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default.</p>
275 /// <p>For example, suppose a bot is configured with the confidence threshold of 0.80 and the <code>AMAZON.FallbackIntent</code>. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the <code>PostText</code> operation would be:</p>
276 /// <ul>
277 /// <li>
278 /// <p>AMAZON.FallbackIntent</p></li>
279 /// <li>
280 /// <p>IntentA</p></li>
281 /// <li>
282 /// <p>IntentB</p></li>
283 /// <li>
284 /// <p>IntentC</p></li>
285 /// </ul>
286 pub fn get_nlu_intent_confidence_threshold(&self) -> &::std::option::Option<f64> {
287 self.inner.get_nlu_intent_confidence_threshold()
288 }
289 /// <p>When Amazon Lex doesn't understand the user'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't understand, it sends the message in the <code>abortStatement</code> field.</p>
290 /// <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: "What would you like to do? You can say 'Order a pizza' or 'Order a drink.'"</p>
291 /// <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>
292 /// <p>If you don't define a clarification prompt, at runtime Amazon Lex will return a 400 Bad Request exception in three cases:</p>
293 /// <ul>
294 /// <li>
295 /// <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 "Would you like anything else today?" the user says "Yes." 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>
296 /// <li>
297 /// <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>
298 /// <li>
299 /// <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>
300 /// </ul>
301 pub fn clarification_prompt(mut self, input: crate::types::Prompt) -> Self {
302 self.inner = self.inner.clarification_prompt(input);
303 self
304 }
305 /// <p>When Amazon Lex doesn't understand the user'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't understand, it sends the message in the <code>abortStatement</code> field.</p>
306 /// <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: "What would you like to do? You can say 'Order a pizza' or 'Order a drink.'"</p>
307 /// <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>
308 /// <p>If you don't define a clarification prompt, at runtime Amazon Lex will return a 400 Bad Request exception in three cases:</p>
309 /// <ul>
310 /// <li>
311 /// <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 "Would you like anything else today?" the user says "Yes." 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>
312 /// <li>
313 /// <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>
314 /// <li>
315 /// <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>
316 /// </ul>
317 pub fn set_clarification_prompt(mut self, input: ::std::option::Option<crate::types::Prompt>) -> Self {
318 self.inner = self.inner.set_clarification_prompt(input);
319 self
320 }
321 /// <p>When Amazon Lex doesn't understand the user'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't understand, it sends the message in the <code>abortStatement</code> field.</p>
322 /// <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: "What would you like to do? You can say 'Order a pizza' or 'Order a drink.'"</p>
323 /// <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>
324 /// <p>If you don't define a clarification prompt, at runtime Amazon Lex will return a 400 Bad Request exception in three cases:</p>
325 /// <ul>
326 /// <li>
327 /// <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 "Would you like anything else today?" the user says "Yes." 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>
328 /// <li>
329 /// <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>
330 /// <li>
331 /// <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>
332 /// </ul>
333 pub fn get_clarification_prompt(&self) -> &::std::option::Option<crate::types::Prompt> {
334 self.inner.get_clarification_prompt()
335 }
336 /// <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 cancels the conversation. To set the number of retries, use the <code>valueElicitationPrompt</code> field for the slot type.</p>
337 /// <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>
338 /// <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>
339 /// <p>If you have defined a fallback intent the cancel 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>
340 pub fn abort_statement(mut self, input: crate::types::Statement) -> Self {
341 self.inner = self.inner.abort_statement(input);
342 self
343 }
344 /// <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 cancels the conversation. To set the number of retries, use the <code>valueElicitationPrompt</code> field for the slot type.</p>
345 /// <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>
346 /// <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>
347 /// <p>If you have defined a fallback intent the cancel 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>
348 pub fn set_abort_statement(mut self, input: ::std::option::Option<crate::types::Statement>) -> Self {
349 self.inner = self.inner.set_abort_statement(input);
350 self
351 }
352 /// <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 cancels the conversation. To set the number of retries, use the <code>valueElicitationPrompt</code> field for the slot type.</p>
353 /// <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>
354 /// <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>
355 /// <p>If you have defined a fallback intent the cancel 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>
356 pub fn get_abort_statement(&self) -> &::std::option::Option<crate::types::Statement> {
357 self.inner.get_abort_statement()
358 }
359 /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
360 /// <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>
361 /// <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>
362 /// <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>
363 /// <p>The default is 300 seconds (5 minutes).</p>
364 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
365 self.inner = self.inner.idle_session_ttl_in_seconds(input);
366 self
367 }
368 /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
369 /// <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>
370 /// <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>
371 /// <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>
372 /// <p>The default is 300 seconds (5 minutes).</p>
373 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
374 self.inner = self.inner.set_idle_session_ttl_in_seconds(input);
375 self
376 }
377 /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
378 /// <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>
379 /// <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>
380 /// <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>
381 /// <p>The default is 300 seconds (5 minutes).</p>
382 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
383 self.inner.get_idle_session_ttl_in_seconds()
384 }
385 /// <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>
386 pub fn voice_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
387 self.inner = self.inner.voice_id(input.into());
388 self
389 }
390 /// <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>
391 pub fn set_voice_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
392 self.inner = self.inner.set_voice_id(input);
393 self
394 }
395 /// <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>
396 pub fn get_voice_id(&self) -> &::std::option::Option<::std::string::String> {
397 self.inner.get_voice_id()
398 }
399 /// <p>Identifies a specific revision of the <code>$LATEST</code> version.</p>
400 /// <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>
401 /// <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>
402 pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
403 self.inner = self.inner.checksum(input.into());
404 self
405 }
406 /// <p>Identifies a specific revision of the <code>$LATEST</code> version.</p>
407 /// <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>
408 /// <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>
409 pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
410 self.inner = self.inner.set_checksum(input);
411 self
412 }
413 /// <p>Identifies a specific revision of the <code>$LATEST</code> version.</p>
414 /// <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>
415 /// <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>
416 pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
417 self.inner.get_checksum()
418 }
419 /// <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>
420 /// <p>If you don't specify this value, the default value is <code>BUILD</code>.</p>
421 pub fn process_behavior(mut self, input: crate::types::ProcessBehavior) -> Self {
422 self.inner = self.inner.process_behavior(input);
423 self
424 }
425 /// <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>
426 /// <p>If you don't specify this value, the default value is <code>BUILD</code>.</p>
427 pub fn set_process_behavior(mut self, input: ::std::option::Option<crate::types::ProcessBehavior>) -> Self {
428 self.inner = self.inner.set_process_behavior(input);
429 self
430 }
431 /// <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>
432 /// <p>If you don't specify this value, the default value is <code>BUILD</code>.</p>
433 pub fn get_process_behavior(&self) -> &::std::option::Option<crate::types::ProcessBehavior> {
434 self.inner.get_process_behavior()
435 }
436 /// <p>Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.</p>
437 /// <p>The default is <code>en-US</code>.</p>
438 pub fn locale(mut self, input: crate::types::Locale) -> Self {
439 self.inner = self.inner.locale(input);
440 self
441 }
442 /// <p>Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.</p>
443 /// <p>The default is <code>en-US</code>.</p>
444 pub fn set_locale(mut self, input: ::std::option::Option<crate::types::Locale>) -> Self {
445 self.inner = self.inner.set_locale(input);
446 self
447 }
448 /// <p>Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.</p>
449 /// <p>The default is <code>en-US</code>.</p>
450 pub fn get_locale(&self) -> &::std::option::Option<crate::types::Locale> {
451 self.inner.get_locale()
452 }
453 /// <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>
454 /// <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>
455 pub fn child_directed(mut self, input: bool) -> Self {
456 self.inner = self.inner.child_directed(input);
457 self
458 }
459 /// <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>
460 /// <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>
461 pub fn set_child_directed(mut self, input: ::std::option::Option<bool>) -> Self {
462 self.inner = self.inner.set_child_directed(input);
463 self
464 }
465 /// <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>
466 /// <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>
467 pub fn get_child_directed(&self) -> &::std::option::Option<bool> {
468 self.inner.get_child_directed()
469 }
470 /// <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>
471 pub fn detect_sentiment(mut self, input: bool) -> Self {
472 self.inner = self.inner.detect_sentiment(input);
473 self
474 }
475 /// <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>
476 pub fn set_detect_sentiment(mut self, input: ::std::option::Option<bool>) -> Self {
477 self.inner = self.inner.set_detect_sentiment(input);
478 self
479 }
480 /// <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>
481 pub fn get_detect_sentiment(&self) -> &::std::option::Option<bool> {
482 self.inner.get_detect_sentiment()
483 }
484 /// <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>
485 pub fn create_version(mut self, input: bool) -> Self {
486 self.inner = self.inner.create_version(input);
487 self
488 }
489 /// <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>
490 pub fn set_create_version(mut self, input: ::std::option::Option<bool>) -> Self {
491 self.inner = self.inner.set_create_version(input);
492 self
493 }
494 /// <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>
495 pub fn get_create_version(&self) -> &::std::option::Option<bool> {
496 self.inner.get_create_version()
497 }
498 ///
499 /// Appends an item to `tags`.
500 ///
501 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
502 ///
503 /// <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>
504 pub fn tags(mut self, input: crate::types::Tag) -> Self {
505 self.inner = self.inner.tags(input);
506 self
507 }
508 /// <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>
509 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
510 self.inner = self.inner.set_tags(input);
511 self
512 }
513 /// <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>
514 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
515 self.inner.get_tags()
516 }
517}