aws_sdk_lexmodelsv2/operation/create_bot/
_create_bot_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateBotOutput {
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 bot_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24 pub test_bot_alias_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26 pub bot_type: ::std::option::Option<crate::types::BotType>,
28 pub bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
30 pub error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
32 _request_id: Option<String>,
33}
34impl CreateBotOutput {
35 pub fn bot_id(&self) -> ::std::option::Option<&str> {
37 self.bot_id.as_deref()
38 }
39 pub fn bot_name(&self) -> ::std::option::Option<&str> {
41 self.bot_name.as_deref()
42 }
43 pub fn description(&self) -> ::std::option::Option<&str> {
45 self.description.as_deref()
46 }
47 pub fn role_arn(&self) -> ::std::option::Option<&str> {
49 self.role_arn.as_deref()
50 }
51 pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
53 self.data_privacy.as_ref()
54 }
55 pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
57 self.idle_session_ttl_in_seconds
58 }
59 pub fn bot_status(&self) -> ::std::option::Option<&crate::types::BotStatus> {
61 self.bot_status.as_ref()
62 }
63 pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65 self.creation_date_time.as_ref()
66 }
67 pub fn bot_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
69 self.bot_tags.as_ref()
70 }
71 pub fn test_bot_alias_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
73 self.test_bot_alias_tags.as_ref()
74 }
75 pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
77 self.bot_type.as_ref()
78 }
79 pub fn bot_members(&self) -> &[crate::types::BotMember] {
83 self.bot_members.as_deref().unwrap_or_default()
84 }
85 pub fn error_log_settings(&self) -> ::std::option::Option<&crate::types::ErrorLogSettings> {
87 self.error_log_settings.as_ref()
88 }
89}
90impl ::aws_types::request_id::RequestId for CreateBotOutput {
91 fn request_id(&self) -> Option<&str> {
92 self._request_id.as_deref()
93 }
94}
95impl CreateBotOutput {
96 pub fn builder() -> crate::operation::create_bot::builders::CreateBotOutputBuilder {
98 crate::operation::create_bot::builders::CreateBotOutputBuilder::default()
99 }
100}
101
102#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
104#[non_exhaustive]
105pub struct CreateBotOutputBuilder {
106 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
107 pub(crate) bot_name: ::std::option::Option<::std::string::String>,
108 pub(crate) description: ::std::option::Option<::std::string::String>,
109 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
110 pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
111 pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
112 pub(crate) bot_status: ::std::option::Option<crate::types::BotStatus>,
113 pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
114 pub(crate) bot_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
115 pub(crate) test_bot_alias_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
116 pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
117 pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
118 pub(crate) error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
119 _request_id: Option<String>,
120}
121impl CreateBotOutputBuilder {
122 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.bot_id = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.bot_id = input;
130 self
131 }
132 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
134 &self.bot_id
135 }
136 pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.bot_name = ::std::option::Option::Some(input.into());
139 self
140 }
141 pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.bot_name = input;
144 self
145 }
146 pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
148 &self.bot_name
149 }
150 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152 self.description = ::std::option::Option::Some(input.into());
153 self
154 }
155 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157 self.description = input;
158 self
159 }
160 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
162 &self.description
163 }
164 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.role_arn = ::std::option::Option::Some(input.into());
167 self
168 }
169 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171 self.role_arn = input;
172 self
173 }
174 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
176 &self.role_arn
177 }
178 pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
180 self.data_privacy = ::std::option::Option::Some(input);
181 self
182 }
183 pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
185 self.data_privacy = input;
186 self
187 }
188 pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
190 &self.data_privacy
191 }
192 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
194 self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
195 self
196 }
197 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
199 self.idle_session_ttl_in_seconds = input;
200 self
201 }
202 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
204 &self.idle_session_ttl_in_seconds
205 }
206 pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
208 self.bot_status = ::std::option::Option::Some(input);
209 self
210 }
211 pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
213 self.bot_status = input;
214 self
215 }
216 pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
218 &self.bot_status
219 }
220 pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
222 self.creation_date_time = ::std::option::Option::Some(input);
223 self
224 }
225 pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
227 self.creation_date_time = input;
228 self
229 }
230 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
232 &self.creation_date_time
233 }
234 pub fn bot_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
240 let mut hash_map = self.bot_tags.unwrap_or_default();
241 hash_map.insert(k.into(), v.into());
242 self.bot_tags = ::std::option::Option::Some(hash_map);
243 self
244 }
245 pub fn set_bot_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
247 self.bot_tags = input;
248 self
249 }
250 pub fn get_bot_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
252 &self.bot_tags
253 }
254 pub fn test_bot_alias_tags(
260 mut self,
261 k: impl ::std::convert::Into<::std::string::String>,
262 v: impl ::std::convert::Into<::std::string::String>,
263 ) -> Self {
264 let mut hash_map = self.test_bot_alias_tags.unwrap_or_default();
265 hash_map.insert(k.into(), v.into());
266 self.test_bot_alias_tags = ::std::option::Option::Some(hash_map);
267 self
268 }
269 pub fn set_test_bot_alias_tags(
271 mut self,
272 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
273 ) -> Self {
274 self.test_bot_alias_tags = input;
275 self
276 }
277 pub fn get_test_bot_alias_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
279 &self.test_bot_alias_tags
280 }
281 pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
283 self.bot_type = ::std::option::Option::Some(input);
284 self
285 }
286 pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
288 self.bot_type = input;
289 self
290 }
291 pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
293 &self.bot_type
294 }
295 pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
301 let mut v = self.bot_members.unwrap_or_default();
302 v.push(input);
303 self.bot_members = ::std::option::Option::Some(v);
304 self
305 }
306 pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
308 self.bot_members = input;
309 self
310 }
311 pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
313 &self.bot_members
314 }
315 pub fn error_log_settings(mut self, input: crate::types::ErrorLogSettings) -> Self {
317 self.error_log_settings = ::std::option::Option::Some(input);
318 self
319 }
320 pub fn set_error_log_settings(mut self, input: ::std::option::Option<crate::types::ErrorLogSettings>) -> Self {
322 self.error_log_settings = input;
323 self
324 }
325 pub fn get_error_log_settings(&self) -> &::std::option::Option<crate::types::ErrorLogSettings> {
327 &self.error_log_settings
328 }
329 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
330 self._request_id = Some(request_id.into());
331 self
332 }
333
334 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
335 self._request_id = request_id;
336 self
337 }
338 pub fn build(self) -> crate::operation::create_bot::CreateBotOutput {
340 crate::operation::create_bot::CreateBotOutput {
341 bot_id: self.bot_id,
342 bot_name: self.bot_name,
343 description: self.description,
344 role_arn: self.role_arn,
345 data_privacy: self.data_privacy,
346 idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
347 bot_status: self.bot_status,
348 creation_date_time: self.creation_date_time,
349 bot_tags: self.bot_tags,
350 test_bot_alias_tags: self.test_bot_alias_tags,
351 bot_type: self.bot_type,
352 bot_members: self.bot_members,
353 error_log_settings: self.error_log_settings,
354 _request_id: self._request_id,
355 }
356 }
357}