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 _request_id: Option<String>,
31}
32impl CreateBotOutput {
33 pub fn bot_id(&self) -> ::std::option::Option<&str> {
35 self.bot_id.as_deref()
36 }
37 pub fn bot_name(&self) -> ::std::option::Option<&str> {
39 self.bot_name.as_deref()
40 }
41 pub fn description(&self) -> ::std::option::Option<&str> {
43 self.description.as_deref()
44 }
45 pub fn role_arn(&self) -> ::std::option::Option<&str> {
47 self.role_arn.as_deref()
48 }
49 pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
51 self.data_privacy.as_ref()
52 }
53 pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
55 self.idle_session_ttl_in_seconds
56 }
57 pub fn bot_status(&self) -> ::std::option::Option<&crate::types::BotStatus> {
59 self.bot_status.as_ref()
60 }
61 pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63 self.creation_date_time.as_ref()
64 }
65 pub fn bot_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
67 self.bot_tags.as_ref()
68 }
69 pub fn test_bot_alias_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
71 self.test_bot_alias_tags.as_ref()
72 }
73 pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
75 self.bot_type.as_ref()
76 }
77 pub fn bot_members(&self) -> &[crate::types::BotMember] {
81 self.bot_members.as_deref().unwrap_or_default()
82 }
83}
84impl ::aws_types::request_id::RequestId for CreateBotOutput {
85 fn request_id(&self) -> Option<&str> {
86 self._request_id.as_deref()
87 }
88}
89impl CreateBotOutput {
90 pub fn builder() -> crate::operation::create_bot::builders::CreateBotOutputBuilder {
92 crate::operation::create_bot::builders::CreateBotOutputBuilder::default()
93 }
94}
95
96#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
98#[non_exhaustive]
99pub struct CreateBotOutputBuilder {
100 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
101 pub(crate) bot_name: ::std::option::Option<::std::string::String>,
102 pub(crate) description: ::std::option::Option<::std::string::String>,
103 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
104 pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
105 pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
106 pub(crate) bot_status: ::std::option::Option<crate::types::BotStatus>,
107 pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
108 pub(crate) bot_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
109 pub(crate) test_bot_alias_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
110 pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
111 pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
112 _request_id: Option<String>,
113}
114impl CreateBotOutputBuilder {
115 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.bot_id = ::std::option::Option::Some(input.into());
118 self
119 }
120 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.bot_id = input;
123 self
124 }
125 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
127 &self.bot_id
128 }
129 pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.bot_name = ::std::option::Option::Some(input.into());
132 self
133 }
134 pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.bot_name = input;
137 self
138 }
139 pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
141 &self.bot_name
142 }
143 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.description = ::std::option::Option::Some(input.into());
146 self
147 }
148 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.description = input;
151 self
152 }
153 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
155 &self.description
156 }
157 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.role_arn = ::std::option::Option::Some(input.into());
160 self
161 }
162 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.role_arn = input;
165 self
166 }
167 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
169 &self.role_arn
170 }
171 pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
173 self.data_privacy = ::std::option::Option::Some(input);
174 self
175 }
176 pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
178 self.data_privacy = input;
179 self
180 }
181 pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
183 &self.data_privacy
184 }
185 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
187 self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
188 self
189 }
190 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
192 self.idle_session_ttl_in_seconds = input;
193 self
194 }
195 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
197 &self.idle_session_ttl_in_seconds
198 }
199 pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
201 self.bot_status = ::std::option::Option::Some(input);
202 self
203 }
204 pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
206 self.bot_status = input;
207 self
208 }
209 pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
211 &self.bot_status
212 }
213 pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
215 self.creation_date_time = ::std::option::Option::Some(input);
216 self
217 }
218 pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
220 self.creation_date_time = input;
221 self
222 }
223 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
225 &self.creation_date_time
226 }
227 pub fn bot_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
233 let mut hash_map = self.bot_tags.unwrap_or_default();
234 hash_map.insert(k.into(), v.into());
235 self.bot_tags = ::std::option::Option::Some(hash_map);
236 self
237 }
238 pub fn set_bot_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
240 self.bot_tags = input;
241 self
242 }
243 pub fn get_bot_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
245 &self.bot_tags
246 }
247 pub fn test_bot_alias_tags(
253 mut self,
254 k: impl ::std::convert::Into<::std::string::String>,
255 v: impl ::std::convert::Into<::std::string::String>,
256 ) -> Self {
257 let mut hash_map = self.test_bot_alias_tags.unwrap_or_default();
258 hash_map.insert(k.into(), v.into());
259 self.test_bot_alias_tags = ::std::option::Option::Some(hash_map);
260 self
261 }
262 pub fn set_test_bot_alias_tags(
264 mut self,
265 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
266 ) -> Self {
267 self.test_bot_alias_tags = input;
268 self
269 }
270 pub fn get_test_bot_alias_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
272 &self.test_bot_alias_tags
273 }
274 pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
276 self.bot_type = ::std::option::Option::Some(input);
277 self
278 }
279 pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
281 self.bot_type = input;
282 self
283 }
284 pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
286 &self.bot_type
287 }
288 pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
294 let mut v = self.bot_members.unwrap_or_default();
295 v.push(input);
296 self.bot_members = ::std::option::Option::Some(v);
297 self
298 }
299 pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
301 self.bot_members = input;
302 self
303 }
304 pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
306 &self.bot_members
307 }
308 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
309 self._request_id = Some(request_id.into());
310 self
311 }
312
313 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
314 self._request_id = request_id;
315 self
316 }
317 pub fn build(self) -> crate::operation::create_bot::CreateBotOutput {
319 crate::operation::create_bot::CreateBotOutput {
320 bot_id: self.bot_id,
321 bot_name: self.bot_name,
322 description: self.description,
323 role_arn: self.role_arn,
324 data_privacy: self.data_privacy,
325 idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
326 bot_status: self.bot_status,
327 creation_date_time: self.creation_date_time,
328 bot_tags: self.bot_tags,
329 test_bot_alias_tags: self.test_bot_alias_tags,
330 bot_type: self.bot_type,
331 bot_members: self.bot_members,
332 _request_id: self._request_id,
333 }
334 }
335}