aws_sdk_lexruntime/client/put_session.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`PutSession`](crate::operation::put_session::builders::PutSessionFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`bot_name(impl Into<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::bot_name) / [`set_bot_name(Option<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_bot_name):<br>required: **true**<br><p>The name of the bot that contains the session data.</p><br>
7 /// - [`bot_alias(impl Into<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::bot_alias) / [`set_bot_alias(Option<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_bot_alias):<br>required: **true**<br><p>The alias in use for the bot that contains the session data.</p><br>
8 /// - [`user_id(impl Into<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::user_id) / [`set_user_id(Option<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_user_id):<br>required: **true**<br><p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.</p><br>
9 /// - [`session_attributes(impl Into<String>, impl Into<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::session_attributes) / [`set_session_attributes(Option<HashMap::<String, String>>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_session_attributes):<br>required: **false**<br><p>Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.</p><br>
10 /// - [`dialog_action(DialogAction)`](crate::operation::put_session::builders::PutSessionFluentBuilder::dialog_action) / [`set_dialog_action(Option<DialogAction>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_dialog_action):<br>required: **false**<br><p>Sets the next action that the bot should take to fulfill the conversation.</p><br>
11 /// - [`recent_intent_summary_view(IntentSummary)`](crate::operation::put_session::builders::PutSessionFluentBuilder::recent_intent_summary_view) / [`set_recent_intent_summary_view(Option<Vec::<IntentSummary>>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_recent_intent_summary_view):<br>required: **false**<br><p>A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.</p> <p>An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:</p> <ul> <li> <p><code>intentName</code></p></li> <li> <p>slot names</p></li> <li> <p><code>slotToElict</code></p></li> </ul> <p>If you send the <code>recentIntentSummaryView</code> parameter in a <code>PutSession</code> request, the contents of the new summary view replaces the old summary view. For example, if a <code>GetSession</code> request returns three intents in the summary view and you call <code>PutSession</code> with one intent in the summary view, the next call to <code>GetSession</code> will only return one intent.</p><br>
12 /// - [`accept(impl Into<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::accept) / [`set_accept(Option<String>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_accept):<br>required: **false**<br><p>The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.</p> <ul> <li> <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex returns text in the response.</p></li> <li> <p>If the value begins with <code>audio/</code>, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech in the configuration that you specify. For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex returns speech in the MPEG format.</p></li> <li> <p>If the value is <code>audio/pcm</code>, the speech is returned as <code>audio/pcm</code> in 16-bit, little endian format.</p></li> <li> <p>The following are the accepted values:</p> <ul> <li> <p><code>audio/mpeg</code></p></li> <li> <p><code>audio/ogg</code></p></li> <li> <p><code>audio/pcm</code></p></li> <li> <p><code>audio/*</code> (defaults to mpeg)</p></li> <li> <p><code>text/plain; charset=utf-8</code></p></li> </ul></li> </ul><br>
13 /// - [`active_contexts(ActiveContext)`](crate::operation::put_session::builders::PutSessionFluentBuilder::active_contexts) / [`set_active_contexts(Option<Vec::<ActiveContext>>)`](crate::operation::put_session::builders::PutSessionFluentBuilder::set_active_contexts):<br>required: **false**<br><p>A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,</p> <p>If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.</p><br>
14 /// - On success, responds with [`PutSessionOutput`](crate::operation::put_session::PutSessionOutput) with field(s):
15 /// - [`content_type(Option<String>)`](crate::operation::put_session::PutSessionOutput::content_type): <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
16 /// - [`intent_name(Option<String>)`](crate::operation::put_session::PutSessionOutput::intent_name): <p>The name of the current intent.</p>
17 /// - [`slots(Option<String>)`](crate::operation::put_session::PutSessionOutput::slots): <p>Map of zero or more intent slots Amazon Lex detected from the user input during the conversation.</p> <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>
18 /// - [`session_attributes(Option<String>)`](crate::operation::put_session::PutSessionOutput::session_attributes): <p>Map of key/value pairs representing session-specific context information.</p>
19 /// - [`message(Option<String>)`](crate::operation::put_session::PutSessionOutput::message): <p>The next message that should be presented to the user.</p> <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>
20 /// - [`encoded_message(Option<String>)`](crate::operation::put_session::PutSessionOutput::encoded_message): <p>The next message that should be presented to the user.</p> <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>
21 /// - [`message_format(Option<MessageFormatType>)`](crate::operation::put_session::PutSessionOutput::message_format): <p>The format of the response message. One of the following values:</p> <ul> <li> <p><code>PlainText</code> - The message contains plain UTF-8 text.</p></li> <li> <p><code>CustomPayload</code> - The message is a custom format for the client.</p></li> <li> <p><code>SSML</code> - The message contains text formatted for voice output.</p></li> <li> <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> </ul>
22 /// - [`dialog_state(Option<DialogState>)`](crate::operation::put_session::PutSessionOutput::dialog_state): <p></p> <ul> <li> <p><code>ConfirmIntent</code> - Amazon Lex is expecting a "yes" or "no" response to confirm the intent before fulfilling an intent.</p></li> <li> <p><code>ElicitIntent</code> - Amazon Lex wants to elicit the user's intent.</p></li> <li> <p><code>ElicitSlot</code> - Amazon Lex is expecting the value of a slot for the current intent.</p></li> <li> <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> <li> <p><code>Fulfilled</code> - Conveys that the Lambda function has sucessfully fulfilled the intent.</p></li> <li> <p><code>ReadyForFulfillment</code> - Conveys that the client has to fulfill the intent.</p></li> </ul>
23 /// - [`slot_to_elicit(Option<String>)`](crate::operation::put_session::PutSessionOutput::slot_to_elicit): <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>
24 /// - [`audio_stream(ByteStream)`](crate::operation::put_session::PutSessionOutput::audio_stream): <p>The audio version of the message to convey to the user.</p>
25 /// - [`session_id(Option<String>)`](crate::operation::put_session::PutSessionOutput::session_id): <p>A unique identifier for the session.</p>
26 /// - [`active_contexts(Option<String>)`](crate::operation::put_session::PutSessionOutput::active_contexts): <p>A list of active contexts for the session.</p>
27 /// - On failure, responds with [`SdkError<PutSessionError>`](crate::operation::put_session::PutSessionError)
28 pub fn put_session(&self) -> crate::operation::put_session::builders::PutSessionFluentBuilder {
29 crate::operation::put_session::builders::PutSessionFluentBuilder::new(self.handle.clone())
30 }
31}