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    _request_id: Option<String>,
31}
32impl DescribeBotOutput {
33    /// <p>The unique identifier of the bot.</p>
34    pub fn bot_id(&self) -> ::std::option::Option<&str> {
35        self.bot_id.as_deref()
36    }
37    /// <p>The name of the bot.</p>
38    pub fn bot_name(&self) -> ::std::option::Option<&str> {
39        self.bot_name.as_deref()
40    }
41    /// <p>The description of the bot.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
46    pub fn role_arn(&self) -> ::std::option::Option<&str> {
47        self.role_arn.as_deref()
48    }
49    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
50    pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
51        self.data_privacy.as_ref()
52    }
53    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
54    pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
55        self.idle_session_ttl_in_seconds
56    }
57    /// <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>
58    pub fn bot_status(&self) -> ::std::option::Option<&crate::types::BotStatus> {
59        self.bot_status.as_ref()
60    }
61    /// <p>A timestamp of the date and time that the bot was created.</p>
62    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63        self.creation_date_time.as_ref()
64    }
65    /// <p>A timestamp of the date and time that the bot was last updated.</p>
66    pub fn last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67        self.last_updated_date_time.as_ref()
68    }
69    /// <p>The type of the bot that was described.</p>
70    pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
71        self.bot_type.as_ref()
72    }
73    /// <p>The list of bots in the network that was described.</p>
74    ///
75    /// 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()`.
76    pub fn bot_members(&self) -> &[crate::types::BotMember] {
77        self.bot_members.as_deref().unwrap_or_default()
78    }
79    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
80    ///
81    /// 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()`.
82    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    /// Creates a new builder-style object to manufacture [`DescribeBotOutput`](crate::operation::describe_bot::DescribeBotOutput).
93    pub fn builder() -> crate::operation::describe_bot::builders::DescribeBotOutputBuilder {
94        crate::operation::describe_bot::builders::DescribeBotOutputBuilder::default()
95    }
96}
97
98/// A builder for [`DescribeBotOutput`](crate::operation::describe_bot::DescribeBotOutput).
99#[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    /// <p>The unique identifier of the bot.</p>
118    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    /// <p>The unique identifier of the bot.</p>
123    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.bot_id = input;
125        self
126    }
127    /// <p>The unique identifier of the bot.</p>
128    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
129        &self.bot_id
130    }
131    /// <p>The name of the bot.</p>
132    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    /// <p>The name of the bot.</p>
137    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.bot_name = input;
139        self
140    }
141    /// <p>The name of the bot.</p>
142    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
143        &self.bot_name
144    }
145    /// <p>The description of the bot.</p>
146    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    /// <p>The description of the bot.</p>
151    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.description = input;
153        self
154    }
155    /// <p>The description of the bot.</p>
156    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
157        &self.description
158    }
159    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
160    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    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
165    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.role_arn = input;
167        self
168    }
169    /// <p>The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.</p>
170    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
171        &self.role_arn
172    }
173    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
174    pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
175        self.data_privacy = ::std::option::Option::Some(input);
176        self
177    }
178    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
179    pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
180        self.data_privacy = input;
181        self
182    }
183    /// <p>Settings for managing data privacy of the bot and its conversations with users.</p>
184    pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
185        &self.data_privacy
186    }
187    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
188    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    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
193    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    /// <p>The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.</p>
198    pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
199        &self.idle_session_ttl_in_seconds
200    }
201    /// <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>
202    pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
203        self.bot_status = ::std::option::Option::Some(input);
204        self
205    }
206    /// <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>
207    pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
208        self.bot_status = input;
209        self
210    }
211    /// <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>
212    pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
213        &self.bot_status
214    }
215    /// <p>A timestamp of the date and time that the bot was created.</p>
216    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    /// <p>A timestamp of the date and time that the bot was created.</p>
221    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    /// <p>A timestamp of the date and time that the bot was created.</p>
226    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
227        &self.creation_date_time
228    }
229    /// <p>A timestamp of the date and time that the bot was last updated.</p>
230    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    /// <p>A timestamp of the date and time that the bot was last updated.</p>
235    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    /// <p>A timestamp of the date and time that the bot was last updated.</p>
240    pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
241        &self.last_updated_date_time
242    }
243    /// <p>The type of the bot that was described.</p>
244    pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
245        self.bot_type = ::std::option::Option::Some(input);
246        self
247    }
248    /// <p>The type of the bot that was described.</p>
249    pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
250        self.bot_type = input;
251        self
252    }
253    /// <p>The type of the bot that was described.</p>
254    pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
255        &self.bot_type
256    }
257    /// Appends an item to `bot_members`.
258    ///
259    /// To override the contents of this collection use [`set_bot_members`](Self::set_bot_members).
260    ///
261    /// <p>The list of bots in the network that was described.</p>
262    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    /// <p>The list of bots in the network that was described.</p>
269    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    /// <p>The list of bots in the network that was described.</p>
274    pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
275        &self.bot_members
276    }
277    /// Appends an item to `failure_reasons`.
278    ///
279    /// To override the contents of this collection use [`set_failure_reasons`](Self::set_failure_reasons).
280    ///
281    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
282    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    /// <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 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    /// <p>If the <code>botStatus</code> is <code>Failed</code>, this contains a list of reasons that the bot couldn't be built.</p>
294    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    /// Consumes the builder and constructs a [`DescribeBotOutput`](crate::operation::describe_bot::DescribeBotOutput).
307    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}