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    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateDestinationInput {
22    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
23    pub fn delivery_destination_arn(&self) -> ::std::option::Option<&str> {
24        self.delivery_destination_arn.as_deref()
25    }
26    /// <p>The destination type for the customer-managed destination.</p>
27    pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
28        self.delivery_destination_type.as_ref()
29    }
30    /// <p>The name of the customer-managed destination.</p>
31    pub fn name(&self) -> ::std::option::Option<&str> {
32        self.name.as_deref()
33    }
34    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
35    pub fn role_arn(&self) -> ::std::option::Option<&str> {
36        self.role_arn.as_deref()
37    }
38    /// <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>
39    pub fn client_token(&self) -> ::std::option::Option<&str> {
40        self.client_token.as_deref()
41    }
42    /// <p>The description of the customer-managed destination.</p>
43    pub fn description(&self) -> ::std::option::Option<&str> {
44        self.description.as_deref()
45    }
46    /// <p>A set of key/value pairs that are used to manage the destination.</p>
47    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
48        self.tags.as_ref()
49    }
50}
51impl ::std::fmt::Debug for CreateDestinationInput {
52    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53        let mut formatter = f.debug_struct("CreateDestinationInput");
54        formatter.field("delivery_destination_arn", &self.delivery_destination_arn);
55        formatter.field("delivery_destination_type", &self.delivery_destination_type);
56        formatter.field("name", &self.name);
57        formatter.field("role_arn", &self.role_arn);
58        formatter.field("client_token", &self.client_token);
59        formatter.field("description", &self.description);
60        formatter.field("tags", &"*** Sensitive Data Redacted ***");
61        formatter.finish()
62    }
63}
64impl CreateDestinationInput {
65    /// Creates a new builder-style object to manufacture [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
66    pub fn builder() -> crate::operation::create_destination::builders::CreateDestinationInputBuilder {
67        crate::operation::create_destination::builders::CreateDestinationInputBuilder::default()
68    }
69}
70
71/// A builder for [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateDestinationInputBuilder {
75    pub(crate) delivery_destination_arn: ::std::option::Option<::std::string::String>,
76    pub(crate) delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
77    pub(crate) name: ::std::option::Option<::std::string::String>,
78    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
79    pub(crate) client_token: ::std::option::Option<::std::string::String>,
80    pub(crate) description: ::std::option::Option<::std::string::String>,
81    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
82}
83impl CreateDestinationInputBuilder {
84    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
85    /// This field is required.
86    pub fn delivery_destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.delivery_destination_arn = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
91    pub fn set_delivery_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.delivery_destination_arn = input;
93        self
94    }
95    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
96    pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
97        &self.delivery_destination_arn
98    }
99    /// <p>The destination type for the customer-managed destination.</p>
100    /// This field is required.
101    pub fn delivery_destination_type(mut self, input: crate::types::DeliveryDestinationType) -> Self {
102        self.delivery_destination_type = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The destination type for the customer-managed destination.</p>
106    pub fn set_delivery_destination_type(mut self, input: ::std::option::Option<crate::types::DeliveryDestinationType>) -> Self {
107        self.delivery_destination_type = input;
108        self
109    }
110    /// <p>The destination type for the customer-managed destination.</p>
111    pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
112        &self.delivery_destination_type
113    }
114    /// <p>The name of the customer-managed destination.</p>
115    /// This field is required.
116    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.name = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The name of the customer-managed destination.</p>
121    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.name = input;
123        self
124    }
125    /// <p>The name of the customer-managed destination.</p>
126    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
127        &self.name
128    }
129    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
130    /// This field is required.
131    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.role_arn = ::std::option::Option::Some(input.into());
133        self
134    }
135    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
136    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.role_arn = input;
138        self
139    }
140    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
141    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
142        &self.role_arn
143    }
144    /// <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>
145    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.client_token = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <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>
150    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.client_token = input;
152        self
153    }
154    /// <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>
155    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
156        &self.client_token
157    }
158    /// <p>The description of the customer-managed destination.</p>
159    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.description = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// <p>The description of the customer-managed destination.</p>
164    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.description = input;
166        self
167    }
168    /// <p>The description of the customer-managed destination.</p>
169    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
170        &self.description
171    }
172    /// Adds a key-value pair to `tags`.
173    ///
174    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
175    ///
176    /// <p>A set of key/value pairs that are used to manage the destination.</p>
177    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
178        let mut hash_map = self.tags.unwrap_or_default();
179        hash_map.insert(k.into(), v.into());
180        self.tags = ::std::option::Option::Some(hash_map);
181        self
182    }
183    /// <p>A set of key/value pairs that are used to manage the destination.</p>
184    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
185        self.tags = input;
186        self
187    }
188    /// <p>A set of key/value pairs that are used to manage the destination.</p>
189    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
190        &self.tags
191    }
192    /// Consumes the builder and constructs a [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
193    pub fn build(
194        self,
195    ) -> ::std::result::Result<crate::operation::create_destination::CreateDestinationInput, ::aws_smithy_types::error::operation::BuildError> {
196        ::std::result::Result::Ok(crate::operation::create_destination::CreateDestinationInput {
197            delivery_destination_arn: self.delivery_destination_arn,
198            delivery_destination_type: self.delivery_destination_type,
199            name: self.name,
200            role_arn: self.role_arn,
201            client_token: self.client_token,
202            description: self.description,
203            tags: self.tags,
204        })
205    }
206}
207impl ::std::fmt::Debug for CreateDestinationInputBuilder {
208    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
209        let mut formatter = f.debug_struct("CreateDestinationInputBuilder");
210        formatter.field("delivery_destination_arn", &self.delivery_destination_arn);
211        formatter.field("delivery_destination_type", &self.delivery_destination_type);
212        formatter.field("name", &self.name);
213        formatter.field("role_arn", &self.role_arn);
214        formatter.field("client_token", &self.client_token);
215        formatter.field("description", &self.description);
216        formatter.field("tags", &"*** Sensitive Data Redacted ***");
217        formatter.finish()
218    }
219}