aws_sdk_lexmodelsv2/operation/update_bot/_update_bot_input.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 UpdateBotInput {
6 /// <p>The unique identifier of the bot to update. This identifier is returned by the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateBot.html">CreateBot</a> operation.</p>
7 pub bot_id: ::std::option::Option<::std::string::String>,
8 /// <p>The new name of the bot. The name must be unique in the account that creates the bot.</p>
9 pub bot_name: ::std::option::Option<::std::string::String>,
10 /// <p>A 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 permissions to access the bot.</p>
13 pub role_arn: ::std::option::Option<::std::string::String>,
14 /// <p>Provides information on additional privacy protections Amazon Lex should use with the bot's data.</p>
15 pub data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
16 /// <p>The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.</p>
17 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.</p>
18 /// <p>You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.</p>
19 pub idle_session_ttl_in_seconds: ::std::option::Option<i32>,
20 /// <p>The type of the bot to be updated.</p>
21 pub bot_type: ::std::option::Option<crate::types::BotType>,
22 /// <p>The list of bot members in the network associated with the update action.</p>
23 pub bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
24 /// <p>Allows you to modify how Amazon Lex logs errors during bot interactions, including destinations for error logs and the types of errors to be captured.</p>
25 pub error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
26}
27impl UpdateBotInput {
28 /// <p>The unique identifier of the bot to update. This identifier is returned by the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateBot.html">CreateBot</a> operation.</p>
29 pub fn bot_id(&self) -> ::std::option::Option<&str> {
30 self.bot_id.as_deref()
31 }
32 /// <p>The new name of the bot. The name must be unique in the account that creates the bot.</p>
33 pub fn bot_name(&self) -> ::std::option::Option<&str> {
34 self.bot_name.as_deref()
35 }
36 /// <p>A description of the bot.</p>
37 pub fn description(&self) -> ::std::option::Option<&str> {
38 self.description.as_deref()
39 }
40 /// <p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.</p>
41 pub fn role_arn(&self) -> ::std::option::Option<&str> {
42 self.role_arn.as_deref()
43 }
44 /// <p>Provides information on additional privacy protections Amazon Lex should use with the bot's data.</p>
45 pub fn data_privacy(&self) -> ::std::option::Option<&crate::types::DataPrivacy> {
46 self.data_privacy.as_ref()
47 }
48 /// <p>The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.</p>
49 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.</p>
50 /// <p>You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.</p>
51 pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
52 self.idle_session_ttl_in_seconds
53 }
54 /// <p>The type of the bot to be updated.</p>
55 pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
56 self.bot_type.as_ref()
57 }
58 /// <p>The list of bot members in the network associated with the update action.</p>
59 ///
60 /// 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()`.
61 pub fn bot_members(&self) -> &[crate::types::BotMember] {
62 self.bot_members.as_deref().unwrap_or_default()
63 }
64 /// <p>Allows you to modify how Amazon Lex logs errors during bot interactions, including destinations for error logs and the types of errors to be captured.</p>
65 pub fn error_log_settings(&self) -> ::std::option::Option<&crate::types::ErrorLogSettings> {
66 self.error_log_settings.as_ref()
67 }
68}
69impl UpdateBotInput {
70 /// Creates a new builder-style object to manufacture [`UpdateBotInput`](crate::operation::update_bot::UpdateBotInput).
71 pub fn builder() -> crate::operation::update_bot::builders::UpdateBotInputBuilder {
72 crate::operation::update_bot::builders::UpdateBotInputBuilder::default()
73 }
74}
75
76/// A builder for [`UpdateBotInput`](crate::operation::update_bot::UpdateBotInput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct UpdateBotInputBuilder {
80 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
81 pub(crate) bot_name: ::std::option::Option<::std::string::String>,
82 pub(crate) description: ::std::option::Option<::std::string::String>,
83 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
84 pub(crate) data_privacy: ::std::option::Option<crate::types::DataPrivacy>,
85 pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
86 pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
87 pub(crate) bot_members: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>,
88 pub(crate) error_log_settings: ::std::option::Option<crate::types::ErrorLogSettings>,
89}
90impl UpdateBotInputBuilder {
91 /// <p>The unique identifier of the bot to update. This identifier is returned by the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateBot.html">CreateBot</a> operation.</p>
92 /// This field is required.
93 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.bot_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 /// <p>The unique identifier of the bot to update. This identifier is returned by the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateBot.html">CreateBot</a> operation.</p>
98 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.bot_id = input;
100 self
101 }
102 /// <p>The unique identifier of the bot to update. This identifier is returned by the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateBot.html">CreateBot</a> operation.</p>
103 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.bot_id
105 }
106 /// <p>The new name of the bot. The name must be unique in the account that creates the bot.</p>
107 /// This field is required.
108 pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.bot_name = ::std::option::Option::Some(input.into());
110 self
111 }
112 /// <p>The new name of the bot. The name must be unique in the account that creates the bot.</p>
113 pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.bot_name = input;
115 self
116 }
117 /// <p>The new name of the bot. The name must be unique in the account that creates the bot.</p>
118 pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
119 &self.bot_name
120 }
121 /// <p>A description of the bot.</p>
122 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.description = ::std::option::Option::Some(input.into());
124 self
125 }
126 /// <p>A description of the bot.</p>
127 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.description = input;
129 self
130 }
131 /// <p>A description of the bot.</p>
132 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
133 &self.description
134 }
135 /// <p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.</p>
136 /// This field is required.
137 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.role_arn = ::std::option::Option::Some(input.into());
139 self
140 }
141 /// <p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.</p>
142 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.role_arn = input;
144 self
145 }
146 /// <p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.</p>
147 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
148 &self.role_arn
149 }
150 /// <p>Provides information on additional privacy protections Amazon Lex should use with the bot's data.</p>
151 /// This field is required.
152 pub fn data_privacy(mut self, input: crate::types::DataPrivacy) -> Self {
153 self.data_privacy = ::std::option::Option::Some(input);
154 self
155 }
156 /// <p>Provides information on additional privacy protections Amazon Lex should use with the bot's data.</p>
157 pub fn set_data_privacy(mut self, input: ::std::option::Option<crate::types::DataPrivacy>) -> Self {
158 self.data_privacy = input;
159 self
160 }
161 /// <p>Provides information on additional privacy protections Amazon Lex should use with the bot's data.</p>
162 pub fn get_data_privacy(&self) -> &::std::option::Option<crate::types::DataPrivacy> {
163 &self.data_privacy
164 }
165 /// <p>The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.</p>
166 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.</p>
167 /// <p>You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.</p>
168 /// This field is required.
169 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
170 self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
171 self
172 }
173 /// <p>The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.</p>
174 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.</p>
175 /// <p>You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.</p>
176 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
177 self.idle_session_ttl_in_seconds = input;
178 self
179 }
180 /// <p>The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.</p>
181 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.</p>
182 /// <p>You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.</p>
183 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
184 &self.idle_session_ttl_in_seconds
185 }
186 /// <p>The type of the bot to be updated.</p>
187 pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
188 self.bot_type = ::std::option::Option::Some(input);
189 self
190 }
191 /// <p>The type of the bot to be updated.</p>
192 pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
193 self.bot_type = input;
194 self
195 }
196 /// <p>The type of the bot to be updated.</p>
197 pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
198 &self.bot_type
199 }
200 /// Appends an item to `bot_members`.
201 ///
202 /// To override the contents of this collection use [`set_bot_members`](Self::set_bot_members).
203 ///
204 /// <p>The list of bot members in the network associated with the update action.</p>
205 pub fn bot_members(mut self, input: crate::types::BotMember) -> Self {
206 let mut v = self.bot_members.unwrap_or_default();
207 v.push(input);
208 self.bot_members = ::std::option::Option::Some(v);
209 self
210 }
211 /// <p>The list of bot members in the network associated with the update action.</p>
212 pub fn set_bot_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BotMember>>) -> Self {
213 self.bot_members = input;
214 self
215 }
216 /// <p>The list of bot members in the network associated with the update action.</p>
217 pub fn get_bot_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BotMember>> {
218 &self.bot_members
219 }
220 /// <p>Allows you to modify how Amazon Lex logs errors during bot interactions, including destinations for error logs and the types of errors to be captured.</p>
221 pub fn error_log_settings(mut self, input: crate::types::ErrorLogSettings) -> Self {
222 self.error_log_settings = ::std::option::Option::Some(input);
223 self
224 }
225 /// <p>Allows you to modify how Amazon Lex logs errors during bot interactions, including destinations for error logs and the types of errors to be captured.</p>
226 pub fn set_error_log_settings(mut self, input: ::std::option::Option<crate::types::ErrorLogSettings>) -> Self {
227 self.error_log_settings = input;
228 self
229 }
230 /// <p>Allows you to modify how Amazon Lex logs errors during bot interactions, including destinations for error logs and the types of errors to be captured.</p>
231 pub fn get_error_log_settings(&self) -> &::std::option::Option<crate::types::ErrorLogSettings> {
232 &self.error_log_settings
233 }
234 /// Consumes the builder and constructs a [`UpdateBotInput`](crate::operation::update_bot::UpdateBotInput).
235 pub fn build(self) -> ::std::result::Result<crate::operation::update_bot::UpdateBotInput, ::aws_smithy_types::error::operation::BuildError> {
236 ::std::result::Result::Ok(crate::operation::update_bot::UpdateBotInput {
237 bot_id: self.bot_id,
238 bot_name: self.bot_name,
239 description: self.description,
240 role_arn: self.role_arn,
241 data_privacy: self.data_privacy,
242 idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
243 bot_type: self.bot_type,
244 bot_members: self.bot_members,
245 error_log_settings: self.error_log_settings,
246 })
247 }
248}