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    _request_id: Option<String>,
29}
30impl UpdateBotOutput {
31    /// <p>The unique identifier of the bot that was updated.</p>
32    pub fn bot_id(&self) -> ::std::option::Option<&str> {
33        self.bot_id.as_deref()
34    }
35    /// <p>The name of the bot after the update.</p>
36    pub fn bot_name(&self) -> ::std::option::Option<&str> {
37        self.bot_name.as_deref()
38    }
39    /// <p>The description of the bot after the update.</p>
40    pub fn description(&self) -> ::std::option::Option<&str> {
41        self.description.as_deref()
42    }
43    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
44    pub fn role_arn(&self) -> ::std::option::Option<&str> {
45        self.role_arn.as_deref()
46    }
47    /// <p>The data privacy settings for the bot after the update.</p>
48    pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
49        self.data_privacy.as_ref()
50    }
51    /// <p>The session timeout, in seconds, for the bot after the update.</p>
52    pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
53        self.idle_session_ttl_in_seconds
54    }
55    /// <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>
56    pub fn bot_status(&self) -> ::std::option::Option<&crate::types::BotStatus> {
57        self.bot_status.as_ref()
58    }
59    /// <p>A timestamp of the date and time that the bot was created.</p>
60    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61        self.creation_date_time.as_ref()
62    }
63    /// <p>A timestamp of the date and time that the bot was last updated.</p>
64    pub fn last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65        self.last_updated_date_time.as_ref()
66    }
67    /// <p>The type of the bot that was updated.</p>
68    pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
69        self.bot_type.as_ref()
70    }
71    /// <p>The list of bot members in the network that was updated.</p>
72    ///
73    /// 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()`.
74    pub fn bot_members(&self) -> &[crate::types::BotMember] {
75        self.bot_members.as_deref().unwrap_or_default()
76    }
77}
78impl ::aws_types::request_id::RequestId for UpdateBotOutput {
79    fn request_id(&self) -> Option<&str> {
80        self._request_id.as_deref()
81    }
82}
83impl UpdateBotOutput {
84    /// Creates a new builder-style object to manufacture [`UpdateBotOutput`](crate::operation::update_bot::UpdateBotOutput).
85    pub fn builder() -> crate::operation::update_bot::builders::UpdateBotOutputBuilder {
86        crate::operation::update_bot::builders::UpdateBotOutputBuilder::default()
87    }
88}
89
90/// A builder for [`UpdateBotOutput`](crate::operation::update_bot::UpdateBotOutput).
91#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
92#[non_exhaustive]
93pub struct UpdateBotOutputBuilder {
94    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
95    pub(crate) bot_name: ::std::option::Option<::std::string::String>,
96    pub(crate) description: ::std::option::Option<::std::string::String>,
97    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
98    pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
99    pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
100    pub(crate) bot_status: ::std::option::Option<crate::types::BotStatus>,
101    pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
102    pub(crate) last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
103    pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
104    pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
105    _request_id: Option<String>,
106}
107impl UpdateBotOutputBuilder {
108    /// <p>The unique identifier of the bot that was updated.</p>
109    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.bot_id = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The unique identifier of the bot that was updated.</p>
114    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.bot_id = input;
116        self
117    }
118    /// <p>The unique identifier of the bot that was updated.</p>
119    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
120        &self.bot_id
121    }
122    /// <p>The name of the bot after the update.</p>
123    pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.bot_name = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The name of the bot after the update.</p>
128    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.bot_name = input;
130        self
131    }
132    /// <p>The name of the bot after the update.</p>
133    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
134        &self.bot_name
135    }
136    /// <p>The description of the bot after the update.</p>
137    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.description = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The description of the bot after the update.</p>
142    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.description = input;
144        self
145    }
146    /// <p>The description of the bot after the update.</p>
147    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
148        &self.description
149    }
150    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
151    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.role_arn = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
156    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.role_arn = input;
158        self
159    }
160    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.</p>
161    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
162        &self.role_arn
163    }
164    /// <p>The data privacy settings for the bot after the update.</p>
165    pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
166        self.data_privacy = ::std::option::Option::Some(input);
167        self
168    }
169    /// <p>The data privacy settings for the bot after the update.</p>
170    pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
171        self.data_privacy = input;
172        self
173    }
174    /// <p>The data privacy settings for the bot after the update.</p>
175    pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
176        &self.data_privacy
177    }
178    /// <p>The session timeout, in seconds, for the bot after the update.</p>
179    pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
180        self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
181        self
182    }
183    /// <p>The session timeout, in seconds, for the bot after the update.</p>
184    pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
185        self.idle_session_ttl_in_seconds = input;
186        self
187    }
188    /// <p>The session timeout, in seconds, for the bot after the update.</p>
189    pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
190        &self.idle_session_ttl_in_seconds
191    }
192    /// <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>
193    pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
194        self.bot_status = ::std::option::Option::Some(input);
195        self
196    }
197    /// <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>
198    pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
199        self.bot_status = input;
200        self
201    }
202    /// <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>
203    pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
204        &self.bot_status
205    }
206    /// <p>A timestamp of the date and time that the bot was created.</p>
207    pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
208        self.creation_date_time = ::std::option::Option::Some(input);
209        self
210    }
211    /// <p>A timestamp of the date and time that the bot was created.</p>
212    pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
213        self.creation_date_time = input;
214        self
215    }
216    /// <p>A timestamp of the date and time that the bot was created.</p>
217    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
218        &self.creation_date_time
219    }
220    /// <p>A timestamp of the date and time that the bot was last updated.</p>
221    pub fn last_updated_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
222        self.last_updated_date_time = ::std::option::Option::Some(input);
223        self
224    }
225    /// <p>A timestamp of the date and time that the bot was last updated.</p>
226    pub fn set_last_updated_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
227        self.last_updated_date_time = input;
228        self
229    }
230    /// <p>A timestamp of the date and time that the bot was last updated.</p>
231    pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
232        &self.last_updated_date_time
233    }
234    /// <p>The type of the bot that was updated.</p>
235    pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
236        self.bot_type = ::std::option::Option::Some(input);
237        self
238    }
239    /// <p>The type of the bot that was updated.</p>
240    pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
241        self.bot_type = input;
242        self
243    }
244    /// <p>The type of the bot that was updated.</p>
245    pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
246        &self.bot_type
247    }
248    /// Appends an item to `bot_members`.
249    ///
250    /// To override the contents of this collection use [`set_bot_members`](Self::set_bot_members).
251    ///
252    /// <p>The list of bot members in the network that was updated.</p>
253    pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
254        let mut v = self.bot_members.unwrap_or_default();
255        v.push(input);
256        self.bot_members = ::std::option::Option::Some(v);
257        self
258    }
259    /// <p>The list of bot members in the network that was updated.</p>
260    pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
261        self.bot_members = input;
262        self
263    }
264    /// <p>The list of bot members in the network that was updated.</p>
265    pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
266        &self.bot_members
267    }
268    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
269        self._request_id = Some(request_id.into());
270        self
271    }
272
273    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
274        self._request_id = request_id;
275        self
276    }
277    /// Consumes the builder and constructs a [`UpdateBotOutput`](crate::operation::update_bot::UpdateBotOutput).
278    pub fn build(self) -> crate::operation::update_bot::UpdateBotOutput {
279        crate::operation::update_bot::UpdateBotOutput {
280            bot_id: self.bot_id,
281            bot_name: self.bot_name,
282            description: self.description,
283            role_arn: self.role_arn,
284            data_privacy: self.data_privacy,
285            idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
286            bot_status: self.bot_status,
287            creation_date_time: self.creation_date_time,
288            last_updated_date_time: self.last_updated_date_time,
289            bot_type: self.bot_type,
290            bot_members: self.bot_members,
291            _request_id: self._request_id,
292        }
293    }
294}