aws_sdk_lexmodelsv2/operation/update_bot/
_update_bot_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateBotOutput {
6 pub bot_id: ::std::option::Option<::std::string::String>,
8 pub bot_name: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub role_arn: ::std::option::Option<::std::string::String>,
14 pub data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
16 pub idle_session_ttl_in_seconds: ::std::option::Option<i32>,
18 pub bot_status: ::std::option::Option<crate::types::BotStatus>,
20 pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22 pub last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24 pub bot_type: ::std::option::Option<crate::types::BotType>,
26 pub bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
28 _request_id: Option<String>,
29}
30impl UpdateBotOutput {
31 pub fn bot_id(&self) -> ::std::option::Option<&str> {
33 self.bot_id.as_deref()
34 }
35 pub fn bot_name(&self) -> ::std::option::Option<&str> {
37 self.bot_name.as_deref()
38 }
39 pub fn description(&self) -> ::std::option::Option<&str> {
41 self.description.as_deref()
42 }
43 pub fn role_arn(&self) -> ::std::option::Option<&str> {
45 self.role_arn.as_deref()
46 }
47 pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
49 self.data_privacy.as_ref()
50 }
51 pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
53 self.idle_session_ttl_in_seconds
54 }
55 pub fn bot_status(&self) -> ::std::option::Option<&crate::types::BotStatus> {
57 self.bot_status.as_ref()
58 }
59 pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61 self.creation_date_time.as_ref()
62 }
63 pub fn last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65 self.last_updated_date_time.as_ref()
66 }
67 pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
69 self.bot_type.as_ref()
70 }
71 pub fn bot_members(&self) -> &[crate::types::BotMember] {
75 self.bot_members.as_deref().unwrap_or_default()
76 }
77}
78impl ::aws_types::request_id::RequestId for UpdateBotOutput {
79 fn request_id(&self) -> Option<&str> {
80 self._request_id.as_deref()
81 }
82}
83impl UpdateBotOutput {
84 pub fn builder() -> crate::operation::update_bot::builders::UpdateBotOutputBuilder {
86 crate::operation::update_bot::builders::UpdateBotOutputBuilder::default()
87 }
88}
89
90#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
92#[non_exhaustive]
93pub struct UpdateBotOutputBuilder {
94 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
95 pub(crate) bot_name: ::std::option::Option<::std::string::String>,
96 pub(crate) description: ::std::option::Option<::std::string::String>,
97 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
98 pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
99 pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
100 pub(crate) bot_status: ::std::option::Option<crate::types::BotStatus>,
101 pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
102 pub(crate) last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
103 pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
104 pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
105 _request_id: Option<String>,
106}
107impl UpdateBotOutputBuilder {
108 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.bot_id = ::std::option::Option::Some(input.into());
111 self
112 }
113 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.bot_id = input;
116 self
117 }
118 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
120 &self.bot_id
121 }
122 pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.bot_name = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.bot_name = input;
130 self
131 }
132 pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
134 &self.bot_name
135 }
136 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.description = ::std::option::Option::Some(input.into());
139 self
140 }
141 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.description = input;
144 self
145 }
146 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
148 &self.description
149 }
150 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152 self.role_arn = ::std::option::Option::Some(input.into());
153 self
154 }
155 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157 self.role_arn = input;
158 self
159 }
160 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
162 &self.role_arn
163 }
164 pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
166 self.data_privacy = ::std::option::Option::Some(input);
167 self
168 }
169 pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
171 self.data_privacy = input;
172 self
173 }
174 pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
176 &self.data_privacy
177 }
178 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
180 self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
181 self
182 }
183 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
185 self.idle_session_ttl_in_seconds = input;
186 self
187 }
188 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
190 &self.idle_session_ttl_in_seconds
191 }
192 pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
194 self.bot_status = ::std::option::Option::Some(input);
195 self
196 }
197 pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
199 self.bot_status = input;
200 self
201 }
202 pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
204 &self.bot_status
205 }
206 pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
208 self.creation_date_time = ::std::option::Option::Some(input);
209 self
210 }
211 pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
213 self.creation_date_time = input;
214 self
215 }
216 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
218 &self.creation_date_time
219 }
220 pub fn last_updated_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
222 self.last_updated_date_time = ::std::option::Option::Some(input);
223 self
224 }
225 pub fn set_last_updated_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
227 self.last_updated_date_time = input;
228 self
229 }
230 pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
232 &self.last_updated_date_time
233 }
234 pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
236 self.bot_type = ::std::option::Option::Some(input);
237 self
238 }
239 pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
241 self.bot_type = input;
242 self
243 }
244 pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
246 &self.bot_type
247 }
248 pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
254 let mut v = self.bot_members.unwrap_or_default();
255 v.push(input);
256 self.bot_members = ::std::option::Option::Some(v);
257 self
258 }
259 pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
261 self.bot_members = input;
262 self
263 }
264 pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
266 &self.bot_members
267 }
268 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
269 self._request_id = Some(request_id.into());
270 self
271 }
272
273 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
274 self._request_id = request_id;
275 self
276 }
277 pub fn build(self) -> crate::operation::update_bot::UpdateBotOutput {
279 crate::operation::update_bot::UpdateBotOutput {
280 bot_id: self.bot_id,
281 bot_name: self.bot_name,
282 description: self.description,
283 role_arn: self.role_arn,
284 data_privacy: self.data_privacy,
285 idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
286 bot_status: self.bot_status,
287 creation_date_time: self.creation_date_time,
288 last_updated_date_time: self.last_updated_date_time,
289 bot_type: self.bot_type,
290 bot_members: self.bot_members,
291 _request_id: self._request_id,
292 }
293 }
294}