aws_sdk_lexruntime/operation/get_session/
_get_session_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetSessionInput {
6 pub bot_name: ::std::option::Option<::std::string::String>,
8 pub bot_alias: ::std::option::Option<::std::string::String>,
10 pub user_id: ::std::option::Option<::std::string::String>,
12 pub checkpoint_label_filter: ::std::option::Option<::std::string::String>,
15}
16impl GetSessionInput {
17 pub fn bot_name(&self) -> ::std::option::Option<&str> {
19 self.bot_name.as_deref()
20 }
21 pub fn bot_alias(&self) -> ::std::option::Option<&str> {
23 self.bot_alias.as_deref()
24 }
25 pub fn user_id(&self) -> ::std::option::Option<&str> {
27 self.user_id.as_deref()
28 }
29 pub fn checkpoint_label_filter(&self) -> ::std::option::Option<&str> {
32 self.checkpoint_label_filter.as_deref()
33 }
34}
35impl GetSessionInput {
36 pub fn builder() -> crate::operation::get_session::builders::GetSessionInputBuilder {
38 crate::operation::get_session::builders::GetSessionInputBuilder::default()
39 }
40}
41
42#[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 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 pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.bot_name = input;
61 self
62 }
63 pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
65 &self.bot_name
66 }
67 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 pub fn set_bot_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.bot_alias = input;
76 self
77 }
78 pub fn get_bot_alias(&self) -> &::std::option::Option<::std::string::String> {
80 &self.bot_alias
81 }
82 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 pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90 self.user_id = input;
91 self
92 }
93 pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
95 &self.user_id
96 }
97 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 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 pub fn get_checkpoint_label_filter(&self) -> &::std::option::Option<::std::string::String> {
112 &self.checkpoint_label_filter
113 }
114 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}