aws_sdk_iotmanagedintegrations/operation/create_destination/
_create_destination_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateDestinationInput {
6 pub delivery_destination_arn: ::std::option::Option<::std::string::String>,
8 pub delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
10 pub name: ::std::option::Option<::std::string::String>,
12 pub role_arn: ::std::option::Option<::std::string::String>,
14 pub client_token: ::std::option::Option<::std::string::String>,
16 pub description: ::std::option::Option<::std::string::String>,
18 #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
20 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
21}
22impl CreateDestinationInput {
23 pub fn delivery_destination_arn(&self) -> ::std::option::Option<&str> {
25 self.delivery_destination_arn.as_deref()
26 }
27 pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
29 self.delivery_destination_type.as_ref()
30 }
31 pub fn name(&self) -> ::std::option::Option<&str> {
33 self.name.as_deref()
34 }
35 pub fn role_arn(&self) -> ::std::option::Option<&str> {
37 self.role_arn.as_deref()
38 }
39 pub fn client_token(&self) -> ::std::option::Option<&str> {
41 self.client_token.as_deref()
42 }
43 pub fn description(&self) -> ::std::option::Option<&str> {
45 self.description.as_deref()
46 }
47 #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
49 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
50 self.tags.as_ref()
51 }
52}
53impl ::std::fmt::Debug for CreateDestinationInput {
54 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
55 let mut formatter = f.debug_struct("CreateDestinationInput");
56 formatter.field("delivery_destination_arn", &self.delivery_destination_arn);
57 formatter.field("delivery_destination_type", &self.delivery_destination_type);
58 formatter.field("name", &self.name);
59 formatter.field("role_arn", &self.role_arn);
60 formatter.field("client_token", &self.client_token);
61 formatter.field("description", &self.description);
62 formatter.field("tags", &"*** Sensitive Data Redacted ***");
63 formatter.finish()
64 }
65}
66impl CreateDestinationInput {
67 pub fn builder() -> crate::operation::create_destination::builders::CreateDestinationInputBuilder {
69 crate::operation::create_destination::builders::CreateDestinationInputBuilder::default()
70 }
71}
72
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
75#[non_exhaustive]
76pub struct CreateDestinationInputBuilder {
77 pub(crate) delivery_destination_arn: ::std::option::Option<::std::string::String>,
78 pub(crate) delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
79 pub(crate) name: ::std::option::Option<::std::string::String>,
80 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
81 pub(crate) client_token: ::std::option::Option<::std::string::String>,
82 pub(crate) description: ::std::option::Option<::std::string::String>,
83 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
84}
85impl CreateDestinationInputBuilder {
86 pub fn delivery_destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.delivery_destination_arn = ::std::option::Option::Some(input.into());
90 self
91 }
92 pub fn set_delivery_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.delivery_destination_arn = input;
95 self
96 }
97 pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
99 &self.delivery_destination_arn
100 }
101 pub fn delivery_destination_type(mut self, input: crate::types::DeliveryDestinationType) -> Self {
104 self.delivery_destination_type = ::std::option::Option::Some(input);
105 self
106 }
107 pub fn set_delivery_destination_type(mut self, input: ::std::option::Option<crate::types::DeliveryDestinationType>) -> Self {
109 self.delivery_destination_type = input;
110 self
111 }
112 pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
114 &self.delivery_destination_type
115 }
116 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.name = ::std::option::Option::Some(input.into());
120 self
121 }
122 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.name = input;
125 self
126 }
127 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
129 &self.name
130 }
131 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.role_arn = ::std::option::Option::Some(input.into());
135 self
136 }
137 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.role_arn = input;
140 self
141 }
142 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
144 &self.role_arn
145 }
146 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.client_token = ::std::option::Option::Some(input.into());
149 self
150 }
151 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.client_token = input;
154 self
155 }
156 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
158 &self.client_token
159 }
160 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.description = ::std::option::Option::Some(input.into());
163 self
164 }
165 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.description = input;
168 self
169 }
170 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
172 &self.description
173 }
174 #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
180 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
181 let mut hash_map = self.tags.unwrap_or_default();
182 hash_map.insert(k.into(), v.into());
183 self.tags = ::std::option::Option::Some(hash_map);
184 self
185 }
186 #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
188 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
189 self.tags = input;
190 self
191 }
192 #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
194 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
195 &self.tags
196 }
197 pub fn build(
199 self,
200 ) -> ::std::result::Result<crate::operation::create_destination::CreateDestinationInput, ::aws_smithy_types::error::operation::BuildError> {
201 ::std::result::Result::Ok(crate::operation::create_destination::CreateDestinationInput {
202 delivery_destination_arn: self.delivery_destination_arn,
203 delivery_destination_type: self.delivery_destination_type,
204 name: self.name,
205 role_arn: self.role_arn,
206 client_token: self.client_token,
207 description: self.description,
208 tags: self.tags,
209 })
210 }
211}
212impl ::std::fmt::Debug for CreateDestinationInputBuilder {
213 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
214 let mut formatter = f.debug_struct("CreateDestinationInputBuilder");
215 formatter.field("delivery_destination_arn", &self.delivery_destination_arn);
216 formatter.field("delivery_destination_type", &self.delivery_destination_type);
217 formatter.field("name", &self.name);
218 formatter.field("role_arn", &self.role_arn);
219 formatter.field("client_token", &self.client_token);
220 formatter.field("description", &self.description);
221 formatter.field("tags", &"*** Sensitive Data Redacted ***");
222 formatter.finish()
223 }
224}