aws_sdk_lexmodelsv2/operation/update_bot/
_update_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 UpdateBotOutput {
6    /// <p>The unique identifier of the bot that was updated.</p>
7    pub bot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the bot after the update.</p>
9    pub bot_name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the bot after the update.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The data privacy settings for the bot after the update.</p>
15    pub data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
16    /// <p>The session timeout, in seconds, for the bot after the update.</p>
17    pub idle_session_ttl_in_seconds: ::std::option::Option<i32>,
18    /// <p>Shows the current status of the bot. The bot is first in the <code>Creating</code> status. Once the bot is read for use, it changes to the <code>Available</code> status. After the bot is created, you can use the <code>DRAFT</code> version of the bot.</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 updated.</p>
25    pub bot_type: ::std::option::Option<crate::types::BotType>,
26    /// <p>The list of bot members in the network that was updated.</p>
27    pub bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
28    /// <p>Settings for managing error logs within the response of an update bot operation.</p>
29    pub error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
30    _request_id: Option<String>,
31}
32impl UpdateBotOutput {
33    /// <p>The unique identifier of the bot that was updated.</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 after the update.</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 after the update.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
46    pub fn role_arn(&self) -> ::std::option::Option<&str> {
47        self.role_arn.as_deref()
48    }
49    /// <p>The data privacy settings for the bot after the update.</p>
50    pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
51        self.data_privacy.as_ref()
52    }
53    /// <p>The session timeout, in seconds, for the bot after the update.</p>
54    pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
55        self.idle_session_ttl_in_seconds
56    }
57    /// <p>Shows the current status of the bot. The bot is first in the <code>Creating</code> status. Once the bot is read for use, it changes to the <code>Available</code> status. After the bot is created, you can use the <code>DRAFT</code> version of the bot.</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 updated.</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 bot members in the network that was updated.</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>Settings for managing error logs within the response of an update bot operation.</p>
80    pub fn error_log_settings(&self) -> ::std::option::Option<&crate::types::ErrorLogSettings> {
81        self.error_log_settings.as_ref()
82    }
83}
84impl ::aws_types::request_id::RequestId for UpdateBotOutput {
85    fn request_id(&self) -> Option<&str> {
86        self._request_id.as_deref()
87    }
88}
89impl UpdateBotOutput {
90    /// Creates a new builder-style object to manufacture [`UpdateBotOutput`](crate::operation::update_bot::UpdateBotOutput).
91    pub fn builder() -> crate::operation::update_bot::builders::UpdateBotOutputBuilder {
92        crate::operation::update_bot::builders::UpdateBotOutputBuilder::default()
93    }
94}
95
96/// A builder for [`UpdateBotOutput`](crate::operation::update_bot::UpdateBotOutput).
97#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
98#[non_exhaustive]
99pub struct UpdateBotOutputBuilder {
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) last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
109    pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
110    pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
111    pub(crate) error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
112    _request_id: Option<String>,
113}
114impl UpdateBotOutputBuilder {
115    /// <p>The unique identifier of the bot that was updated.</p>
116    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    /// <p>The unique identifier of the bot that was updated.</p>
121    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.bot_id = input;
123        self
124    }
125    /// <p>The unique identifier of the bot that was updated.</p>
126    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
127        &self.bot_id
128    }
129    /// <p>The name of the bot after the update.</p>
130    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    /// <p>The name of the bot after the update.</p>
135    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.bot_name = input;
137        self
138    }
139    /// <p>The name of the bot after the update.</p>
140    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
141        &self.bot_name
142    }
143    /// <p>The description of the bot after the update.</p>
144    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    /// <p>The description of the bot after the update.</p>
149    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.description = input;
151        self
152    }
153    /// <p>The description of the bot after the update.</p>
154    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
155        &self.description
156    }
157    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
158    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    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
163    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.role_arn = input;
165        self
166    }
167    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
168    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
169        &self.role_arn
170    }
171    /// <p>The data privacy settings for the bot after the update.</p>
172    pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
173        self.data_privacy = ::std::option::Option::Some(input);
174        self
175    }
176    /// <p>The data privacy settings for the bot after the update.</p>
177    pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
178        self.data_privacy = input;
179        self
180    }
181    /// <p>The data privacy settings for the bot after the update.</p>
182    pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
183        &self.data_privacy
184    }
185    /// <p>The session timeout, in seconds, for the bot after the update.</p>
186    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    /// <p>The session timeout, in seconds, for the bot after the update.</p>
191    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    /// <p>The session timeout, in seconds, for the bot after the update.</p>
196    pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
197        &self.idle_session_ttl_in_seconds
198    }
199    /// <p>Shows the current status of the bot. The bot is first in the <code>Creating</code> status. Once the bot is read for use, it changes to the <code>Available</code> status. After the bot is created, you can use the <code>DRAFT</code> version of the bot.</p>
200    pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
201        self.bot_status = ::std::option::Option::Some(input);
202        self
203    }
204    /// <p>Shows the current status of the bot. The bot is first in the <code>Creating</code> status. Once the bot is read for use, it changes to the <code>Available</code> status. After the bot is created, you can use the <code>DRAFT</code> version of the bot.</p>
205    pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
206        self.bot_status = input;
207        self
208    }
209    /// <p>Shows the current status of the bot. The bot is first in the <code>Creating</code> status. Once the bot is read for use, it changes to the <code>Available</code> status. After the bot is created, you can use the <code>DRAFT</code> version of the bot.</p>
210    pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
211        &self.bot_status
212    }
213    /// <p>A timestamp of the date and time that the bot was created.</p>
214    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    /// <p>A timestamp of the date and time that the bot was created.</p>
219    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    /// <p>A timestamp of the date and time that the bot was created.</p>
224    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
225        &self.creation_date_time
226    }
227    /// <p>A timestamp of the date and time that the bot was last updated.</p>
228    pub fn last_updated_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
229        self.last_updated_date_time = ::std::option::Option::Some(input);
230        self
231    }
232    /// <p>A timestamp of the date and time that the bot was last updated.</p>
233    pub fn set_last_updated_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
234        self.last_updated_date_time = input;
235        self
236    }
237    /// <p>A timestamp of the date and time that the bot was last updated.</p>
238    pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
239        &self.last_updated_date_time
240    }
241    /// <p>The type of the bot that was updated.</p>
242    pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
243        self.bot_type = ::std::option::Option::Some(input);
244        self
245    }
246    /// <p>The type of the bot that was updated.</p>
247    pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
248        self.bot_type = input;
249        self
250    }
251    /// <p>The type of the bot that was updated.</p>
252    pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
253        &self.bot_type
254    }
255    /// Appends an item to `bot_members`.
256    ///
257    /// To override the contents of this collection use [`set_bot_members`](Self::set_bot_members).
258    ///
259    /// <p>The list of bot members in the network that was updated.</p>
260    pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
261        let mut v = self.bot_members.unwrap_or_default();
262        v.push(input);
263        self.bot_members = ::std::option::Option::Some(v);
264        self
265    }
266    /// <p>The list of bot members in the network that was updated.</p>
267    pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
268        self.bot_members = input;
269        self
270    }
271    /// <p>The list of bot members in the network that was updated.</p>
272    pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
273        &self.bot_members
274    }
275    /// <p>Settings for managing error logs within the response of an update bot operation.</p>
276    pub fn error_log_settings(mut self, input: crate::types::ErrorLogSettings) -> Self {
277        self.error_log_settings = ::std::option::Option::Some(input);
278        self
279    }
280    /// <p>Settings for managing error logs within the response of an update bot operation.</p>
281    pub fn set_error_log_settings(mut self, input: ::std::option::Option<crate::types::ErrorLogSettings>) -> Self {
282        self.error_log_settings = input;
283        self
284    }
285    /// <p>Settings for managing error logs within the response of an update bot operation.</p>
286    pub fn get_error_log_settings(&self) -> &::std::option::Option<crate::types::ErrorLogSettings> {
287        &self.error_log_settings
288    }
289    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
290        self._request_id = Some(request_id.into());
291        self
292    }
293
294    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
295        self._request_id = request_id;
296        self
297    }
298    /// Consumes the builder and constructs a [`UpdateBotOutput`](crate::operation::update_bot::UpdateBotOutput).
299    pub fn build(self) -> crate::operation::update_bot::UpdateBotOutput {
300        crate::operation::update_bot::UpdateBotOutput {
301            bot_id: self.bot_id,
302            bot_name: self.bot_name,
303            description: self.description,
304            role_arn: self.role_arn,
305            data_privacy: self.data_privacy,
306            idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
307            bot_status: self.bot_status,
308            creation_date_time: self.creation_date_time,
309            last_updated_date_time: self.last_updated_date_time,
310            bot_type: self.bot_type,
311            bot_members: self.bot_members,
312            error_log_settings: self.error_log_settings,
313            _request_id: self._request_id,
314        }
315    }
316}