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