aws_sdk_lexmodelsv2/operation/describe_bot/
_describe_bot_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeBotOutput {
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 pub failure_reasons: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30 _request_id: Option<String>,
31}
32impl DescribeBotOutput {
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 last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67 self.last_updated_date_time.as_ref()
68 }
69 pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
71 self.bot_type.as_ref()
72 }
73 pub fn bot_members(&self) -> &[crate::types::BotMember] {
77 self.bot_members.as_deref().unwrap_or_default()
78 }
79 pub fn failure_reasons(&self) -> &[::std::string::String] {
83 self.failure_reasons.as_deref().unwrap_or_default()
84 }
85}
86impl ::aws_types::request_id::RequestId for DescribeBotOutput {
87 fn request_id(&self) -> Option<&str> {
88 self._request_id.as_deref()
89 }
90}
91impl DescribeBotOutput {
92 pub fn builder() -> crate::operation::describe_bot::builders::DescribeBotOutputBuilder {
94 crate::operation::describe_bot::builders::DescribeBotOutputBuilder::default()
95 }
96}
97
98#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
100#[non_exhaustive]
101pub struct DescribeBotOutputBuilder {
102 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
103 pub(crate) bot_name: ::std::option::Option<::std::string::String>,
104 pub(crate) description: ::std::option::Option<::std::string::String>,
105 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
106 pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
107 pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
108 pub(crate) bot_status: ::std::option::Option<crate::types::BotStatus>,
109 pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
110 pub(crate) last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
111 pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
112 pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
113 pub(crate) failure_reasons: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
114 _request_id: Option<String>,
115}
116impl DescribeBotOutputBuilder {
117 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.bot_id = ::std::option::Option::Some(input.into());
120 self
121 }
122 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.bot_id = input;
125 self
126 }
127 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
129 &self.bot_id
130 }
131 pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.bot_name = ::std::option::Option::Some(input.into());
134 self
135 }
136 pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.bot_name = input;
139 self
140 }
141 pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
143 &self.bot_name
144 }
145 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.description = ::std::option::Option::Some(input.into());
148 self
149 }
150 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.description = input;
153 self
154 }
155 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
157 &self.description
158 }
159 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.role_arn = ::std::option::Option::Some(input.into());
162 self
163 }
164 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.role_arn = input;
167 self
168 }
169 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
171 &self.role_arn
172 }
173 pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
175 self.data_privacy = ::std::option::Option::Some(input);
176 self
177 }
178 pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
180 self.data_privacy = input;
181 self
182 }
183 pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
185 &self.data_privacy
186 }
187 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
189 self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
190 self
191 }
192 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
194 self.idle_session_ttl_in_seconds = input;
195 self
196 }
197 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
199 &self.idle_session_ttl_in_seconds
200 }
201 pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
203 self.bot_status = ::std::option::Option::Some(input);
204 self
205 }
206 pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
208 self.bot_status = input;
209 self
210 }
211 pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
213 &self.bot_status
214 }
215 pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
217 self.creation_date_time = ::std::option::Option::Some(input);
218 self
219 }
220 pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
222 self.creation_date_time = input;
223 self
224 }
225 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
227 &self.creation_date_time
228 }
229 pub fn last_updated_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
231 self.last_updated_date_time = ::std::option::Option::Some(input);
232 self
233 }
234 pub fn set_last_updated_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
236 self.last_updated_date_time = input;
237 self
238 }
239 pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
241 &self.last_updated_date_time
242 }
243 pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
245 self.bot_type = ::std::option::Option::Some(input);
246 self
247 }
248 pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
250 self.bot_type = input;
251 self
252 }
253 pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
255 &self.bot_type
256 }
257 pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
263 let mut v = self.bot_members.unwrap_or_default();
264 v.push(input);
265 self.bot_members = ::std::option::Option::Some(v);
266 self
267 }
268 pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
270 self.bot_members = input;
271 self
272 }
273 pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
275 &self.bot_members
276 }
277 pub fn failure_reasons(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283 let mut v = self.failure_reasons.unwrap_or_default();
284 v.push(input.into());
285 self.failure_reasons = ::std::option::Option::Some(v);
286 self
287 }
288 pub fn set_failure_reasons(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
290 self.failure_reasons = input;
291 self
292 }
293 pub fn get_failure_reasons(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
295 &self.failure_reasons
296 }
297 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
298 self._request_id = Some(request_id.into());
299 self
300 }
301
302 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
303 self._request_id = request_id;
304 self
305 }
306 pub fn build(self) -> crate::operation::describe_bot::DescribeBotOutput {
308 crate::operation::describe_bot::DescribeBotOutput {
309 bot_id: self.bot_id,
310 bot_name: self.bot_name,
311 description: self.description,
312 role_arn: self.role_arn,
313 data_privacy: self.data_privacy,
314 idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
315 bot_status: self.bot_status,
316 creation_date_time: self.creation_date_time,
317 last_updated_date_time: self.last_updated_date_time,
318 bot_type: self.bot_type,
319 bot_members: self.bot_members,
320 failure_reasons: self.failure_reasons,
321 _request_id: self._request_id,
322 }
323 }
324}