Struct aws_sdk_lexruntimev2::client::fluent_builders::PutSession
source · pub struct PutSession { /* private fields */ }Expand description
Fluent builder constructing a request to PutSession.
Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.
Implementations§
source§impl PutSession
impl PutSession
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<PutSession, AwsResponseRetryClassifier>, SdkError<PutSessionError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<PutSession, AwsResponseRetryClassifier>, SdkError<PutSessionError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(self) -> Result<PutSessionOutput, SdkError<PutSessionError>>
pub async fn send(self) -> Result<PutSessionOutput, SdkError<PutSessionError>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn bot_id(self, input: impl Into<String>) -> Self
pub fn bot_id(self, input: impl Into<String>) -> Self
The identifier of the bot that receives the session data.
sourcepub fn set_bot_id(self, input: Option<String>) -> Self
pub fn set_bot_id(self, input: Option<String>) -> Self
The identifier of the bot that receives the session data.
sourcepub fn bot_alias_id(self, input: impl Into<String>) -> Self
pub fn bot_alias_id(self, input: impl Into<String>) -> Self
The alias identifier of the bot that receives the session data.
sourcepub fn set_bot_alias_id(self, input: Option<String>) -> Self
pub fn set_bot_alias_id(self, input: Option<String>) -> Self
The alias identifier of the bot that receives the session data.
sourcepub fn locale_id(self, input: impl Into<String>) -> Self
pub fn locale_id(self, input: impl Into<String>) -> Self
The locale where the session is in use.
sourcepub fn set_locale_id(self, input: Option<String>) -> Self
pub fn set_locale_id(self, input: Option<String>) -> Self
The locale where the session is in use.
sourcepub fn session_id(self, input: impl Into<String>) -> Self
pub fn session_id(self, input: impl Into<String>) -> Self
The identifier of the session that receives the session data.
sourcepub fn set_session_id(self, input: Option<String>) -> Self
pub fn set_session_id(self, input: Option<String>) -> Self
The identifier of the session that receives the session data.
sourcepub fn messages(self, input: Message) -> Self
pub fn messages(self, input: Message) -> Self
Appends an item to messages.
To override the contents of this collection use set_messages.
A list of messages to send to the user. Messages are sent in the order that they are defined in the list.
sourcepub fn set_messages(self, input: Option<Vec<Message>>) -> Self
pub fn set_messages(self, input: Option<Vec<Message>>) -> Self
A list of messages to send to the user. Messages are sent in the order that they are defined in the list.
sourcepub fn session_state(self, input: SessionState) -> Self
pub fn session_state(self, input: SessionState) -> Self
Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.
sourcepub fn set_session_state(self, input: Option<SessionState>) -> Self
pub fn set_session_state(self, input: Option<SessionState>) -> Self
Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.
sourcepub fn request_attributes(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
pub fn request_attributes(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
Adds a key-value pair to requestAttributes.
To override the contents of this collection use set_request_attributes.
Request-specific information passed between Amazon Lex V2 and the client application.
The namespace x-amz-lex: is reserved for special attributes. Don't create any request attributes with the prefix x-amz-lex:.
sourcepub fn set_request_attributes(
self,
input: Option<HashMap<String, String>>
) -> Self
pub fn set_request_attributes(
self,
input: Option<HashMap<String, String>>
) -> Self
Request-specific information passed between Amazon Lex V2 and the client application.
The namespace x-amz-lex: is reserved for special attributes. Don't create any request attributes with the prefix x-amz-lex:.
sourcepub fn response_content_type(self, input: impl Into<String>) -> Self
pub fn response_content_type(self, input: impl Into<String>) -> Self
The message that Amazon Lex V2 returns in the response can be either text or speech depending on the value of this parameter.
-
If the value is
text/plain; charset=utf-8, Amazon Lex V2 returns text in the response.
sourcepub fn set_response_content_type(self, input: Option<String>) -> Self
pub fn set_response_content_type(self, input: Option<String>) -> Self
The message that Amazon Lex V2 returns in the response can be either text or speech depending on the value of this parameter.
-
If the value is
text/plain; charset=utf-8, Amazon Lex V2 returns text in the response.
Trait Implementations§
source§impl Clone for PutSession
impl Clone for PutSession
source§fn clone(&self) -> PutSession
fn clone(&self) -> PutSession
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more