aws_sdk_lexmodelsv2/operation/update_slot/
_update_slot_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 UpdateSlotInput {
6    /// <p>The unique identifier for the slot to update.</p>
7    pub slot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The new name for the slot.</p>
9    pub slot_name: ::std::option::Option<::std::string::String>,
10    /// <p>The new description for the slot.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The unique identifier of the new slot type to associate with this slot.</p>
13    pub slot_type_id: ::std::option::Option<::std::string::String>,
14    /// <p>A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.</p>
15    pub value_elicitation_setting: ::std::option::Option<crate::types::SlotValueElicitationSetting>,
16    /// <p>New settings that determine how slot values are formatted in Amazon CloudWatch logs.</p>
17    pub obfuscation_setting: ::std::option::Option<crate::types::ObfuscationSetting>,
18    /// <p>The unique identifier of the bot that contains the slot.</p>
19    pub bot_id: ::std::option::Option<::std::string::String>,
20    /// <p>The version of the bot that contains the slot. Must always be <code>DRAFT</code>.</p>
21    pub bot_version: ::std::option::Option<::std::string::String>,
22    /// <p>The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
23    pub locale_id: ::std::option::Option<::std::string::String>,
24    /// <p>The identifier of the intent that contains the slot.</p>
25    pub intent_id: ::std::option::Option<::std::string::String>,
26    /// <p>Determines whether the slot accepts multiple values in one response. Multiple value slots are only available in the en-US locale. If you set this value to <code>true</code> in any other locale, Amazon Lex throws a <code>ValidationException</code>.</p>
27    /// <p>If the <code>multipleValuesSetting</code> is not set, the default value is <code>false</code>.</p>
28    pub multiple_values_setting: ::std::option::Option<crate::types::MultipleValuesSetting>,
29    /// <p>Specifications for the constituent sub slots and the expression for the composite slot.</p>
30    pub sub_slot_setting: ::std::option::Option<crate::types::SubSlotSetting>,
31}
32impl UpdateSlotInput {
33    /// <p>The unique identifier for the slot to update.</p>
34    pub fn slot_id(&self) -> ::std::option::Option<&str> {
35        self.slot_id.as_deref()
36    }
37    /// <p>The new name for the slot.</p>
38    pub fn slot_name(&self) -> ::std::option::Option<&str> {
39        self.slot_name.as_deref()
40    }
41    /// <p>The new description for the slot.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The unique identifier of the new slot type to associate with this slot.</p>
46    pub fn slot_type_id(&self) -> ::std::option::Option<&str> {
47        self.slot_type_id.as_deref()
48    }
49    /// <p>A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.</p>
50    pub fn value_elicitation_setting(&self) -> ::std::option::Option<&crate::types::SlotValueElicitationSetting> {
51        self.value_elicitation_setting.as_ref()
52    }
53    /// <p>New settings that determine how slot values are formatted in Amazon CloudWatch logs.</p>
54    pub fn obfuscation_setting(&self) -> ::std::option::Option<&crate::types::ObfuscationSetting> {
55        self.obfuscation_setting.as_ref()
56    }
57    /// <p>The unique identifier of the bot that contains the slot.</p>
58    pub fn bot_id(&self) -> ::std::option::Option<&str> {
59        self.bot_id.as_deref()
60    }
61    /// <p>The version of the bot that contains the slot. Must always be <code>DRAFT</code>.</p>
62    pub fn bot_version(&self) -> ::std::option::Option<&str> {
63        self.bot_version.as_deref()
64    }
65    /// <p>The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
66    pub fn locale_id(&self) -> ::std::option::Option<&str> {
67        self.locale_id.as_deref()
68    }
69    /// <p>The identifier of the intent that contains the slot.</p>
70    pub fn intent_id(&self) -> ::std::option::Option<&str> {
71        self.intent_id.as_deref()
72    }
73    /// <p>Determines whether the slot accepts multiple values in one response. Multiple value slots are only available in the en-US locale. If you set this value to <code>true</code> in any other locale, Amazon Lex throws a <code>ValidationException</code>.</p>
74    /// <p>If the <code>multipleValuesSetting</code> is not set, the default value is <code>false</code>.</p>
75    pub fn multiple_values_setting(&self) -> ::std::option::Option<&crate::types::MultipleValuesSetting> {
76        self.multiple_values_setting.as_ref()
77    }
78    /// <p>Specifications for the constituent sub slots and the expression for the composite slot.</p>
79    pub fn sub_slot_setting(&self) -> ::std::option::Option<&crate::types::SubSlotSetting> {
80        self.sub_slot_setting.as_ref()
81    }
82}
83impl UpdateSlotInput {
84    /// Creates a new builder-style object to manufacture [`UpdateSlotInput`](crate::operation::update_slot::UpdateSlotInput).
85    pub fn builder() -> crate::operation::update_slot::builders::UpdateSlotInputBuilder {
86        crate::operation::update_slot::builders::UpdateSlotInputBuilder::default()
87    }
88}
89
90/// A builder for [`UpdateSlotInput`](crate::operation::update_slot::UpdateSlotInput).
91#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
92#[non_exhaustive]
93pub struct UpdateSlotInputBuilder {
94    pub(crate) slot_id: ::std::option::Option<::std::string::String>,
95    pub(crate) slot_name: ::std::option::Option<::std::string::String>,
96    pub(crate) description: ::std::option::Option<::std::string::String>,
97    pub(crate) slot_type_id: ::std::option::Option<::std::string::String>,
98    pub(crate) value_elicitation_setting: ::std::option::Option<crate::types::SlotValueElicitationSetting>,
99    pub(crate) obfuscation_setting: ::std::option::Option<crate::types::ObfuscationSetting>,
100    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
101    pub(crate) bot_version: ::std::option::Option<::std::string::String>,
102    pub(crate) locale_id: ::std::option::Option<::std::string::String>,
103    pub(crate) intent_id: ::std::option::Option<::std::string::String>,
104    pub(crate) multiple_values_setting: ::std::option::Option<crate::types::MultipleValuesSetting>,
105    pub(crate) sub_slot_setting: ::std::option::Option<crate::types::SubSlotSetting>,
106}
107impl UpdateSlotInputBuilder {
108    /// <p>The unique identifier for the slot to update.</p>
109    /// This field is required.
110    pub fn slot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.slot_id = ::std::option::Option::Some(input.into());
112        self
113    }
114    /// <p>The unique identifier for the slot to update.</p>
115    pub fn set_slot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.slot_id = input;
117        self
118    }
119    /// <p>The unique identifier for the slot to update.</p>
120    pub fn get_slot_id(&self) -> &::std::option::Option<::std::string::String> {
121        &self.slot_id
122    }
123    /// <p>The new name for the slot.</p>
124    /// This field is required.
125    pub fn slot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.slot_name = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>The new name for the slot.</p>
130    pub fn set_slot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.slot_name = input;
132        self
133    }
134    /// <p>The new name for the slot.</p>
135    pub fn get_slot_name(&self) -> &::std::option::Option<::std::string::String> {
136        &self.slot_name
137    }
138    /// <p>The new description for the slot.</p>
139    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.description = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The new description for the slot.</p>
144    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.description = input;
146        self
147    }
148    /// <p>The new description for the slot.</p>
149    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
150        &self.description
151    }
152    /// <p>The unique identifier of the new slot type to associate with this slot.</p>
153    pub fn slot_type_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.slot_type_id = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The unique identifier of the new slot type to associate with this slot.</p>
158    pub fn set_slot_type_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.slot_type_id = input;
160        self
161    }
162    /// <p>The unique identifier of the new slot type to associate with this slot.</p>
163    pub fn get_slot_type_id(&self) -> &::std::option::Option<::std::string::String> {
164        &self.slot_type_id
165    }
166    /// <p>A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.</p>
167    /// This field is required.
168    pub fn value_elicitation_setting(mut self, input: crate::types::SlotValueElicitationSetting) -> Self {
169        self.value_elicitation_setting = ::std::option::Option::Some(input);
170        self
171    }
172    /// <p>A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.</p>
173    pub fn set_value_elicitation_setting(mut self, input: ::std::option::Option<crate::types::SlotValueElicitationSetting>) -> Self {
174        self.value_elicitation_setting = input;
175        self
176    }
177    /// <p>A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.</p>
178    pub fn get_value_elicitation_setting(&self) -> &::std::option::Option<crate::types::SlotValueElicitationSetting> {
179        &self.value_elicitation_setting
180    }
181    /// <p>New settings that determine how slot values are formatted in Amazon CloudWatch logs.</p>
182    pub fn obfuscation_setting(mut self, input: crate::types::ObfuscationSetting) -> Self {
183        self.obfuscation_setting = ::std::option::Option::Some(input);
184        self
185    }
186    /// <p>New settings that determine how slot values are formatted in Amazon CloudWatch logs.</p>
187    pub fn set_obfuscation_setting(mut self, input: ::std::option::Option<crate::types::ObfuscationSetting>) -> Self {
188        self.obfuscation_setting = input;
189        self
190    }
191    /// <p>New settings that determine how slot values are formatted in Amazon CloudWatch logs.</p>
192    pub fn get_obfuscation_setting(&self) -> &::std::option::Option<crate::types::ObfuscationSetting> {
193        &self.obfuscation_setting
194    }
195    /// <p>The unique identifier of the bot that contains the slot.</p>
196    /// This field is required.
197    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198        self.bot_id = ::std::option::Option::Some(input.into());
199        self
200    }
201    /// <p>The unique identifier of the bot that contains the slot.</p>
202    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.bot_id = input;
204        self
205    }
206    /// <p>The unique identifier of the bot that contains the slot.</p>
207    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
208        &self.bot_id
209    }
210    /// <p>The version of the bot that contains the slot. Must always be <code>DRAFT</code>.</p>
211    /// This field is required.
212    pub fn bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.bot_version = ::std::option::Option::Some(input.into());
214        self
215    }
216    /// <p>The version of the bot that contains the slot. Must always be <code>DRAFT</code>.</p>
217    pub fn set_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218        self.bot_version = input;
219        self
220    }
221    /// <p>The version of the bot that contains the slot. Must always be <code>DRAFT</code>.</p>
222    pub fn get_bot_version(&self) -> &::std::option::Option<::std::string::String> {
223        &self.bot_version
224    }
225    /// <p>The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
226    /// This field is required.
227    pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.locale_id = ::std::option::Option::Some(input.into());
229        self
230    }
231    /// <p>The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
232    pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.locale_id = input;
234        self
235    }
236    /// <p>The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
237    pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
238        &self.locale_id
239    }
240    /// <p>The identifier of the intent that contains the slot.</p>
241    /// This field is required.
242    pub fn intent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
243        self.intent_id = ::std::option::Option::Some(input.into());
244        self
245    }
246    /// <p>The identifier of the intent that contains the slot.</p>
247    pub fn set_intent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
248        self.intent_id = input;
249        self
250    }
251    /// <p>The identifier of the intent that contains the slot.</p>
252    pub fn get_intent_id(&self) -> &::std::option::Option<::std::string::String> {
253        &self.intent_id
254    }
255    /// <p>Determines whether the slot accepts multiple values in one response. Multiple value slots are only available in the en-US locale. If you set this value to <code>true</code> in any other locale, Amazon Lex throws a <code>ValidationException</code>.</p>
256    /// <p>If the <code>multipleValuesSetting</code> is not set, the default value is <code>false</code>.</p>
257    pub fn multiple_values_setting(mut self, input: crate::types::MultipleValuesSetting) -> Self {
258        self.multiple_values_setting = ::std::option::Option::Some(input);
259        self
260    }
261    /// <p>Determines whether the slot accepts multiple values in one response. Multiple value slots are only available in the en-US locale. If you set this value to <code>true</code> in any other locale, Amazon Lex throws a <code>ValidationException</code>.</p>
262    /// <p>If the <code>multipleValuesSetting</code> is not set, the default value is <code>false</code>.</p>
263    pub fn set_multiple_values_setting(mut self, input: ::std::option::Option<crate::types::MultipleValuesSetting>) -> Self {
264        self.multiple_values_setting = input;
265        self
266    }
267    /// <p>Determines whether the slot accepts multiple values in one response. Multiple value slots are only available in the en-US locale. If you set this value to <code>true</code> in any other locale, Amazon Lex throws a <code>ValidationException</code>.</p>
268    /// <p>If the <code>multipleValuesSetting</code> is not set, the default value is <code>false</code>.</p>
269    pub fn get_multiple_values_setting(&self) -> &::std::option::Option<crate::types::MultipleValuesSetting> {
270        &self.multiple_values_setting
271    }
272    /// <p>Specifications for the constituent sub slots and the expression for the composite slot.</p>
273    pub fn sub_slot_setting(mut self, input: crate::types::SubSlotSetting) -> Self {
274        self.sub_slot_setting = ::std::option::Option::Some(input);
275        self
276    }
277    /// <p>Specifications for the constituent sub slots and the expression for the composite slot.</p>
278    pub fn set_sub_slot_setting(mut self, input: ::std::option::Option<crate::types::SubSlotSetting>) -> Self {
279        self.sub_slot_setting = input;
280        self
281    }
282    /// <p>Specifications for the constituent sub slots and the expression for the composite slot.</p>
283    pub fn get_sub_slot_setting(&self) -> &::std::option::Option<crate::types::SubSlotSetting> {
284        &self.sub_slot_setting
285    }
286    /// Consumes the builder and constructs a [`UpdateSlotInput`](crate::operation::update_slot::UpdateSlotInput).
287    pub fn build(self) -> ::std::result::Result<crate::operation::update_slot::UpdateSlotInput, ::aws_smithy_types::error::operation::BuildError> {
288        ::std::result::Result::Ok(crate::operation::update_slot::UpdateSlotInput {
289            slot_id: self.slot_id,
290            slot_name: self.slot_name,
291            description: self.description,
292            slot_type_id: self.slot_type_id,
293            value_elicitation_setting: self.value_elicitation_setting,
294            obfuscation_setting: self.obfuscation_setting,
295            bot_id: self.bot_id,
296            bot_version: self.bot_version,
297            locale_id: self.locale_id,
298            intent_id: self.intent_id,
299            multiple_values_setting: self.multiple_values_setting,
300            sub_slot_setting: self.sub_slot_setting,
301        })
302    }
303}