aws_sdk_lexmodelsv2/operation/describe_bot/
_describe_bot_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeBotOutput {
6    /// <p>The unique identifier of the bot.</p>
7    pub bot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the bot.</p>
9    pub bot_name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the bot.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
15    pub data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
16    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
17    pub idle_session_ttl_in_seconds: ::std::option::Option<i32>,
18    /// <p>The current status of the bot. When the status is <code>Available</code> the bot is ready to be used in conversations with users.</p>
19    pub bot_status: ::std::option::Option<crate::types::BotStatus>,
20    /// <p>A timestamp of the date and time that the bot was created.</p>
21    pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>A timestamp of the date and time that the bot was last updated.</p>
23    pub last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The type of the bot that was described.</p>
25    pub bot_type: ::std::option::Option<crate::types::BotType>,
26    /// <p>The list of bots in the network that was described.</p>
27    pub bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
28    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
29    pub failure_reasons: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30    /// <p>Contains the configuration for error logging that specifies where and how bot errors are recorded, including destinations like CloudWatch Logs.</p>
31    pub error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
32    _request_id: Option<String>,
33}
34impl DescribeBotOutput {
35    /// <p>The unique identifier of the bot.</p>
36    pub fn bot_id(&self) -> ::std::option::Option<&str> {
37        self.bot_id.as_deref()
38    }
39    /// <p>The name of the bot.</p>
40    pub fn bot_name(&self) -> ::std::option::Option<&str> {
41        self.bot_name.as_deref()
42    }
43    /// <p>The description of the bot.</p>
44    pub fn description(&self) -> ::std::option::Option<&str> {
45        self.description.as_deref()
46    }
47    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
48    pub fn role_arn(&self) -> ::std::option::Option<&str> {
49        self.role_arn.as_deref()
50    }
51    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
52    pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
53        self.data_privacy.as_ref()
54    }
55    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
56    pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
57        self.idle_session_ttl_in_seconds
58    }
59    /// <p>The current status of the bot. When the status is <code>Available</code> the bot is ready to be used in conversations with users.</p>
60    pub fn bot_status(&self) -> ::std::option::Option<&crate::types::BotStatus> {
61        self.bot_status.as_ref()
62    }
63    /// <p>A timestamp of the date and time that the bot was created.</p>
64    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65        self.creation_date_time.as_ref()
66    }
67    /// <p>A timestamp of the date and time that the bot was last updated.</p>
68    pub fn last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
69        self.last_updated_date_time.as_ref()
70    }
71    /// <p>The type of the bot that was described.</p>
72    pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
73        self.bot_type.as_ref()
74    }
75    /// <p>The list of bots in the network that was described.</p>
76    ///
77    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.bot_members.is_none()`.
78    pub fn bot_members(&self) -> &[crate::types::BotMember] {
79        self.bot_members.as_deref().unwrap_or_default()
80    }
81    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
82    ///
83    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.failure_reasons.is_none()`.
84    pub fn failure_reasons(&self) -> &[::std::string::String] {
85        self.failure_reasons.as_deref().unwrap_or_default()
86    }
87    /// <p>Contains the configuration for error logging that specifies where and how bot errors are recorded, including destinations like CloudWatch Logs.</p>
88    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    /// Creates a new builder-style object to manufacture [`DescribeBotOutput`](crate::operation::describe_bot::DescribeBotOutput).
99    pub fn builder() -> crate::operation::describe_bot::builders::DescribeBotOutputBuilder {
100        crate::operation::describe_bot::builders::DescribeBotOutputBuilder::default()
101    }
102}
103
104/// A builder for [`DescribeBotOutput`](crate::operation::describe_bot::DescribeBotOutput).
105#[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    /// <p>The unique identifier of the bot.</p>
125    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    /// <p>The unique identifier of the bot.</p>
130    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.bot_id = input;
132        self
133    }
134    /// <p>The unique identifier of the bot.</p>
135    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
136        &self.bot_id
137    }
138    /// <p>The name of the bot.</p>
139    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    /// <p>The name of the bot.</p>
144    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.bot_name = input;
146        self
147    }
148    /// <p>The name of the bot.</p>
149    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
150        &self.bot_name
151    }
152    /// <p>The description of the bot.</p>
153    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    /// <p>The description of the bot.</p>
158    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.description = input;
160        self
161    }
162    /// <p>The description of the bot.</p>
163    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
164        &self.description
165    }
166    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
167    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    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
172    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173        self.role_arn = input;
174        self
175    }
176    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
177    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
178        &self.role_arn
179    }
180    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
181    pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
182        self.data_privacy = ::std::option::Option::Some(input);
183        self
184    }
185    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
186    pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
187        self.data_privacy = input;
188        self
189    }
190    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
191    pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
192        &self.data_privacy
193    }
194    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
195    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    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
200    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    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
205    pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
206        &self.idle_session_ttl_in_seconds
207    }
208    /// <p>The current status of the bot. When the status is <code>Available</code> the bot is ready to be used in conversations with users.</p>
209    pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
210        self.bot_status = ::std::option::Option::Some(input);
211        self
212    }
213    /// <p>The current status of the bot. When the status is <code>Available</code> the bot is ready to be used in conversations with users.</p>
214    pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
215        self.bot_status = input;
216        self
217    }
218    /// <p>The current status of the bot. When the status is <code>Available</code> the bot is ready to be used in conversations with users.</p>
219    pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
220        &self.bot_status
221    }
222    /// <p>A timestamp of the date and time that the bot was created.</p>
223    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    /// <p>A timestamp of the date and time that the bot was created.</p>
228    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    /// <p>A timestamp of the date and time that the bot was created.</p>
233    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
234        &self.creation_date_time
235    }
236    /// <p>A timestamp of the date and time that the bot was last updated.</p>
237    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    /// <p>A timestamp of the date and time that the bot was last updated.</p>
242    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    /// <p>A timestamp of the date and time that the bot was last updated.</p>
247    pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
248        &self.last_updated_date_time
249    }
250    /// <p>The type of the bot that was described.</p>
251    pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
252        self.bot_type = ::std::option::Option::Some(input);
253        self
254    }
255    /// <p>The type of the bot that was described.</p>
256    pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
257        self.bot_type = input;
258        self
259    }
260    /// <p>The type of the bot that was described.</p>
261    pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
262        &self.bot_type
263    }
264    /// Appends an item to `bot_members`.
265    ///
266    /// To override the contents of this collection use [`set_bot_members`](Self::set_bot_members).
267    ///
268    /// <p>The list of bots in the network that was described.</p>
269    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    /// <p>The list of bots in the network that was described.</p>
276    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    /// <p>The list of bots in the network that was described.</p>
281    pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
282        &self.bot_members
283    }
284    /// Appends an item to `failure_reasons`.
285    ///
286    /// To override the contents of this collection use [`set_failure_reasons`](Self::set_failure_reasons).
287    ///
288    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
289    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    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
296    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    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
301    pub fn get_failure_reasons(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
302        &self.failure_reasons
303    }
304    /// <p>Contains the configuration for error logging that specifies where and how bot errors are recorded, including destinations like CloudWatch Logs.</p>
305    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    /// <p>Contains the configuration for error logging that specifies where and how bot errors are recorded, including destinations like CloudWatch Logs.</p>
310    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    /// <p>Contains the configuration for error logging that specifies where and how bot errors are recorded, including destinations like CloudWatch Logs.</p>
315    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    /// Consumes the builder and constructs a [`DescribeBotOutput`](crate::operation::describe_bot::DescribeBotOutput).
328    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}