aws_sdk_lexruntime/operation/get_session/
_get_session_input.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]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetSessionInput {
6    /// <p>The name of the bot that contains the session data.</p>
7    pub bot_name: ::std::option::Option<::std::string::String>,
8    /// <p>The alias in use for the bot that contains the session data.</p>
9    pub bot_alias: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.</p>
11    pub user_id: ::std::option::Option<::std::string::String>,
12    /// <p>A string used to filter the intents returned in the <code>recentIntentSummaryView</code> structure.</p>
13    /// <p>When you specify a filter, only intents with their <code>checkpointLabel</code> field set to that string are returned.</p>
14    pub checkpoint_label_filter: ::std::option::Option<::std::string::String>,
15}
16impl GetSessionInput {
17    /// <p>The name of the bot that contains the session data.</p>
18    pub fn bot_name(&self) -> ::std::option::Option<&str> {
19        self.bot_name.as_deref()
20    }
21    /// <p>The alias in use for the bot that contains the session data.</p>
22    pub fn bot_alias(&self) -> ::std::option::Option<&str> {
23        self.bot_alias.as_deref()
24    }
25    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.</p>
26    pub fn user_id(&self) -> ::std::option::Option<&str> {
27        self.user_id.as_deref()
28    }
29    /// <p>A string used to filter the intents returned in the <code>recentIntentSummaryView</code> structure.</p>
30    /// <p>When you specify a filter, only intents with their <code>checkpointLabel</code> field set to that string are returned.</p>
31    pub fn checkpoint_label_filter(&self) -> ::std::option::Option<&str> {
32        self.checkpoint_label_filter.as_deref()
33    }
34}
35impl GetSessionInput {
36    /// Creates a new builder-style object to manufacture [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
37    pub fn builder() -> crate::operation::get_session::builders::GetSessionInputBuilder {
38        crate::operation::get_session::builders::GetSessionInputBuilder::default()
39    }
40}
41
42/// A builder for [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct GetSessionInputBuilder {
46    pub(crate) bot_name: ::std::option::Option<::std::string::String>,
47    pub(crate) bot_alias: ::std::option::Option<::std::string::String>,
48    pub(crate) user_id: ::std::option::Option<::std::string::String>,
49    pub(crate) checkpoint_label_filter: ::std::option::Option<::std::string::String>,
50}
51impl GetSessionInputBuilder {
52    /// <p>The name of the bot that contains the session data.</p>
53    /// This field is required.
54    pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.bot_name = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The name of the bot that contains the session data.</p>
59    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.bot_name = input;
61        self
62    }
63    /// <p>The name of the bot that contains the session data.</p>
64    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.bot_name
66    }
67    /// <p>The alias in use for the bot that contains the session data.</p>
68    /// This field is required.
69    pub fn bot_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.bot_alias = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The alias in use for the bot that contains the session data.</p>
74    pub fn set_bot_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.bot_alias = input;
76        self
77    }
78    /// <p>The alias in use for the bot that contains the session data.</p>
79    pub fn get_bot_alias(&self) -> &::std::option::Option<::std::string::String> {
80        &self.bot_alias
81    }
82    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.</p>
83    /// This field is required.
84    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.user_id = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.</p>
89    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.user_id = input;
91        self
92    }
93    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.</p>
94    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
95        &self.user_id
96    }
97    /// <p>A string used to filter the intents returned in the <code>recentIntentSummaryView</code> structure.</p>
98    /// <p>When you specify a filter, only intents with their <code>checkpointLabel</code> field set to that string are returned.</p>
99    pub fn checkpoint_label_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.checkpoint_label_filter = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>A string used to filter the intents returned in the <code>recentIntentSummaryView</code> structure.</p>
104    /// <p>When you specify a filter, only intents with their <code>checkpointLabel</code> field set to that string are returned.</p>
105    pub fn set_checkpoint_label_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.checkpoint_label_filter = input;
107        self
108    }
109    /// <p>A string used to filter the intents returned in the <code>recentIntentSummaryView</code> structure.</p>
110    /// <p>When you specify a filter, only intents with their <code>checkpointLabel</code> field set to that string are returned.</p>
111    pub fn get_checkpoint_label_filter(&self) -> &::std::option::Option<::std::string::String> {
112        &self.checkpoint_label_filter
113    }
114    /// Consumes the builder and constructs a [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
115    pub fn build(self) -> ::std::result::Result<crate::operation::get_session::GetSessionInput, ::aws_smithy_types::error::operation::BuildError> {
116        ::std::result::Result::Ok(crate::operation::get_session::GetSessionInput {
117            bot_name: self.bot_name,
118            bot_alias: self.bot_alias,
119            user_id: self.user_id,
120            checkpoint_label_filter: self.checkpoint_label_filter,
121        })
122    }
123}