aws_sdk_lexruntime/operation/put_session/_put_session_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4pub struct PutSessionOutput {
5 /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
6 pub content_type: ::std::option::Option<::std::string::String>,
7 /// <p>The name of the current intent.</p>
8 pub intent_name: ::std::option::Option<::std::string::String>,
9 /// <p>Map of zero or more intent slots Amazon Lex detected from the user input during the conversation.</p>
10 /// <p>Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the <code>valueSelectionStrategy</code> selected when the slot type was created or updated. If <code>valueSelectionStrategy</code> is set to <code>ORIGINAL_VALUE</code>, the value provided by the user is returned, if the user value is similar to the slot values. If <code>valueSelectionStrategy</code> is set to <code>TOP_RESOLUTION</code> Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a <code>valueSelectionStrategy</code> the default is <code>ORIGINAL_VALUE</code>.</p>
11 pub slots: ::std::option::Option<::std::string::String>,
12 /// <p>Map of key/value pairs representing session-specific context information.</p>
13 pub session_attributes: ::std::option::Option<::std::string::String>,
14 /// <p>The next message that should be presented to the user.</p>
15 /// <p>You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the <code>message</code> field is null. You should use the <code>encodedMessage</code> field instead.</p>
16 #[deprecated(
17 note = "The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."
18 )]
19 pub message: ::std::option::Option<::std::string::String>,
20 /// <p>The next message that should be presented to the user.</p>
21 /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
22 pub encoded_message: ::std::option::Option<::std::string::String>,
23 /// <p>The format of the response message. One of the following values:</p>
24 /// <ul>
25 /// <li>
26 /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
27 /// <li>
28 /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
29 /// <li>
30 /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
31 /// <li>
32 /// <p><code>Composite</code> - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.</p></li>
33 /// </ul>
34 pub message_format: ::std::option::Option<crate::types::MessageFormatType>,
35 /// <p></p>
36 /// <ul>
37 /// <li>
38 /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response to confirm the intent before fulfilling an intent.</p></li>
39 /// <li>
40 /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent.</p></li>
41 /// <li>
42 /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p></li>
43 /// <li>
44 /// <p><code>Failed</code> - Conveys that the conversation with the user has failed. This can happen for various reasons, including the user does not provide an appropriate response to prompts from the service, or if the Lambda function fails to fulfill the intent.</p></li>
45 /// <li>
46 /// <p><code>Fulfilled</code> - Conveys that the Lambda function has sucessfully fulfilled the intent.</p></li>
47 /// <li>
48 /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the intent.</p></li>
49 /// </ul>
50 pub dialog_state: ::std::option::Option<crate::types::DialogState>,
51 /// <p>If the <code>dialogState</code> is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
52 pub slot_to_elicit: ::std::option::Option<::std::string::String>,
53 /// <p>The audio version of the message to convey to the user.</p>
54 pub audio_stream: ::aws_smithy_types::byte_stream::ByteStream,
55 /// <p>A unique identifier for the session.</p>
56 pub session_id: ::std::option::Option<::std::string::String>,
57 /// <p>A list of active contexts for the session.</p>
58 pub active_contexts: ::std::option::Option<::std::string::String>,
59 _request_id: Option<String>,
60}
61impl PutSessionOutput {
62 /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
63 pub fn content_type(&self) -> ::std::option::Option<&str> {
64 self.content_type.as_deref()
65 }
66 /// <p>The name of the current intent.</p>
67 pub fn intent_name(&self) -> ::std::option::Option<&str> {
68 self.intent_name.as_deref()
69 }
70 /// <p>Map of zero or more intent slots Amazon Lex detected from the user input during the conversation.</p>
71 /// <p>Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the <code>valueSelectionStrategy</code> selected when the slot type was created or updated. If <code>valueSelectionStrategy</code> is set to <code>ORIGINAL_VALUE</code>, the value provided by the user is returned, if the user value is similar to the slot values. If <code>valueSelectionStrategy</code> is set to <code>TOP_RESOLUTION</code> Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a <code>valueSelectionStrategy</code> the default is <code>ORIGINAL_VALUE</code>.</p>
72 pub fn slots(&self) -> ::std::option::Option<&str> {
73 self.slots.as_deref()
74 }
75 /// <p>Map of key/value pairs representing session-specific context information.</p>
76 pub fn session_attributes(&self) -> ::std::option::Option<&str> {
77 self.session_attributes.as_deref()
78 }
79 /// <p>The next message that should be presented to the user.</p>
80 /// <p>You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the <code>message</code> field is null. You should use the <code>encodedMessage</code> field instead.</p>
81 #[deprecated(
82 note = "The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."
83 )]
84 pub fn message(&self) -> ::std::option::Option<&str> {
85 self.message.as_deref()
86 }
87 /// <p>The next message that should be presented to the user.</p>
88 /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
89 pub fn encoded_message(&self) -> ::std::option::Option<&str> {
90 self.encoded_message.as_deref()
91 }
92 /// <p>The format of the response message. One of the following values:</p>
93 /// <ul>
94 /// <li>
95 /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
96 /// <li>
97 /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
98 /// <li>
99 /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
100 /// <li>
101 /// <p><code>Composite</code> - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.</p></li>
102 /// </ul>
103 pub fn message_format(&self) -> ::std::option::Option<&crate::types::MessageFormatType> {
104 self.message_format.as_ref()
105 }
106 /// <p></p>
107 /// <ul>
108 /// <li>
109 /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response to confirm the intent before fulfilling an intent.</p></li>
110 /// <li>
111 /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent.</p></li>
112 /// <li>
113 /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p></li>
114 /// <li>
115 /// <p><code>Failed</code> - Conveys that the conversation with the user has failed. This can happen for various reasons, including the user does not provide an appropriate response to prompts from the service, or if the Lambda function fails to fulfill the intent.</p></li>
116 /// <li>
117 /// <p><code>Fulfilled</code> - Conveys that the Lambda function has sucessfully fulfilled the intent.</p></li>
118 /// <li>
119 /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the intent.</p></li>
120 /// </ul>
121 pub fn dialog_state(&self) -> ::std::option::Option<&crate::types::DialogState> {
122 self.dialog_state.as_ref()
123 }
124 /// <p>If the <code>dialogState</code> is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
125 pub fn slot_to_elicit(&self) -> ::std::option::Option<&str> {
126 self.slot_to_elicit.as_deref()
127 }
128 /// <p>The audio version of the message to convey to the user.</p>
129 pub fn audio_stream(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
130 &self.audio_stream
131 }
132 /// <p>A unique identifier for the session.</p>
133 pub fn session_id(&self) -> ::std::option::Option<&str> {
134 self.session_id.as_deref()
135 }
136 /// <p>A list of active contexts for the session.</p>
137 pub fn active_contexts(&self) -> ::std::option::Option<&str> {
138 self.active_contexts.as_deref()
139 }
140}
141impl ::std::fmt::Debug for PutSessionOutput {
142 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
143 let mut formatter = f.debug_struct("PutSessionOutput");
144 formatter.field("content_type", &self.content_type);
145 formatter.field("intent_name", &self.intent_name);
146 formatter.field("slots", &self.slots);
147 formatter.field("session_attributes", &self.session_attributes);
148 formatter.field("message", &"*** Sensitive Data Redacted ***");
149 formatter.field("encoded_message", &"*** Sensitive Data Redacted ***");
150 formatter.field("message_format", &self.message_format);
151 formatter.field("dialog_state", &self.dialog_state);
152 formatter.field("slot_to_elicit", &self.slot_to_elicit);
153 formatter.field("audio_stream", &self.audio_stream);
154 formatter.field("session_id", &self.session_id);
155 formatter.field("active_contexts", &"*** Sensitive Data Redacted ***");
156 formatter.field("_request_id", &self._request_id);
157 formatter.finish()
158 }
159}
160impl ::aws_types::request_id::RequestId for PutSessionOutput {
161 fn request_id(&self) -> Option<&str> {
162 self._request_id.as_deref()
163 }
164}
165impl PutSessionOutput {
166 /// Creates a new builder-style object to manufacture [`PutSessionOutput`](crate::operation::put_session::PutSessionOutput).
167 pub fn builder() -> crate::operation::put_session::builders::PutSessionOutputBuilder {
168 crate::operation::put_session::builders::PutSessionOutputBuilder::default()
169 }
170}
171
172/// A builder for [`PutSessionOutput`](crate::operation::put_session::PutSessionOutput).
173#[derive(::std::default::Default)]
174#[non_exhaustive]
175pub struct PutSessionOutputBuilder {
176 pub(crate) content_type: ::std::option::Option<::std::string::String>,
177 pub(crate) intent_name: ::std::option::Option<::std::string::String>,
178 pub(crate) slots: ::std::option::Option<::std::string::String>,
179 pub(crate) session_attributes: ::std::option::Option<::std::string::String>,
180 pub(crate) message: ::std::option::Option<::std::string::String>,
181 pub(crate) encoded_message: ::std::option::Option<::std::string::String>,
182 pub(crate) message_format: ::std::option::Option<crate::types::MessageFormatType>,
183 pub(crate) dialog_state: ::std::option::Option<crate::types::DialogState>,
184 pub(crate) slot_to_elicit: ::std::option::Option<::std::string::String>,
185 pub(crate) audio_stream: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
186 pub(crate) session_id: ::std::option::Option<::std::string::String>,
187 pub(crate) active_contexts: ::std::option::Option<::std::string::String>,
188 _request_id: Option<String>,
189}
190impl PutSessionOutputBuilder {
191 /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
192 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.content_type = ::std::option::Option::Some(input.into());
194 self
195 }
196 /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
197 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.content_type = input;
199 self
200 }
201 /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
202 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
203 &self.content_type
204 }
205 /// <p>The name of the current intent.</p>
206 pub fn intent_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.intent_name = ::std::option::Option::Some(input.into());
208 self
209 }
210 /// <p>The name of the current intent.</p>
211 pub fn set_intent_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.intent_name = input;
213 self
214 }
215 /// <p>The name of the current intent.</p>
216 pub fn get_intent_name(&self) -> &::std::option::Option<::std::string::String> {
217 &self.intent_name
218 }
219 /// <p>Map of zero or more intent slots Amazon Lex detected from the user input during the conversation.</p>
220 /// <p>Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the <code>valueSelectionStrategy</code> selected when the slot type was created or updated. If <code>valueSelectionStrategy</code> is set to <code>ORIGINAL_VALUE</code>, the value provided by the user is returned, if the user value is similar to the slot values. If <code>valueSelectionStrategy</code> is set to <code>TOP_RESOLUTION</code> Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a <code>valueSelectionStrategy</code> the default is <code>ORIGINAL_VALUE</code>.</p>
221 pub fn slots(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 self.slots = ::std::option::Option::Some(input.into());
223 self
224 }
225 /// <p>Map of zero or more intent slots Amazon Lex detected from the user input during the conversation.</p>
226 /// <p>Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the <code>valueSelectionStrategy</code> selected when the slot type was created or updated. If <code>valueSelectionStrategy</code> is set to <code>ORIGINAL_VALUE</code>, the value provided by the user is returned, if the user value is similar to the slot values. If <code>valueSelectionStrategy</code> is set to <code>TOP_RESOLUTION</code> Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a <code>valueSelectionStrategy</code> the default is <code>ORIGINAL_VALUE</code>.</p>
227 pub fn set_slots(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.slots = input;
229 self
230 }
231 /// <p>Map of zero or more intent slots Amazon Lex detected from the user input during the conversation.</p>
232 /// <p>Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the <code>valueSelectionStrategy</code> selected when the slot type was created or updated. If <code>valueSelectionStrategy</code> is set to <code>ORIGINAL_VALUE</code>, the value provided by the user is returned, if the user value is similar to the slot values. If <code>valueSelectionStrategy</code> is set to <code>TOP_RESOLUTION</code> Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a <code>valueSelectionStrategy</code> the default is <code>ORIGINAL_VALUE</code>.</p>
233 pub fn get_slots(&self) -> &::std::option::Option<::std::string::String> {
234 &self.slots
235 }
236 /// <p>Map of key/value pairs representing session-specific context information.</p>
237 pub fn session_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238 self.session_attributes = ::std::option::Option::Some(input.into());
239 self
240 }
241 /// <p>Map of key/value pairs representing session-specific context information.</p>
242 pub fn set_session_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243 self.session_attributes = input;
244 self
245 }
246 /// <p>Map of key/value pairs representing session-specific context information.</p>
247 pub fn get_session_attributes(&self) -> &::std::option::Option<::std::string::String> {
248 &self.session_attributes
249 }
250 /// <p>The next message that should be presented to the user.</p>
251 /// <p>You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the <code>message</code> field is null. You should use the <code>encodedMessage</code> field instead.</p>
252 #[deprecated(
253 note = "The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."
254 )]
255 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256 self.message = ::std::option::Option::Some(input.into());
257 self
258 }
259 /// <p>The next message that should be presented to the user.</p>
260 /// <p>You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the <code>message</code> field is null. You should use the <code>encodedMessage</code> field instead.</p>
261 #[deprecated(
262 note = "The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."
263 )]
264 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
265 self.message = input;
266 self
267 }
268 /// <p>The next message that should be presented to the user.</p>
269 /// <p>You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the <code>message</code> field is null. You should use the <code>encodedMessage</code> field instead.</p>
270 #[deprecated(
271 note = "The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."
272 )]
273 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
274 &self.message
275 }
276 /// <p>The next message that should be presented to the user.</p>
277 /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
278 pub fn encoded_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
279 self.encoded_message = ::std::option::Option::Some(input.into());
280 self
281 }
282 /// <p>The next message that should be presented to the user.</p>
283 /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
284 pub fn set_encoded_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
285 self.encoded_message = input;
286 self
287 }
288 /// <p>The next message that should be presented to the user.</p>
289 /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
290 pub fn get_encoded_message(&self) -> &::std::option::Option<::std::string::String> {
291 &self.encoded_message
292 }
293 /// <p>The format of the response message. One of the following values:</p>
294 /// <ul>
295 /// <li>
296 /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
297 /// <li>
298 /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
299 /// <li>
300 /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
301 /// <li>
302 /// <p><code>Composite</code> - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.</p></li>
303 /// </ul>
304 pub fn message_format(mut self, input: crate::types::MessageFormatType) -> Self {
305 self.message_format = ::std::option::Option::Some(input);
306 self
307 }
308 /// <p>The format of the response message. One of the following values:</p>
309 /// <ul>
310 /// <li>
311 /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
312 /// <li>
313 /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
314 /// <li>
315 /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
316 /// <li>
317 /// <p><code>Composite</code> - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.</p></li>
318 /// </ul>
319 pub fn set_message_format(mut self, input: ::std::option::Option<crate::types::MessageFormatType>) -> Self {
320 self.message_format = input;
321 self
322 }
323 /// <p>The format of the response message. One of the following values:</p>
324 /// <ul>
325 /// <li>
326 /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
327 /// <li>
328 /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
329 /// <li>
330 /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
331 /// <li>
332 /// <p><code>Composite</code> - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.</p></li>
333 /// </ul>
334 pub fn get_message_format(&self) -> &::std::option::Option<crate::types::MessageFormatType> {
335 &self.message_format
336 }
337 /// <p></p>
338 /// <ul>
339 /// <li>
340 /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response to confirm the intent before fulfilling an intent.</p></li>
341 /// <li>
342 /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent.</p></li>
343 /// <li>
344 /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p></li>
345 /// <li>
346 /// <p><code>Failed</code> - Conveys that the conversation with the user has failed. This can happen for various reasons, including the user does not provide an appropriate response to prompts from the service, or if the Lambda function fails to fulfill the intent.</p></li>
347 /// <li>
348 /// <p><code>Fulfilled</code> - Conveys that the Lambda function has sucessfully fulfilled the intent.</p></li>
349 /// <li>
350 /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the intent.</p></li>
351 /// </ul>
352 pub fn dialog_state(mut self, input: crate::types::DialogState) -> Self {
353 self.dialog_state = ::std::option::Option::Some(input);
354 self
355 }
356 /// <p></p>
357 /// <ul>
358 /// <li>
359 /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response to confirm the intent before fulfilling an intent.</p></li>
360 /// <li>
361 /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent.</p></li>
362 /// <li>
363 /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p></li>
364 /// <li>
365 /// <p><code>Failed</code> - Conveys that the conversation with the user has failed. This can happen for various reasons, including the user does not provide an appropriate response to prompts from the service, or if the Lambda function fails to fulfill the intent.</p></li>
366 /// <li>
367 /// <p><code>Fulfilled</code> - Conveys that the Lambda function has sucessfully fulfilled the intent.</p></li>
368 /// <li>
369 /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the intent.</p></li>
370 /// </ul>
371 pub fn set_dialog_state(mut self, input: ::std::option::Option<crate::types::DialogState>) -> Self {
372 self.dialog_state = input;
373 self
374 }
375 /// <p></p>
376 /// <ul>
377 /// <li>
378 /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response to confirm the intent before fulfilling an intent.</p></li>
379 /// <li>
380 /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent.</p></li>
381 /// <li>
382 /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p></li>
383 /// <li>
384 /// <p><code>Failed</code> - Conveys that the conversation with the user has failed. This can happen for various reasons, including the user does not provide an appropriate response to prompts from the service, or if the Lambda function fails to fulfill the intent.</p></li>
385 /// <li>
386 /// <p><code>Fulfilled</code> - Conveys that the Lambda function has sucessfully fulfilled the intent.</p></li>
387 /// <li>
388 /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the intent.</p></li>
389 /// </ul>
390 pub fn get_dialog_state(&self) -> &::std::option::Option<crate::types::DialogState> {
391 &self.dialog_state
392 }
393 /// <p>If the <code>dialogState</code> is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
394 pub fn slot_to_elicit(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
395 self.slot_to_elicit = ::std::option::Option::Some(input.into());
396 self
397 }
398 /// <p>If the <code>dialogState</code> is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
399 pub fn set_slot_to_elicit(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
400 self.slot_to_elicit = input;
401 self
402 }
403 /// <p>If the <code>dialogState</code> is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
404 pub fn get_slot_to_elicit(&self) -> &::std::option::Option<::std::string::String> {
405 &self.slot_to_elicit
406 }
407 /// <p>The audio version of the message to convey to the user.</p>
408 pub fn audio_stream(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
409 self.audio_stream = ::std::option::Option::Some(input);
410 self
411 }
412 /// <p>The audio version of the message to convey to the user.</p>
413 pub fn set_audio_stream(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
414 self.audio_stream = input;
415 self
416 }
417 /// <p>The audio version of the message to convey to the user.</p>
418 pub fn get_audio_stream(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
419 &self.audio_stream
420 }
421 /// <p>A unique identifier for the session.</p>
422 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
423 self.session_id = ::std::option::Option::Some(input.into());
424 self
425 }
426 /// <p>A unique identifier for the session.</p>
427 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
428 self.session_id = input;
429 self
430 }
431 /// <p>A unique identifier for the session.</p>
432 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
433 &self.session_id
434 }
435 /// <p>A list of active contexts for the session.</p>
436 pub fn active_contexts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
437 self.active_contexts = ::std::option::Option::Some(input.into());
438 self
439 }
440 /// <p>A list of active contexts for the session.</p>
441 pub fn set_active_contexts(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
442 self.active_contexts = input;
443 self
444 }
445 /// <p>A list of active contexts for the session.</p>
446 pub fn get_active_contexts(&self) -> &::std::option::Option<::std::string::String> {
447 &self.active_contexts
448 }
449 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
450 self._request_id = Some(request_id.into());
451 self
452 }
453
454 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
455 self._request_id = request_id;
456 self
457 }
458 /// Consumes the builder and constructs a [`PutSessionOutput`](crate::operation::put_session::PutSessionOutput).
459 pub fn build(self) -> crate::operation::put_session::PutSessionOutput {
460 crate::operation::put_session::PutSessionOutput {
461 content_type: self.content_type,
462 intent_name: self.intent_name,
463 slots: self.slots,
464 session_attributes: self.session_attributes,
465 message: self.message,
466 encoded_message: self.encoded_message,
467 message_format: self.message_format,
468 dialog_state: self.dialog_state,
469 slot_to_elicit: self.slot_to_elicit,
470 audio_stream: self.audio_stream.unwrap_or_default(),
471 session_id: self.session_id,
472 active_contexts: self.active_contexts,
473 _request_id: self._request_id,
474 }
475 }
476}
477impl ::std::fmt::Debug for PutSessionOutputBuilder {
478 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
479 let mut formatter = f.debug_struct("PutSessionOutputBuilder");
480 formatter.field("content_type", &self.content_type);
481 formatter.field("intent_name", &self.intent_name);
482 formatter.field("slots", &self.slots);
483 formatter.field("session_attributes", &self.session_attributes);
484 formatter.field("message", &"*** Sensitive Data Redacted ***");
485 formatter.field("encoded_message", &"*** Sensitive Data Redacted ***");
486 formatter.field("message_format", &self.message_format);
487 formatter.field("dialog_state", &self.dialog_state);
488 formatter.field("slot_to_elicit", &self.slot_to_elicit);
489 formatter.field("audio_stream", &self.audio_stream);
490 formatter.field("session_id", &self.session_id);
491 formatter.field("active_contexts", &"*** Sensitive Data Redacted ***");
492 formatter.field("_request_id", &self._request_id);
493 formatter.finish()
494 }
495}