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 pub error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
32 _request_id: Option<String>,
33}
34impl DescribeBotOutput {
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 last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
69 self.last_updated_date_time.as_ref()
70 }
71 pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
73 self.bot_type.as_ref()
74 }
75 pub fn bot_members(&self) -> &[crate::types::BotMember] {
79 self.bot_members.as_deref().unwrap_or_default()
80 }
81 pub fn failure_reasons(&self) -> &[::std::string::String] {
85 self.failure_reasons.as_deref().unwrap_or_default()
86 }
87 pub fn error_log_settings(&self) -> ::std::option::Option<&crate::types::ErrorLogSettings> {
89 self.error_log_settings.as_ref()
90 }
91}
92impl ::aws_types::request_id::RequestId for DescribeBotOutput {
93 fn request_id(&self) -> Option<&str> {
94 self._request_id.as_deref()
95 }
96}
97impl DescribeBotOutput {
98 pub fn builder() -> crate::operation::describe_bot::builders::DescribeBotOutputBuilder {
100 crate::operation::describe_bot::builders::DescribeBotOutputBuilder::default()
101 }
102}
103
104#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
106#[non_exhaustive]
107pub struct DescribeBotOutputBuilder {
108 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
109 pub(crate) bot_name: ::std::option::Option<::std::string::String>,
110 pub(crate) description: ::std::option::Option<::std::string::String>,
111 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
112 pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
113 pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
114 pub(crate) bot_status: ::std::option::Option<crate::types::BotStatus>,
115 pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
116 pub(crate) last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
117 pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
118 pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
119 pub(crate) failure_reasons: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
120 pub(crate) error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
121 _request_id: Option<String>,
122}
123impl DescribeBotOutputBuilder {
124 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126 self.bot_id = ::std::option::Option::Some(input.into());
127 self
128 }
129 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131 self.bot_id = input;
132 self
133 }
134 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
136 &self.bot_id
137 }
138 pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140 self.bot_name = ::std::option::Option::Some(input.into());
141 self
142 }
143 pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145 self.bot_name = input;
146 self
147 }
148 pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
150 &self.bot_name
151 }
152 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.description = ::std::option::Option::Some(input.into());
155 self
156 }
157 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159 self.description = input;
160 self
161 }
162 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
164 &self.description
165 }
166 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168 self.role_arn = ::std::option::Option::Some(input.into());
169 self
170 }
171 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.role_arn = input;
174 self
175 }
176 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
178 &self.role_arn
179 }
180 pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
182 self.data_privacy = ::std::option::Option::Some(input);
183 self
184 }
185 pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
187 self.data_privacy = input;
188 self
189 }
190 pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
192 &self.data_privacy
193 }
194 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
196 self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
197 self
198 }
199 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
201 self.idle_session_ttl_in_seconds = input;
202 self
203 }
204 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
206 &self.idle_session_ttl_in_seconds
207 }
208 pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
210 self.bot_status = ::std::option::Option::Some(input);
211 self
212 }
213 pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
215 self.bot_status = input;
216 self
217 }
218 pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
220 &self.bot_status
221 }
222 pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
224 self.creation_date_time = ::std::option::Option::Some(input);
225 self
226 }
227 pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
229 self.creation_date_time = input;
230 self
231 }
232 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
234 &self.creation_date_time
235 }
236 pub fn last_updated_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
238 self.last_updated_date_time = ::std::option::Option::Some(input);
239 self
240 }
241 pub fn set_last_updated_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
243 self.last_updated_date_time = input;
244 self
245 }
246 pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
248 &self.last_updated_date_time
249 }
250 pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
252 self.bot_type = ::std::option::Option::Some(input);
253 self
254 }
255 pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
257 self.bot_type = input;
258 self
259 }
260 pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
262 &self.bot_type
263 }
264 pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
270 let mut v = self.bot_members.unwrap_or_default();
271 v.push(input);
272 self.bot_members = ::std::option::Option::Some(v);
273 self
274 }
275 pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
277 self.bot_members = input;
278 self
279 }
280 pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
282 &self.bot_members
283 }
284 pub fn failure_reasons(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290 let mut v = self.failure_reasons.unwrap_or_default();
291 v.push(input.into());
292 self.failure_reasons = ::std::option::Option::Some(v);
293 self
294 }
295 pub fn set_failure_reasons(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
297 self.failure_reasons = input;
298 self
299 }
300 pub fn get_failure_reasons(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
302 &self.failure_reasons
303 }
304 pub fn error_log_settings(mut self, input: crate::types::ErrorLogSettings) -> Self {
306 self.error_log_settings = ::std::option::Option::Some(input);
307 self
308 }
309 pub fn set_error_log_settings(mut self, input: ::std::option::Option<crate::types::ErrorLogSettings>) -> Self {
311 self.error_log_settings = input;
312 self
313 }
314 pub fn get_error_log_settings(&self) -> &::std::option::Option<crate::types::ErrorLogSettings> {
316 &self.error_log_settings
317 }
318 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
319 self._request_id = Some(request_id.into());
320 self
321 }
322
323 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
324 self._request_id = request_id;
325 self
326 }
327 pub fn build(self) -> crate::operation::describe_bot::DescribeBotOutput {
329 crate::operation::describe_bot::DescribeBotOutput {
330 bot_id: self.bot_id,
331 bot_name: self.bot_name,
332 description: self.description,
333 role_arn: self.role_arn,
334 data_privacy: self.data_privacy,
335 idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
336 bot_status: self.bot_status,
337 creation_date_time: self.creation_date_time,
338 last_updated_date_time: self.last_updated_date_time,
339 bot_type: self.bot_type,
340 bot_members: self.bot_members,
341 failure_reasons: self.failure_reasons,
342 error_log_settings: self.error_log_settings,
343 _request_id: self._request_id,
344 }
345 }
346}