aws_sdk_lexmodelsv2/operation/delete_slot/
_delete_slot_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteSlotInput {
6 pub slot_id: ::std::option::Option<::std::string::String>,
8 pub bot_id: ::std::option::Option<::std::string::String>,
10 pub bot_version: ::std::option::Option<::std::string::String>,
12 pub locale_id: ::std::option::Option<::std::string::String>,
14 pub intent_id: ::std::option::Option<::std::string::String>,
16}
17impl DeleteSlotInput {
18 pub fn slot_id(&self) -> ::std::option::Option<&str> {
20 self.slot_id.as_deref()
21 }
22 pub fn bot_id(&self) -> ::std::option::Option<&str> {
24 self.bot_id.as_deref()
25 }
26 pub fn bot_version(&self) -> ::std::option::Option<&str> {
28 self.bot_version.as_deref()
29 }
30 pub fn locale_id(&self) -> ::std::option::Option<&str> {
32 self.locale_id.as_deref()
33 }
34 pub fn intent_id(&self) -> ::std::option::Option<&str> {
36 self.intent_id.as_deref()
37 }
38}
39impl DeleteSlotInput {
40 pub fn builder() -> crate::operation::delete_slot::builders::DeleteSlotInputBuilder {
42 crate::operation::delete_slot::builders::DeleteSlotInputBuilder::default()
43 }
44}
45
46#[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 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 pub fn set_slot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.slot_id = input;
66 self
67 }
68 pub fn get_slot_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.slot_id
71 }
72 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 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.bot_id = input;
81 self
82 }
83 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
85 &self.bot_id
86 }
87 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 pub fn set_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.bot_version = input;
96 self
97 }
98 pub fn get_bot_version(&self) -> &::std::option::Option<::std::string::String> {
100 &self.bot_version
101 }
102 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 pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.locale_id = input;
111 self
112 }
113 pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
115 &self.locale_id
116 }
117 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 pub fn set_intent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.intent_id = input;
126 self
127 }
128 pub fn get_intent_id(&self) -> &::std::option::Option<::std::string::String> {
130 &self.intent_id
131 }
132 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}