aws_sdk_lexruntime/operation/post_content/
_post_content_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 PostContentOutput {
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>Current user intent that Amazon Lex is aware of.</p>
8    pub intent_name: ::std::option::Option<::std::string::String>,
9    /// <p>Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the user's intent. The score is between 0.0 and 1.0.</p>
10    /// <p>The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex.</p>
11    pub nlu_intent_confidence: ::std::option::Option<::std::string::String>,
12    /// <p>One to four alternative intents that may be applicable to the user's intent.</p>
13    /// <p>Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's intent. The intents are sorted by the confidence score.</p>
14    pub alternative_intents: ::std::option::Option<::std::string::String>,
15    /// <p>Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation. The field is base-64 encoded.</p>
16    /// <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>
17    pub slots: ::std::option::Option<::std::string::String>,
18    /// <p>Map of key/value pairs representing the session-specific context information.</p>
19    pub session_attributes: ::std::option::Option<::std::string::String>,
20    /// <p>The sentiment expressed in an utterance.</p>
21    /// <p>When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.</p>
22    pub sentiment_response: ::std::option::Option<::std::string::String>,
23    /// <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>
24    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
25    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
26    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
27    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
28    #[deprecated(
29        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."
30    )]
31    pub message: ::std::option::Option<::std::string::String>,
32    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
33    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
34    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
35    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
36    /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
37    pub encoded_message: ::std::option::Option<::std::string::String>,
38    /// <p>The format of the response message. One of the following values:</p>
39    /// <ul>
40    /// <li>
41    /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
42    /// <li>
43    /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
44    /// <li>
45    /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
46    /// <li>
47    /// <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>
48    /// </ul>
49    pub message_format: ::std::option::Option<crate::types::MessageFormatType>,
50    /// <p>Identifies the current state of the user interaction. Amazon Lex returns one of the following values as <code>dialogState</code>. The client can optionally use this information to customize the user interface.</p>
51    /// <ul>
52    /// <li>
53    /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent. Consider the following examples:</p>
54    /// <p>For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent from this utterance, it will return this dialog state.</p></li>
55    /// <li>
56    /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response.</p>
57    /// <p>For example, Amazon Lex wants user confirmation before fulfilling an intent. Instead of a simple "yes" or "no" response, a user might respond with additional information. For example, "yes, but make it a thick crust pizza" or "no, I want to order a drink." Amazon Lex can process such additional information (in these examples, update the crust type slot or change the intent from OrderPizza to OrderDrink).</p></li>
58    /// <li>
59    /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p>
60    /// <p>For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately.</p></li>
61    /// <li>
62    /// <p><code>Fulfilled</code> - Conveys that the Lambda function has successfully fulfilled the intent.</p></li>
63    /// <li>
64    /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the request.</p></li>
65    /// <li>
66    /// <p><code>Failed</code> - Conveys that the conversation with the user failed.</p>
67    /// <p>This can happen for various reasons, including that the user does not provide an appropriate response to prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or if the Lambda function fails to fulfill the intent.</p></li>
68    /// </ul>
69    pub dialog_state: ::std::option::Option<crate::types::DialogState>,
70    /// <p>If the <code>dialogState</code> value is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
71    pub slot_to_elicit: ::std::option::Option<::std::string::String>,
72    /// <p>The text used to process the request.</p>
73    /// <p>You can use this field 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. In all other locales, the <code>inputTranscript</code> field is null. You should use the <code>encodedInputTranscript</code> field instead.</p>
74    /// <p>If the input was an audio stream, the <code>inputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
75    #[deprecated(
76        note = "The inputTranscript field is deprecated, use the encodedInputTranscript field instead. The inputTranscript 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."
77    )]
78    pub input_transcript: ::std::option::Option<::std::string::String>,
79    /// <p>The text used to process the request.</p>
80    /// <p>If the input was an audio stream, the <code>encodedInputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
81    /// <p>The <code>encodedInputTranscript</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
82    pub encoded_input_transcript: ::std::option::Option<::std::string::String>,
83    /// <p>The prompt (or statement) to convey to the user. This is based on the bot configuration and context. For example, if Amazon Lex did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex sends that message in the response.</p>
84    pub audio_stream: ::aws_smithy_types::byte_stream::ByteStream,
85    /// <p>The version of the bot that responded to the conversation. You can use this information to help determine if one version of a bot is performing better than another version.</p>
86    pub bot_version: ::std::option::Option<::std::string::String>,
87    /// <p>The unique identifier for the session.</p>
88    pub session_id: ::std::option::Option<::std::string::String>,
89    /// <p>A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the <code>PostContent</code>, <code>PostText</code>, or <code>PutSession</code> operation.</p>
90    /// <p>You can use a context to control the intents that can follow up an intent, or to modify the operation of your application.</p>
91    pub active_contexts: ::std::option::Option<::std::string::String>,
92    _request_id: Option<String>,
93}
94impl PostContentOutput {
95    /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
96    pub fn content_type(&self) -> ::std::option::Option<&str> {
97        self.content_type.as_deref()
98    }
99    /// <p>Current user intent that Amazon Lex is aware of.</p>
100    pub fn intent_name(&self) -> ::std::option::Option<&str> {
101        self.intent_name.as_deref()
102    }
103    /// <p>Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the user's intent. The score is between 0.0 and 1.0.</p>
104    /// <p>The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex.</p>
105    pub fn nlu_intent_confidence(&self) -> ::std::option::Option<&str> {
106        self.nlu_intent_confidence.as_deref()
107    }
108    /// <p>One to four alternative intents that may be applicable to the user's intent.</p>
109    /// <p>Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's intent. The intents are sorted by the confidence score.</p>
110    pub fn alternative_intents(&self) -> ::std::option::Option<&str> {
111        self.alternative_intents.as_deref()
112    }
113    /// <p>Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation. The field is base-64 encoded.</p>
114    /// <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>
115    pub fn slots(&self) -> ::std::option::Option<&str> {
116        self.slots.as_deref()
117    }
118    /// <p>Map of key/value pairs representing the session-specific context information.</p>
119    pub fn session_attributes(&self) -> ::std::option::Option<&str> {
120        self.session_attributes.as_deref()
121    }
122    /// <p>The sentiment expressed in an utterance.</p>
123    /// <p>When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.</p>
124    pub fn sentiment_response(&self) -> ::std::option::Option<&str> {
125        self.sentiment_response.as_deref()
126    }
127    /// <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>
128    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
129    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
130    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
131    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
132    #[deprecated(
133        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."
134    )]
135    pub fn message(&self) -> ::std::option::Option<&str> {
136        self.message.as_deref()
137    }
138    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
139    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
140    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
141    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
142    /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
143    pub fn encoded_message(&self) -> ::std::option::Option<&str> {
144        self.encoded_message.as_deref()
145    }
146    /// <p>The format of the response message. One of the following values:</p>
147    /// <ul>
148    /// <li>
149    /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
150    /// <li>
151    /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
152    /// <li>
153    /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
154    /// <li>
155    /// <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>
156    /// </ul>
157    pub fn message_format(&self) -> ::std::option::Option<&crate::types::MessageFormatType> {
158        self.message_format.as_ref()
159    }
160    /// <p>Identifies the current state of the user interaction. Amazon Lex returns one of the following values as <code>dialogState</code>. The client can optionally use this information to customize the user interface.</p>
161    /// <ul>
162    /// <li>
163    /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent. Consider the following examples:</p>
164    /// <p>For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent from this utterance, it will return this dialog state.</p></li>
165    /// <li>
166    /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response.</p>
167    /// <p>For example, Amazon Lex wants user confirmation before fulfilling an intent. Instead of a simple "yes" or "no" response, a user might respond with additional information. For example, "yes, but make it a thick crust pizza" or "no, I want to order a drink." Amazon Lex can process such additional information (in these examples, update the crust type slot or change the intent from OrderPizza to OrderDrink).</p></li>
168    /// <li>
169    /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p>
170    /// <p>For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately.</p></li>
171    /// <li>
172    /// <p><code>Fulfilled</code> - Conveys that the Lambda function has successfully fulfilled the intent.</p></li>
173    /// <li>
174    /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the request.</p></li>
175    /// <li>
176    /// <p><code>Failed</code> - Conveys that the conversation with the user failed.</p>
177    /// <p>This can happen for various reasons, including that the user does not provide an appropriate response to prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or if the Lambda function fails to fulfill the intent.</p></li>
178    /// </ul>
179    pub fn dialog_state(&self) -> ::std::option::Option<&crate::types::DialogState> {
180        self.dialog_state.as_ref()
181    }
182    /// <p>If the <code>dialogState</code> value is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
183    pub fn slot_to_elicit(&self) -> ::std::option::Option<&str> {
184        self.slot_to_elicit.as_deref()
185    }
186    /// <p>The text used to process the request.</p>
187    /// <p>You can use this field 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. In all other locales, the <code>inputTranscript</code> field is null. You should use the <code>encodedInputTranscript</code> field instead.</p>
188    /// <p>If the input was an audio stream, the <code>inputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
189    #[deprecated(
190        note = "The inputTranscript field is deprecated, use the encodedInputTranscript field instead. The inputTranscript 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."
191    )]
192    pub fn input_transcript(&self) -> ::std::option::Option<&str> {
193        self.input_transcript.as_deref()
194    }
195    /// <p>The text used to process the request.</p>
196    /// <p>If the input was an audio stream, the <code>encodedInputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
197    /// <p>The <code>encodedInputTranscript</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
198    pub fn encoded_input_transcript(&self) -> ::std::option::Option<&str> {
199        self.encoded_input_transcript.as_deref()
200    }
201    /// <p>The prompt (or statement) to convey to the user. This is based on the bot configuration and context. For example, if Amazon Lex did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex sends that message in the response.</p>
202    pub fn audio_stream(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
203        &self.audio_stream
204    }
205    /// <p>The version of the bot that responded to the conversation. You can use this information to help determine if one version of a bot is performing better than another version.</p>
206    pub fn bot_version(&self) -> ::std::option::Option<&str> {
207        self.bot_version.as_deref()
208    }
209    /// <p>The unique identifier for the session.</p>
210    pub fn session_id(&self) -> ::std::option::Option<&str> {
211        self.session_id.as_deref()
212    }
213    /// <p>A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the <code>PostContent</code>, <code>PostText</code>, or <code>PutSession</code> operation.</p>
214    /// <p>You can use a context to control the intents that can follow up an intent, or to modify the operation of your application.</p>
215    pub fn active_contexts(&self) -> ::std::option::Option<&str> {
216        self.active_contexts.as_deref()
217    }
218}
219impl ::std::fmt::Debug for PostContentOutput {
220    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
221        let mut formatter = f.debug_struct("PostContentOutput");
222        formatter.field("content_type", &self.content_type);
223        formatter.field("intent_name", &self.intent_name);
224        formatter.field("nlu_intent_confidence", &self.nlu_intent_confidence);
225        formatter.field("alternative_intents", &self.alternative_intents);
226        formatter.field("slots", &self.slots);
227        formatter.field("session_attributes", &self.session_attributes);
228        formatter.field("sentiment_response", &self.sentiment_response);
229        formatter.field("message", &"*** Sensitive Data Redacted ***");
230        formatter.field("encoded_message", &"*** Sensitive Data Redacted ***");
231        formatter.field("message_format", &self.message_format);
232        formatter.field("dialog_state", &self.dialog_state);
233        formatter.field("slot_to_elicit", &self.slot_to_elicit);
234        formatter.field("input_transcript", &self.input_transcript);
235        formatter.field("encoded_input_transcript", &"*** Sensitive Data Redacted ***");
236        formatter.field("audio_stream", &self.audio_stream);
237        formatter.field("bot_version", &self.bot_version);
238        formatter.field("session_id", &self.session_id);
239        formatter.field("active_contexts", &"*** Sensitive Data Redacted ***");
240        formatter.field("_request_id", &self._request_id);
241        formatter.finish()
242    }
243}
244impl ::aws_types::request_id::RequestId for PostContentOutput {
245    fn request_id(&self) -> Option<&str> {
246        self._request_id.as_deref()
247    }
248}
249impl PostContentOutput {
250    /// Creates a new builder-style object to manufacture [`PostContentOutput`](crate::operation::post_content::PostContentOutput).
251    pub fn builder() -> crate::operation::post_content::builders::PostContentOutputBuilder {
252        crate::operation::post_content::builders::PostContentOutputBuilder::default()
253    }
254}
255
256/// A builder for [`PostContentOutput`](crate::operation::post_content::PostContentOutput).
257#[derive(::std::default::Default)]
258#[non_exhaustive]
259pub struct PostContentOutputBuilder {
260    pub(crate) content_type: ::std::option::Option<::std::string::String>,
261    pub(crate) intent_name: ::std::option::Option<::std::string::String>,
262    pub(crate) nlu_intent_confidence: ::std::option::Option<::std::string::String>,
263    pub(crate) alternative_intents: ::std::option::Option<::std::string::String>,
264    pub(crate) slots: ::std::option::Option<::std::string::String>,
265    pub(crate) session_attributes: ::std::option::Option<::std::string::String>,
266    pub(crate) sentiment_response: ::std::option::Option<::std::string::String>,
267    pub(crate) message: ::std::option::Option<::std::string::String>,
268    pub(crate) encoded_message: ::std::option::Option<::std::string::String>,
269    pub(crate) message_format: ::std::option::Option<crate::types::MessageFormatType>,
270    pub(crate) dialog_state: ::std::option::Option<crate::types::DialogState>,
271    pub(crate) slot_to_elicit: ::std::option::Option<::std::string::String>,
272    pub(crate) input_transcript: ::std::option::Option<::std::string::String>,
273    pub(crate) encoded_input_transcript: ::std::option::Option<::std::string::String>,
274    pub(crate) audio_stream: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
275    pub(crate) bot_version: ::std::option::Option<::std::string::String>,
276    pub(crate) session_id: ::std::option::Option<::std::string::String>,
277    pub(crate) active_contexts: ::std::option::Option<::std::string::String>,
278    _request_id: Option<String>,
279}
280impl PostContentOutputBuilder {
281    /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
282    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283        self.content_type = ::std::option::Option::Some(input.into());
284        self
285    }
286    /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
287    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
288        self.content_type = input;
289        self
290    }
291    /// <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
292    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
293        &self.content_type
294    }
295    /// <p>Current user intent that Amazon Lex is aware of.</p>
296    pub fn intent_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
297        self.intent_name = ::std::option::Option::Some(input.into());
298        self
299    }
300    /// <p>Current user intent that Amazon Lex is aware of.</p>
301    pub fn set_intent_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
302        self.intent_name = input;
303        self
304    }
305    /// <p>Current user intent that Amazon Lex is aware of.</p>
306    pub fn get_intent_name(&self) -> &::std::option::Option<::std::string::String> {
307        &self.intent_name
308    }
309    /// <p>Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the user's intent. The score is between 0.0 and 1.0.</p>
310    /// <p>The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex.</p>
311    pub fn nlu_intent_confidence(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
312        self.nlu_intent_confidence = ::std::option::Option::Some(input.into());
313        self
314    }
315    /// <p>Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the user's intent. The score is between 0.0 and 1.0.</p>
316    /// <p>The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex.</p>
317    pub fn set_nlu_intent_confidence(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
318        self.nlu_intent_confidence = input;
319        self
320    }
321    /// <p>Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the user's intent. The score is between 0.0 and 1.0.</p>
322    /// <p>The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex.</p>
323    pub fn get_nlu_intent_confidence(&self) -> &::std::option::Option<::std::string::String> {
324        &self.nlu_intent_confidence
325    }
326    /// <p>One to four alternative intents that may be applicable to the user's intent.</p>
327    /// <p>Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's intent. The intents are sorted by the confidence score.</p>
328    pub fn alternative_intents(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
329        self.alternative_intents = ::std::option::Option::Some(input.into());
330        self
331    }
332    /// <p>One to four alternative intents that may be applicable to the user's intent.</p>
333    /// <p>Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's intent. The intents are sorted by the confidence score.</p>
334    pub fn set_alternative_intents(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
335        self.alternative_intents = input;
336        self
337    }
338    /// <p>One to four alternative intents that may be applicable to the user's intent.</p>
339    /// <p>Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's intent. The intents are sorted by the confidence score.</p>
340    pub fn get_alternative_intents(&self) -> &::std::option::Option<::std::string::String> {
341        &self.alternative_intents
342    }
343    /// <p>Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation. The field is base-64 encoded.</p>
344    /// <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>
345    pub fn slots(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346        self.slots = ::std::option::Option::Some(input.into());
347        self
348    }
349    /// <p>Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation. The field is base-64 encoded.</p>
350    /// <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>
351    pub fn set_slots(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
352        self.slots = input;
353        self
354    }
355    /// <p>Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation. The field is base-64 encoded.</p>
356    /// <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>
357    pub fn get_slots(&self) -> &::std::option::Option<::std::string::String> {
358        &self.slots
359    }
360    /// <p>Map of key/value pairs representing the session-specific context information.</p>
361    pub fn session_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
362        self.session_attributes = ::std::option::Option::Some(input.into());
363        self
364    }
365    /// <p>Map of key/value pairs representing the session-specific context information.</p>
366    pub fn set_session_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
367        self.session_attributes = input;
368        self
369    }
370    /// <p>Map of key/value pairs representing the session-specific context information.</p>
371    pub fn get_session_attributes(&self) -> &::std::option::Option<::std::string::String> {
372        &self.session_attributes
373    }
374    /// <p>The sentiment expressed in an utterance.</p>
375    /// <p>When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.</p>
376    pub fn sentiment_response(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
377        self.sentiment_response = ::std::option::Option::Some(input.into());
378        self
379    }
380    /// <p>The sentiment expressed in an utterance.</p>
381    /// <p>When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.</p>
382    pub fn set_sentiment_response(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
383        self.sentiment_response = input;
384        self
385    }
386    /// <p>The sentiment expressed in an utterance.</p>
387    /// <p>When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.</p>
388    pub fn get_sentiment_response(&self) -> &::std::option::Option<::std::string::String> {
389        &self.sentiment_response
390    }
391    /// <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>
392    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
393    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
394    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
395    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
396    #[deprecated(
397        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."
398    )]
399    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
400        self.message = ::std::option::Option::Some(input.into());
401        self
402    }
403    /// <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>
404    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
405    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
406    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
407    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
408    #[deprecated(
409        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."
410    )]
411    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
412        self.message = input;
413        self
414    }
415    /// <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>
416    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
417    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
418    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
419    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
420    #[deprecated(
421        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."
422    )]
423    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
424        &self.message
425    }
426    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
427    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
428    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
429    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
430    /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
431    pub fn encoded_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
432        self.encoded_message = ::std::option::Option::Some(input.into());
433        self
434    }
435    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
436    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
437    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
438    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
439    /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
440    pub fn set_encoded_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
441        self.encoded_message = input;
442        self
443    }
444    /// <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p>
445    /// <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p>
446    /// <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <code>msg-prompts-formats</code>.</p>
447    /// <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>
448    /// <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
449    pub fn get_encoded_message(&self) -> &::std::option::Option<::std::string::String> {
450        &self.encoded_message
451    }
452    /// <p>The format of the response message. One of the following values:</p>
453    /// <ul>
454    /// <li>
455    /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
456    /// <li>
457    /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
458    /// <li>
459    /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
460    /// <li>
461    /// <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>
462    /// </ul>
463    pub fn message_format(mut self, input: crate::types::MessageFormatType) -> Self {
464        self.message_format = ::std::option::Option::Some(input);
465        self
466    }
467    /// <p>The format of the response message. One of the following values:</p>
468    /// <ul>
469    /// <li>
470    /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
471    /// <li>
472    /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
473    /// <li>
474    /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
475    /// <li>
476    /// <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>
477    /// </ul>
478    pub fn set_message_format(mut self, input: ::std::option::Option<crate::types::MessageFormatType>) -> Self {
479        self.message_format = input;
480        self
481    }
482    /// <p>The format of the response message. One of the following values:</p>
483    /// <ul>
484    /// <li>
485    /// <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li>
486    /// <li>
487    /// <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li>
488    /// <li>
489    /// <p><code>SSML</code> - The message contains text formatted for voice output.</p></li>
490    /// <li>
491    /// <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>
492    /// </ul>
493    pub fn get_message_format(&self) -> &::std::option::Option<crate::types::MessageFormatType> {
494        &self.message_format
495    }
496    /// <p>Identifies the current state of the user interaction. Amazon Lex returns one of the following values as <code>dialogState</code>. The client can optionally use this information to customize the user interface.</p>
497    /// <ul>
498    /// <li>
499    /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent. Consider the following examples:</p>
500    /// <p>For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent from this utterance, it will return this dialog state.</p></li>
501    /// <li>
502    /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response.</p>
503    /// <p>For example, Amazon Lex wants user confirmation before fulfilling an intent. Instead of a simple "yes" or "no" response, a user might respond with additional information. For example, "yes, but make it a thick crust pizza" or "no, I want to order a drink." Amazon Lex can process such additional information (in these examples, update the crust type slot or change the intent from OrderPizza to OrderDrink).</p></li>
504    /// <li>
505    /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p>
506    /// <p>For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately.</p></li>
507    /// <li>
508    /// <p><code>Fulfilled</code> - Conveys that the Lambda function has successfully fulfilled the intent.</p></li>
509    /// <li>
510    /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the request.</p></li>
511    /// <li>
512    /// <p><code>Failed</code> - Conveys that the conversation with the user failed.</p>
513    /// <p>This can happen for various reasons, including that the user does not provide an appropriate response to prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or if the Lambda function fails to fulfill the intent.</p></li>
514    /// </ul>
515    pub fn dialog_state(mut self, input: crate::types::DialogState) -> Self {
516        self.dialog_state = ::std::option::Option::Some(input);
517        self
518    }
519    /// <p>Identifies the current state of the user interaction. Amazon Lex returns one of the following values as <code>dialogState</code>. The client can optionally use this information to customize the user interface.</p>
520    /// <ul>
521    /// <li>
522    /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent. Consider the following examples:</p>
523    /// <p>For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent from this utterance, it will return this dialog state.</p></li>
524    /// <li>
525    /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response.</p>
526    /// <p>For example, Amazon Lex wants user confirmation before fulfilling an intent. Instead of a simple "yes" or "no" response, a user might respond with additional information. For example, "yes, but make it a thick crust pizza" or "no, I want to order a drink." Amazon Lex can process such additional information (in these examples, update the crust type slot or change the intent from OrderPizza to OrderDrink).</p></li>
527    /// <li>
528    /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p>
529    /// <p>For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately.</p></li>
530    /// <li>
531    /// <p><code>Fulfilled</code> - Conveys that the Lambda function has successfully fulfilled the intent.</p></li>
532    /// <li>
533    /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the request.</p></li>
534    /// <li>
535    /// <p><code>Failed</code> - Conveys that the conversation with the user failed.</p>
536    /// <p>This can happen for various reasons, including that the user does not provide an appropriate response to prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or if the Lambda function fails to fulfill the intent.</p></li>
537    /// </ul>
538    pub fn set_dialog_state(mut self, input: ::std::option::Option<crate::types::DialogState>) -> Self {
539        self.dialog_state = input;
540        self
541    }
542    /// <p>Identifies the current state of the user interaction. Amazon Lex returns one of the following values as <code>dialogState</code>. The client can optionally use this information to customize the user interface.</p>
543    /// <ul>
544    /// <li>
545    /// <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent. Consider the following examples:</p>
546    /// <p>For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent from this utterance, it will return this dialog state.</p></li>
547    /// <li>
548    /// <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response.</p>
549    /// <p>For example, Amazon Lex wants user confirmation before fulfilling an intent. Instead of a simple "yes" or "no" response, a user might respond with additional information. For example, "yes, but make it a thick crust pizza" or "no, I want to order a drink." Amazon Lex can process such additional information (in these examples, update the crust type slot or change the intent from OrderPizza to OrderDrink).</p></li>
550    /// <li>
551    /// <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p>
552    /// <p>For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately.</p></li>
553    /// <li>
554    /// <p><code>Fulfilled</code> - Conveys that the Lambda function has successfully fulfilled the intent.</p></li>
555    /// <li>
556    /// <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the request.</p></li>
557    /// <li>
558    /// <p><code>Failed</code> - Conveys that the conversation with the user failed.</p>
559    /// <p>This can happen for various reasons, including that the user does not provide an appropriate response to prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or if the Lambda function fails to fulfill the intent.</p></li>
560    /// </ul>
561    pub fn get_dialog_state(&self) -> &::std::option::Option<crate::types::DialogState> {
562        &self.dialog_state
563    }
564    /// <p>If the <code>dialogState</code> value is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
565    pub fn slot_to_elicit(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
566        self.slot_to_elicit = ::std::option::Option::Some(input.into());
567        self
568    }
569    /// <p>If the <code>dialogState</code> value is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
570    pub fn set_slot_to_elicit(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
571        self.slot_to_elicit = input;
572        self
573    }
574    /// <p>If the <code>dialogState</code> value is <code>ElicitSlot</code>, returns the name of the slot for which Amazon Lex is eliciting a value.</p>
575    pub fn get_slot_to_elicit(&self) -> &::std::option::Option<::std::string::String> {
576        &self.slot_to_elicit
577    }
578    /// <p>The text used to process the request.</p>
579    /// <p>You can use this field 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. In all other locales, the <code>inputTranscript</code> field is null. You should use the <code>encodedInputTranscript</code> field instead.</p>
580    /// <p>If the input was an audio stream, the <code>inputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
581    #[deprecated(
582        note = "The inputTranscript field is deprecated, use the encodedInputTranscript field instead. The inputTranscript 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."
583    )]
584    pub fn input_transcript(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
585        self.input_transcript = ::std::option::Option::Some(input.into());
586        self
587    }
588    /// <p>The text used to process the request.</p>
589    /// <p>You can use this field 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. In all other locales, the <code>inputTranscript</code> field is null. You should use the <code>encodedInputTranscript</code> field instead.</p>
590    /// <p>If the input was an audio stream, the <code>inputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
591    #[deprecated(
592        note = "The inputTranscript field is deprecated, use the encodedInputTranscript field instead. The inputTranscript 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."
593    )]
594    pub fn set_input_transcript(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
595        self.input_transcript = input;
596        self
597    }
598    /// <p>The text used to process the request.</p>
599    /// <p>You can use this field 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. In all other locales, the <code>inputTranscript</code> field is null. You should use the <code>encodedInputTranscript</code> field instead.</p>
600    /// <p>If the input was an audio stream, the <code>inputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
601    #[deprecated(
602        note = "The inputTranscript field is deprecated, use the encodedInputTranscript field instead. The inputTranscript 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."
603    )]
604    pub fn get_input_transcript(&self) -> &::std::option::Option<::std::string::String> {
605        &self.input_transcript
606    }
607    /// <p>The text used to process the request.</p>
608    /// <p>If the input was an audio stream, the <code>encodedInputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
609    /// <p>The <code>encodedInputTranscript</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
610    pub fn encoded_input_transcript(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
611        self.encoded_input_transcript = ::std::option::Option::Some(input.into());
612        self
613    }
614    /// <p>The text used to process the request.</p>
615    /// <p>If the input was an audio stream, the <code>encodedInputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
616    /// <p>The <code>encodedInputTranscript</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
617    pub fn set_encoded_input_transcript(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
618        self.encoded_input_transcript = input;
619        self
620    }
621    /// <p>The text used to process the request.</p>
622    /// <p>If the input was an audio stream, the <code>encodedInputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>
623    /// <p>The <code>encodedInputTranscript</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
624    pub fn get_encoded_input_transcript(&self) -> &::std::option::Option<::std::string::String> {
625        &self.encoded_input_transcript
626    }
627    /// <p>The prompt (or statement) to convey to the user. This is based on the bot configuration and context. For example, if Amazon Lex did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex sends that message in the response.</p>
628    pub fn audio_stream(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
629        self.audio_stream = ::std::option::Option::Some(input);
630        self
631    }
632    /// <p>The prompt (or statement) to convey to the user. This is based on the bot configuration and context. For example, if Amazon Lex did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex sends that message in the response.</p>
633    pub fn set_audio_stream(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
634        self.audio_stream = input;
635        self
636    }
637    /// <p>The prompt (or statement) to convey to the user. This is based on the bot configuration and context. For example, if Amazon Lex did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex sends that message in the response.</p>
638    pub fn get_audio_stream(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
639        &self.audio_stream
640    }
641    /// <p>The version of the bot that responded to the conversation. You can use this information to help determine if one version of a bot is performing better than another version.</p>
642    pub fn bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
643        self.bot_version = ::std::option::Option::Some(input.into());
644        self
645    }
646    /// <p>The version of the bot that responded to the conversation. You can use this information to help determine if one version of a bot is performing better than another version.</p>
647    pub fn set_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
648        self.bot_version = input;
649        self
650    }
651    /// <p>The version of the bot that responded to the conversation. You can use this information to help determine if one version of a bot is performing better than another version.</p>
652    pub fn get_bot_version(&self) -> &::std::option::Option<::std::string::String> {
653        &self.bot_version
654    }
655    /// <p>The unique identifier for the session.</p>
656    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
657        self.session_id = ::std::option::Option::Some(input.into());
658        self
659    }
660    /// <p>The unique identifier for the session.</p>
661    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
662        self.session_id = input;
663        self
664    }
665    /// <p>The unique identifier for the session.</p>
666    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
667        &self.session_id
668    }
669    /// <p>A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the <code>PostContent</code>, <code>PostText</code>, or <code>PutSession</code> operation.</p>
670    /// <p>You can use a context to control the intents that can follow up an intent, or to modify the operation of your application.</p>
671    pub fn active_contexts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
672        self.active_contexts = ::std::option::Option::Some(input.into());
673        self
674    }
675    /// <p>A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the <code>PostContent</code>, <code>PostText</code>, or <code>PutSession</code> operation.</p>
676    /// <p>You can use a context to control the intents that can follow up an intent, or to modify the operation of your application.</p>
677    pub fn set_active_contexts(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
678        self.active_contexts = input;
679        self
680    }
681    /// <p>A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the <code>PostContent</code>, <code>PostText</code>, or <code>PutSession</code> operation.</p>
682    /// <p>You can use a context to control the intents that can follow up an intent, or to modify the operation of your application.</p>
683    pub fn get_active_contexts(&self) -> &::std::option::Option<::std::string::String> {
684        &self.active_contexts
685    }
686    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
687        self._request_id = Some(request_id.into());
688        self
689    }
690
691    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
692        self._request_id = request_id;
693        self
694    }
695    /// Consumes the builder and constructs a [`PostContentOutput`](crate::operation::post_content::PostContentOutput).
696    pub fn build(self) -> crate::operation::post_content::PostContentOutput {
697        crate::operation::post_content::PostContentOutput {
698            content_type: self.content_type,
699            intent_name: self.intent_name,
700            nlu_intent_confidence: self.nlu_intent_confidence,
701            alternative_intents: self.alternative_intents,
702            slots: self.slots,
703            session_attributes: self.session_attributes,
704            sentiment_response: self.sentiment_response,
705            message: self.message,
706            encoded_message: self.encoded_message,
707            message_format: self.message_format,
708            dialog_state: self.dialog_state,
709            slot_to_elicit: self.slot_to_elicit,
710            input_transcript: self.input_transcript,
711            encoded_input_transcript: self.encoded_input_transcript,
712            audio_stream: self.audio_stream.unwrap_or_default(),
713            bot_version: self.bot_version,
714            session_id: self.session_id,
715            active_contexts: self.active_contexts,
716            _request_id: self._request_id,
717        }
718    }
719}
720impl ::std::fmt::Debug for PostContentOutputBuilder {
721    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
722        let mut formatter = f.debug_struct("PostContentOutputBuilder");
723        formatter.field("content_type", &self.content_type);
724        formatter.field("intent_name", &self.intent_name);
725        formatter.field("nlu_intent_confidence", &self.nlu_intent_confidence);
726        formatter.field("alternative_intents", &self.alternative_intents);
727        formatter.field("slots", &self.slots);
728        formatter.field("session_attributes", &self.session_attributes);
729        formatter.field("sentiment_response", &self.sentiment_response);
730        formatter.field("message", &"*** Sensitive Data Redacted ***");
731        formatter.field("encoded_message", &"*** Sensitive Data Redacted ***");
732        formatter.field("message_format", &self.message_format);
733        formatter.field("dialog_state", &self.dialog_state);
734        formatter.field("slot_to_elicit", &self.slot_to_elicit);
735        formatter.field("input_transcript", &self.input_transcript);
736        formatter.field("encoded_input_transcript", &"*** Sensitive Data Redacted ***");
737        formatter.field("audio_stream", &self.audio_stream);
738        formatter.field("bot_version", &self.bot_version);
739        formatter.field("session_id", &self.session_id);
740        formatter.field("active_contexts", &"*** Sensitive Data Redacted ***");
741        formatter.field("_request_id", &self._request_id);
742        formatter.finish()
743    }
744}