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    _request_id: Option<String>,
31}
32impl CreateBotOutput {
33    /// <p>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</p>
34    pub fn bot_id(&self) -> ::std::option::Option<&str> {
35        self.bot_id.as_deref()
36    }
37    /// <p>The name specified for the bot.</p>
38    pub fn bot_name(&self) -> ::std::option::Option<&str> {
39        self.bot_name.as_deref()
40    }
41    /// <p>The description specified for the bot.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The IAM role specified for the bot.</p>
46    pub fn role_arn(&self) -> ::std::option::Option<&str> {
47        self.role_arn.as_deref()
48    }
49    /// <p>The data privacy settings specified for the bot.</p>
50    pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
51        self.data_privacy.as_ref()
52    }
53    /// <p>The session idle time specified for the bot.</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 indicating 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 list of tags associated with the bot.</p>
66    pub fn bot_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
67        self.bot_tags.as_ref()
68    }
69    /// <p>A list of tags associated with the test alias for the bot.</p>
70    pub fn test_bot_alias_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
71        self.test_bot_alias_tags.as_ref()
72    }
73    /// <p>The type of a bot that was created.</p>
74    pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
75        self.bot_type.as_ref()
76    }
77    /// <p>The list of bots in a network that was created.</p>
78    ///
79    /// 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()`.
80    pub fn bot_members(&self) -> &[crate::types::BotMember] {
81        self.bot_members.as_deref().unwrap_or_default()
82    }
83}
84impl ::aws_types::request_id::RequestId for CreateBotOutput {
85    fn request_id(&self) -> Option<&str> {
86        self._request_id.as_deref()
87    }
88}
89impl CreateBotOutput {
90    /// Creates a new builder-style object to manufacture [`CreateBotOutput`](crate::operation::create_bot::CreateBotOutput).
91    pub fn builder() -> crate::operation::create_bot::builders::CreateBotOutputBuilder {
92        crate::operation::create_bot::builders::CreateBotOutputBuilder::default()
93    }
94}
95
96/// A builder for [`CreateBotOutput`](crate::operation::create_bot::CreateBotOutput).
97#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
98#[non_exhaustive]
99pub struct CreateBotOutputBuilder {
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) bot_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
109    pub(crate) test_bot_alias_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
110    pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
111    pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
112    _request_id: Option<String>,
113}
114impl CreateBotOutputBuilder {
115    /// <p>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</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>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</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>A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.</p>
126    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
127        &self.bot_id
128    }
129    /// <p>The name specified for the bot.</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 specified for the bot.</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 specified for the bot.</p>
140    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
141        &self.bot_name
142    }
143    /// <p>The description specified for the bot.</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 specified for the bot.</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 specified for the bot.</p>
154    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
155        &self.description
156    }
157    /// <p>The IAM role specified for the bot.</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 IAM role specified for the bot.</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 IAM role specified for the bot.</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 specified for the bot.</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 specified for the bot.</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 specified for the bot.</p>
182    pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
183        &self.data_privacy
184    }
185    /// <p>The session idle time specified for the bot.</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 idle time specified for the bot.</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 idle time specified for the bot.</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 indicating 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 indicating 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 indicating 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    /// Adds a key-value pair to `bot_tags`.
228    ///
229    /// To override the contents of this collection use [`set_bot_tags`](Self::set_bot_tags).
230    ///
231    /// <p>A list of tags associated with the bot.</p>
232    pub fn bot_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
233        let mut hash_map = self.bot_tags.unwrap_or_default();
234        hash_map.insert(k.into(), v.into());
235        self.bot_tags = ::std::option::Option::Some(hash_map);
236        self
237    }
238    /// <p>A list of tags associated with the bot.</p>
239    pub fn set_bot_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
240        self.bot_tags = input;
241        self
242    }
243    /// <p>A list of tags associated with the bot.</p>
244    pub fn get_bot_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
245        &self.bot_tags
246    }
247    /// Adds a key-value pair to `test_bot_alias_tags`.
248    ///
249    /// To override the contents of this collection use [`set_test_bot_alias_tags`](Self::set_test_bot_alias_tags).
250    ///
251    /// <p>A list of tags associated with the test alias for the bot.</p>
252    pub fn test_bot_alias_tags(
253        mut self,
254        k: impl ::std::convert::Into<::std::string::String>,
255        v: impl ::std::convert::Into<::std::string::String>,
256    ) -> Self {
257        let mut hash_map = self.test_bot_alias_tags.unwrap_or_default();
258        hash_map.insert(k.into(), v.into());
259        self.test_bot_alias_tags = ::std::option::Option::Some(hash_map);
260        self
261    }
262    /// <p>A list of tags associated with the test alias for the bot.</p>
263    pub fn set_test_bot_alias_tags(
264        mut self,
265        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
266    ) -> Self {
267        self.test_bot_alias_tags = input;
268        self
269    }
270    /// <p>A list of tags associated with the test alias for the bot.</p>
271    pub fn get_test_bot_alias_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
272        &self.test_bot_alias_tags
273    }
274    /// <p>The type of a bot that was created.</p>
275    pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
276        self.bot_type = ::std::option::Option::Some(input);
277        self
278    }
279    /// <p>The type of a bot that was created.</p>
280    pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
281        self.bot_type = input;
282        self
283    }
284    /// <p>The type of a bot that was created.</p>
285    pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
286        &self.bot_type
287    }
288    /// Appends an item to `bot_members`.
289    ///
290    /// To override the contents of this collection use [`set_bot_members`](Self::set_bot_members).
291    ///
292    /// <p>The list of bots in a network that was created.</p>
293    pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
294        let mut v = self.bot_members.unwrap_or_default();
295        v.push(input);
296        self.bot_members = ::std::option::Option::Some(v);
297        self
298    }
299    /// <p>The list of bots in a network that was created.</p>
300    pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
301        self.bot_members = input;
302        self
303    }
304    /// <p>The list of bots in a network that was created.</p>
305    pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
306        &self.bot_members
307    }
308    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
309        self._request_id = Some(request_id.into());
310        self
311    }
312
313    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
314        self._request_id = request_id;
315        self
316    }
317    /// Consumes the builder and constructs a [`CreateBotOutput`](crate::operation::create_bot::CreateBotOutput).
318    pub fn build(self) -> crate::operation::create_bot::CreateBotOutput {
319        crate::operation::create_bot::CreateBotOutput {
320            bot_id: self.bot_id,
321            bot_name: self.bot_name,
322            description: self.description,
323            role_arn: self.role_arn,
324            data_privacy: self.data_privacy,
325            idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
326            bot_status: self.bot_status,
327            creation_date_time: self.creation_date_time,
328            bot_tags: self.bot_tags,
329            test_bot_alias_tags: self.test_bot_alias_tags,
330            bot_type: self.bot_type,
331            bot_members: self.bot_members,
332            _request_id: self._request_id,
333        }
334    }
335}