aws_sdk_lexmodelsv2/operation/delete_slot/
_delete_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 DeleteSlotInput {
6    /// <p>The identifier of the slot to delete.</p>
7    pub slot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the bot associated with the slot to delete.</p>
9    pub bot_id: ::std::option::Option<::std::string::String>,
10    /// <p>The version of the bot associated with the slot to delete.</p>
11    pub bot_version: ::std::option::Option<::std::string::String>,
12    /// <p>The identifier of the language and locale that the slot will be deleted from. 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>
13    pub locale_id: ::std::option::Option<::std::string::String>,
14    /// <p>The identifier of the intent associated with the slot.</p>
15    pub intent_id: ::std::option::Option<::std::string::String>,
16}
17impl DeleteSlotInput {
18    /// <p>The identifier of the slot to delete.</p>
19    pub fn slot_id(&self) -> ::std::option::Option<&str> {
20        self.slot_id.as_deref()
21    }
22    /// <p>The identifier of the bot associated with the slot to delete.</p>
23    pub fn bot_id(&self) -> ::std::option::Option<&str> {
24        self.bot_id.as_deref()
25    }
26    /// <p>The version of the bot associated with the slot to delete.</p>
27    pub fn bot_version(&self) -> ::std::option::Option<&str> {
28        self.bot_version.as_deref()
29    }
30    /// <p>The identifier of the language and locale that the slot will be deleted from. 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>
31    pub fn locale_id(&self) -> ::std::option::Option<&str> {
32        self.locale_id.as_deref()
33    }
34    /// <p>The identifier of the intent associated with the slot.</p>
35    pub fn intent_id(&self) -> ::std::option::Option<&str> {
36        self.intent_id.as_deref()
37    }
38}
39impl DeleteSlotInput {
40    /// Creates a new builder-style object to manufacture [`DeleteSlotInput`](crate::operation::delete_slot::DeleteSlotInput).
41    pub fn builder() -> crate::operation::delete_slot::builders::DeleteSlotInputBuilder {
42        crate::operation::delete_slot::builders::DeleteSlotInputBuilder::default()
43    }
44}
45
46/// A builder for [`DeleteSlotInput`](crate::operation::delete_slot::DeleteSlotInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct DeleteSlotInputBuilder {
50    pub(crate) slot_id: ::std::option::Option<::std::string::String>,
51    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
52    pub(crate) bot_version: ::std::option::Option<::std::string::String>,
53    pub(crate) locale_id: ::std::option::Option<::std::string::String>,
54    pub(crate) intent_id: ::std::option::Option<::std::string::String>,
55}
56impl DeleteSlotInputBuilder {
57    /// <p>The identifier of the slot to delete.</p>
58    /// This field is required.
59    pub fn slot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.slot_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The identifier of the slot to delete.</p>
64    pub fn set_slot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.slot_id = input;
66        self
67    }
68    /// <p>The identifier of the slot to delete.</p>
69    pub fn get_slot_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.slot_id
71    }
72    /// <p>The identifier of the bot associated with the slot to delete.</p>
73    /// This field is required.
74    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.bot_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The identifier of the bot associated with the slot to delete.</p>
79    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.bot_id = input;
81        self
82    }
83    /// <p>The identifier of the bot associated with the slot to delete.</p>
84    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.bot_id
86    }
87    /// <p>The version of the bot associated with the slot to delete.</p>
88    /// This field is required.
89    pub fn bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.bot_version = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The version of the bot associated with the slot to delete.</p>
94    pub fn set_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.bot_version = input;
96        self
97    }
98    /// <p>The version of the bot associated with the slot to delete.</p>
99    pub fn get_bot_version(&self) -> &::std::option::Option<::std::string::String> {
100        &self.bot_version
101    }
102    /// <p>The identifier of the language and locale that the slot will be deleted from. 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>
103    /// This field is required.
104    pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.locale_id = ::std::option::Option::Some(input.into());
106        self
107    }
108    /// <p>The identifier of the language and locale that the slot will be deleted from. 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>
109    pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.locale_id = input;
111        self
112    }
113    /// <p>The identifier of the language and locale that the slot will be deleted from. 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>
114    pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
115        &self.locale_id
116    }
117    /// <p>The identifier of the intent associated with the slot.</p>
118    /// This field is required.
119    pub fn intent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.intent_id = ::std::option::Option::Some(input.into());
121        self
122    }
123    /// <p>The identifier of the intent associated with the slot.</p>
124    pub fn set_intent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.intent_id = input;
126        self
127    }
128    /// <p>The identifier of the intent associated with the slot.</p>
129    pub fn get_intent_id(&self) -> &::std::option::Option<::std::string::String> {
130        &self.intent_id
131    }
132    /// Consumes the builder and constructs a [`DeleteSlotInput`](crate::operation::delete_slot::DeleteSlotInput).
133    pub fn build(self) -> ::std::result::Result<crate::operation::delete_slot::DeleteSlotInput, ::aws_smithy_types::error::operation::BuildError> {
134        ::std::result::Result::Ok(crate::operation::delete_slot::DeleteSlotInput {
135            slot_id: self.slot_id,
136            bot_id: self.bot_id,
137            bot_version: self.bot_version,
138            locale_id: self.locale_id,
139            intent_id: self.intent_id,
140        })
141    }
142}