aws_sdk_lexruntimev2/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 identifier of the bot that contains the session data.</p>
7    pub bot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The alias identifier in use for the bot that contains the session data.</p>
9    pub bot_alias_id: ::std::option::Option<::std::string::String>,
10    /// <p>The locale where the session is in use.</p>
11    pub locale_id: ::std::option::Option<::std::string::String>,
12    /// <p>The identifier of the session to return.</p>
13    pub session_id: ::std::option::Option<::std::string::String>,
14}
15impl GetSessionInput {
16    /// <p>The identifier of the bot that contains the session data.</p>
17    pub fn bot_id(&self) -> ::std::option::Option<&str> {
18        self.bot_id.as_deref()
19    }
20    /// <p>The alias identifier in use for the bot that contains the session data.</p>
21    pub fn bot_alias_id(&self) -> ::std::option::Option<&str> {
22        self.bot_alias_id.as_deref()
23    }
24    /// <p>The locale where the session is in use.</p>
25    pub fn locale_id(&self) -> ::std::option::Option<&str> {
26        self.locale_id.as_deref()
27    }
28    /// <p>The identifier of the session to return.</p>
29    pub fn session_id(&self) -> ::std::option::Option<&str> {
30        self.session_id.as_deref()
31    }
32}
33impl GetSessionInput {
34    /// Creates a new builder-style object to manufacture [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
35    pub fn builder() -> crate::operation::get_session::builders::GetSessionInputBuilder {
36        crate::operation::get_session::builders::GetSessionInputBuilder::default()
37    }
38}
39
40/// A builder for [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetSessionInputBuilder {
44    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
45    pub(crate) bot_alias_id: ::std::option::Option<::std::string::String>,
46    pub(crate) locale_id: ::std::option::Option<::std::string::String>,
47    pub(crate) session_id: ::std::option::Option<::std::string::String>,
48}
49impl GetSessionInputBuilder {
50    /// <p>The identifier of the bot that contains the session data.</p>
51    /// This field is required.
52    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.bot_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The identifier of the bot that contains the session data.</p>
57    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.bot_id = input;
59        self
60    }
61    /// <p>The identifier of the bot that contains the session data.</p>
62    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.bot_id
64    }
65    /// <p>The alias identifier in use for the bot that contains the session data.</p>
66    /// This field is required.
67    pub fn bot_alias_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.bot_alias_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The alias identifier in use for the bot that contains the session data.</p>
72    pub fn set_bot_alias_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.bot_alias_id = input;
74        self
75    }
76    /// <p>The alias identifier in use for the bot that contains the session data.</p>
77    pub fn get_bot_alias_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.bot_alias_id
79    }
80    /// <p>The locale where the session is in use.</p>
81    /// This field is required.
82    pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.locale_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The locale where the session is in use.</p>
87    pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.locale_id = input;
89        self
90    }
91    /// <p>The locale where the session is in use.</p>
92    pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.locale_id
94    }
95    /// <p>The identifier of the session to return.</p>
96    /// This field is required.
97    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.session_id = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The identifier of the session to return.</p>
102    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.session_id = input;
104        self
105    }
106    /// <p>The identifier of the session to return.</p>
107    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
108        &self.session_id
109    }
110    /// Consumes the builder and constructs a [`GetSessionInput`](crate::operation::get_session::GetSessionInput).
111    pub fn build(self) -> ::std::result::Result<crate::operation::get_session::GetSessionInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::get_session::GetSessionInput {
113            bot_id: self.bot_id,
114            bot_alias_id: self.bot_alias_id,
115            locale_id: self.locale_id,
116            session_id: self.session_id,
117        })
118    }
119}