aws_sdk_iotmanagedintegrations/operation/create_destination/
_create_destination_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)]
5pub struct CreateDestinationInput {
6    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
7    pub delivery_destination_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The destination type for the customer-managed destination.</p>
9    pub delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
10    /// <p>The name of the customer-managed destination.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
15    pub client_token: ::std::option::Option<::std::string::String>,
16    /// <p>The description of the customer-managed destination.</p>
17    pub description: ::std::option::Option<::std::string::String>,
18    /// <p>A set of key/value pairs that are used to manage the destination.</p>
19    #[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    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
24    pub fn delivery_destination_arn(&self) -> ::std::option::Option<&str> {
25        self.delivery_destination_arn.as_deref()
26    }
27    /// <p>The destination type for the customer-managed destination.</p>
28    pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
29        self.delivery_destination_type.as_ref()
30    }
31    /// <p>The name of the customer-managed destination.</p>
32    pub fn name(&self) -> ::std::option::Option<&str> {
33        self.name.as_deref()
34    }
35    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
36    pub fn role_arn(&self) -> ::std::option::Option<&str> {
37        self.role_arn.as_deref()
38    }
39    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
40    pub fn client_token(&self) -> ::std::option::Option<&str> {
41        self.client_token.as_deref()
42    }
43    /// <p>The description of the customer-managed destination.</p>
44    pub fn description(&self) -> ::std::option::Option<&str> {
45        self.description.as_deref()
46    }
47    /// <p>A set of key/value pairs that are used to manage the destination.</p>
48    #[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    /// Creates a new builder-style object to manufacture [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
68    pub fn builder() -> crate::operation::create_destination::builders::CreateDestinationInputBuilder {
69        crate::operation::create_destination::builders::CreateDestinationInputBuilder::default()
70    }
71}
72
73/// A builder for [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
74#[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    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
87    /// This field is required.
88    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    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
93    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    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
98    pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
99        &self.delivery_destination_arn
100    }
101    /// <p>The destination type for the customer-managed destination.</p>
102    /// This field is required.
103    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    /// <p>The destination type for the customer-managed destination.</p>
108    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    /// <p>The destination type for the customer-managed destination.</p>
113    pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
114        &self.delivery_destination_type
115    }
116    /// <p>The name of the customer-managed destination.</p>
117    /// This field is required.
118    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    /// <p>The name of the customer-managed destination.</p>
123    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.name = input;
125        self
126    }
127    /// <p>The name of the customer-managed destination.</p>
128    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
129        &self.name
130    }
131    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
132    /// This field is required.
133    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    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
138    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.role_arn = input;
140        self
141    }
142    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
143    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
144        &self.role_arn
145    }
146    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
147    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    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
152    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.client_token = input;
154        self
155    }
156    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
157    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
158        &self.client_token
159    }
160    /// <p>The description of the customer-managed destination.</p>
161    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    /// <p>The description of the customer-managed destination.</p>
166    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.description = input;
168        self
169    }
170    /// <p>The description of the customer-managed destination.</p>
171    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
172        &self.description
173    }
174    /// Adds a key-value pair to `tags`.
175    ///
176    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
177    ///
178    /// <p>A set of key/value pairs that are used to manage the destination.</p>
179    #[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    /// <p>A set of key/value pairs that are used to manage the destination.</p>
187    #[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    /// <p>A set of key/value pairs that are used to manage the destination.</p>
193    #[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    /// Consumes the builder and constructs a [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
198    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}