aws_sdk_lexmodelsv2/operation/create_bot/
_create_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 CreateBotOutput {
6    /// <p>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</p>
7    pub bot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name specified for the bot.</p>
9    pub bot_name: ::std::option::Option<::std::string::String>,
10    /// <p>The description specified for the bot.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The IAM role specified for the bot.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The data privacy settings specified for the bot.</p>
15    pub data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
16    /// <p>The session idle time specified for the bot.</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 indicating 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 list of tags associated with the bot.</p>
23    pub bot_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24    /// <p>A list of tags associated with the test alias for the bot.</p>
25    pub test_bot_alias_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26    /// <p>The type of a bot that was created.</p>
27    pub bot_type: ::std::option::Option<crate::types::BotType>,
28    /// <p>The list of bots in a network that was created.</p>
29    pub bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
30    /// <p>Specifies configuration settings for delivering error logs to Cloudwatch Logs in an Amazon Lex bot response.</p>
31    pub error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
32    _request_id: Option<String>,
33}
34impl CreateBotOutput {
35    /// <p>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</p>
36    pub fn bot_id(&self) -> ::std::option::Option<&str> {
37        self.bot_id.as_deref()
38    }
39    /// <p>The name specified for the bot.</p>
40    pub fn bot_name(&self) -> ::std::option::Option<&str> {
41        self.bot_name.as_deref()
42    }
43    /// <p>The description specified for the bot.</p>
44    pub fn description(&self) -> ::std::option::Option<&str> {
45        self.description.as_deref()
46    }
47    /// <p>The IAM role specified for the bot.</p>
48    pub fn role_arn(&self) -> ::std::option::Option<&str> {
49        self.role_arn.as_deref()
50    }
51    /// <p>The data privacy settings specified for the bot.</p>
52    pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
53        self.data_privacy.as_ref()
54    }
55    /// <p>The session idle time specified for the bot.</p>
56    pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
57        self.idle_session_ttl_in_seconds
58    }
59    /// <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>
60    pub fn bot_status(&self) -> ::std::option::Option<&crate::types::BotStatus> {
61        self.bot_status.as_ref()
62    }
63    /// <p>A timestamp indicating 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 list of tags associated with the bot.</p>
68    pub fn bot_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
69        self.bot_tags.as_ref()
70    }
71    /// <p>A list of tags associated with the test alias for the bot.</p>
72    pub fn test_bot_alias_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
73        self.test_bot_alias_tags.as_ref()
74    }
75    /// <p>The type of a bot that was created.</p>
76    pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
77        self.bot_type.as_ref()
78    }
79    /// <p>The list of bots in a network that was created.</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 `.bot_members.is_none()`.
82    pub fn bot_members(&self) -> &[crate::types::BotMember] {
83        self.bot_members.as_deref().unwrap_or_default()
84    }
85    /// <p>Specifies configuration settings for delivering error logs to Cloudwatch Logs in an Amazon Lex bot response.</p>
86    pub fn error_log_settings(&self) -> ::std::option::Option<&crate::types::ErrorLogSettings> {
87        self.error_log_settings.as_ref()
88    }
89}
90impl ::aws_types::request_id::RequestId for CreateBotOutput {
91    fn request_id(&self) -> Option<&str> {
92        self._request_id.as_deref()
93    }
94}
95impl CreateBotOutput {
96    /// Creates a new builder-style object to manufacture [`CreateBotOutput`](crate::operation::create_bot::CreateBotOutput).
97    pub fn builder() -> crate::operation::create_bot::builders::CreateBotOutputBuilder {
98        crate::operation::create_bot::builders::CreateBotOutputBuilder::default()
99    }
100}
101
102/// A builder for [`CreateBotOutput`](crate::operation::create_bot::CreateBotOutput).
103#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
104#[non_exhaustive]
105pub struct CreateBotOutputBuilder {
106    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
107    pub(crate) bot_name: ::std::option::Option<::std::string::String>,
108    pub(crate) description: ::std::option::Option<::std::string::String>,
109    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
110    pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
111    pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
112    pub(crate) bot_status: ::std::option::Option<crate::types::BotStatus>,
113    pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
114    pub(crate) bot_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
115    pub(crate) test_bot_alias_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
116    pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
117    pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
118    pub(crate) error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
119    _request_id: Option<String>,
120}
121impl CreateBotOutputBuilder {
122    /// <p>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</p>
123    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.bot_id = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</p>
128    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.bot_id = input;
130        self
131    }
132    /// <p>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</p>
133    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
134        &self.bot_id
135    }
136    /// <p>The name specified for the bot.</p>
137    pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.bot_name = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The name specified for the bot.</p>
142    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.bot_name = input;
144        self
145    }
146    /// <p>The name specified for the bot.</p>
147    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
148        &self.bot_name
149    }
150    /// <p>The description specified for the bot.</p>
151    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.description = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>The description specified for the bot.</p>
156    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.description = input;
158        self
159    }
160    /// <p>The description specified for the bot.</p>
161    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
162        &self.description
163    }
164    /// <p>The IAM role specified for the bot.</p>
165    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.role_arn = ::std::option::Option::Some(input.into());
167        self
168    }
169    /// <p>The IAM role specified for the bot.</p>
170    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.role_arn = input;
172        self
173    }
174    /// <p>The IAM role specified for the bot.</p>
175    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
176        &self.role_arn
177    }
178    /// <p>The data privacy settings specified for the bot.</p>
179    pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
180        self.data_privacy = ::std::option::Option::Some(input);
181        self
182    }
183    /// <p>The data privacy settings specified for the bot.</p>
184    pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
185        self.data_privacy = input;
186        self
187    }
188    /// <p>The data privacy settings specified for the bot.</p>
189    pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
190        &self.data_privacy
191    }
192    /// <p>The session idle time specified for the bot.</p>
193    pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
194        self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
195        self
196    }
197    /// <p>The session idle time specified for the bot.</p>
198    pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
199        self.idle_session_ttl_in_seconds = input;
200        self
201    }
202    /// <p>The session idle time specified for the bot.</p>
203    pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
204        &self.idle_session_ttl_in_seconds
205    }
206    /// <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>
207    pub fn bot_status(mut self, input: crate::types::BotStatus) -> Self {
208        self.bot_status = ::std::option::Option::Some(input);
209        self
210    }
211    /// <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>
212    pub fn set_bot_status(mut self, input: ::std::option::Option<crate::types::BotStatus>) -> Self {
213        self.bot_status = input;
214        self
215    }
216    /// <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>
217    pub fn get_bot_status(&self) -> &::std::option::Option<crate::types::BotStatus> {
218        &self.bot_status
219    }
220    /// <p>A timestamp indicating the date and time that the bot was created.</p>
221    pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
222        self.creation_date_time = ::std::option::Option::Some(input);
223        self
224    }
225    /// <p>A timestamp indicating the date and time that the bot was created.</p>
226    pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
227        self.creation_date_time = input;
228        self
229    }
230    /// <p>A timestamp indicating the date and time that the bot was created.</p>
231    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
232        &self.creation_date_time
233    }
234    /// Adds a key-value pair to `bot_tags`.
235    ///
236    /// To override the contents of this collection use [`set_bot_tags`](Self::set_bot_tags).
237    ///
238    /// <p>A list of tags associated with the bot.</p>
239    pub fn bot_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
240        let mut hash_map = self.bot_tags.unwrap_or_default();
241        hash_map.insert(k.into(), v.into());
242        self.bot_tags = ::std::option::Option::Some(hash_map);
243        self
244    }
245    /// <p>A list of tags associated with the bot.</p>
246    pub fn set_bot_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
247        self.bot_tags = input;
248        self
249    }
250    /// <p>A list of tags associated with the bot.</p>
251    pub fn get_bot_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
252        &self.bot_tags
253    }
254    /// Adds a key-value pair to `test_bot_alias_tags`.
255    ///
256    /// To override the contents of this collection use [`set_test_bot_alias_tags`](Self::set_test_bot_alias_tags).
257    ///
258    /// <p>A list of tags associated with the test alias for the bot.</p>
259    pub fn test_bot_alias_tags(
260        mut self,
261        k: impl ::std::convert::Into<::std::string::String>,
262        v: impl ::std::convert::Into<::std::string::String>,
263    ) -> Self {
264        let mut hash_map = self.test_bot_alias_tags.unwrap_or_default();
265        hash_map.insert(k.into(), v.into());
266        self.test_bot_alias_tags = ::std::option::Option::Some(hash_map);
267        self
268    }
269    /// <p>A list of tags associated with the test alias for the bot.</p>
270    pub fn set_test_bot_alias_tags(
271        mut self,
272        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
273    ) -> Self {
274        self.test_bot_alias_tags = input;
275        self
276    }
277    /// <p>A list of tags associated with the test alias for the bot.</p>
278    pub fn get_test_bot_alias_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
279        &self.test_bot_alias_tags
280    }
281    /// <p>The type of a bot that was created.</p>
282    pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
283        self.bot_type = ::std::option::Option::Some(input);
284        self
285    }
286    /// <p>The type of a bot that was created.</p>
287    pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
288        self.bot_type = input;
289        self
290    }
291    /// <p>The type of a bot that was created.</p>
292    pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
293        &self.bot_type
294    }
295    /// Appends an item to `bot_members`.
296    ///
297    /// To override the contents of this collection use [`set_bot_members`](Self::set_bot_members).
298    ///
299    /// <p>The list of bots in a network that was created.</p>
300    pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
301        let mut v = self.bot_members.unwrap_or_default();
302        v.push(input);
303        self.bot_members = ::std::option::Option::Some(v);
304        self
305    }
306    /// <p>The list of bots in a network that was created.</p>
307    pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
308        self.bot_members = input;
309        self
310    }
311    /// <p>The list of bots in a network that was created.</p>
312    pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
313        &self.bot_members
314    }
315    /// <p>Specifies configuration settings for delivering error logs to Cloudwatch Logs in an Amazon Lex bot response.</p>
316    pub fn error_log_settings(mut self, input: crate::types::ErrorLogSettings) -> Self {
317        self.error_log_settings = ::std::option::Option::Some(input);
318        self
319    }
320    /// <p>Specifies configuration settings for delivering error logs to Cloudwatch Logs in an Amazon Lex bot response.</p>
321    pub fn set_error_log_settings(mut self, input: ::std::option::Option<crate::types::ErrorLogSettings>) -> Self {
322        self.error_log_settings = input;
323        self
324    }
325    /// <p>Specifies configuration settings for delivering error logs to Cloudwatch Logs in an Amazon Lex bot response.</p>
326    pub fn get_error_log_settings(&self) -> &::std::option::Option<crate::types::ErrorLogSettings> {
327        &self.error_log_settings
328    }
329    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
330        self._request_id = Some(request_id.into());
331        self
332    }
333
334    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
335        self._request_id = request_id;
336        self
337    }
338    /// Consumes the builder and constructs a [`CreateBotOutput`](crate::operation::create_bot::CreateBotOutput).
339    pub fn build(self) -> crate::operation::create_bot::CreateBotOutput {
340        crate::operation::create_bot::CreateBotOutput {
341            bot_id: self.bot_id,
342            bot_name: self.bot_name,
343            description: self.description,
344            role_arn: self.role_arn,
345            data_privacy: self.data_privacy,
346            idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
347            bot_status: self.bot_status,
348            creation_date_time: self.creation_date_time,
349            bot_tags: self.bot_tags,
350            test_bot_alias_tags: self.test_bot_alias_tags,
351            bot_type: self.bot_type,
352            bot_members: self.bot_members,
353            error_log_settings: self.error_log_settings,
354            _request_id: self._request_id,
355        }
356    }
357}