aws_sdk_iotmanagedintegrations/operation/get_destination/
_get_destination_output.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 GetDestinationOutput {
6    /// <p>The description of the customer-managed destination.</p>
7    pub description: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
9    pub delivery_destination_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The destination type for the customer-managed destination.</p>
11    pub delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
12    /// <p>The name of the customer-managed destination.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
15    pub role_arn: ::std::option::Option<::std::string::String>,
16    /// <p>The timestamp value of when the destination creation requset occurred.</p>
17    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
18    /// <p>The timestamp value of when the destination update requset occurred.</p>
19    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>A set of key/value pairs that are used to manage the customer-managed destination.</p>
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22    _request_id: Option<String>,
23}
24impl GetDestinationOutput {
25    /// <p>The description of the customer-managed destination.</p>
26    pub fn description(&self) -> ::std::option::Option<&str> {
27        self.description.as_deref()
28    }
29    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
30    pub fn delivery_destination_arn(&self) -> ::std::option::Option<&str> {
31        self.delivery_destination_arn.as_deref()
32    }
33    /// <p>The destination type for the customer-managed destination.</p>
34    pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
35        self.delivery_destination_type.as_ref()
36    }
37    /// <p>The name of the customer-managed destination.</p>
38    pub fn name(&self) -> ::std::option::Option<&str> {
39        self.name.as_deref()
40    }
41    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
42    pub fn role_arn(&self) -> ::std::option::Option<&str> {
43        self.role_arn.as_deref()
44    }
45    /// <p>The timestamp value of when the destination creation requset occurred.</p>
46    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47        self.created_at.as_ref()
48    }
49    /// <p>The timestamp value of when the destination update requset occurred.</p>
50    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51        self.updated_at.as_ref()
52    }
53    /// <p>A set of key/value pairs that are used to manage the customer-managed destination.</p>
54    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
55        self.tags.as_ref()
56    }
57}
58impl ::std::fmt::Debug for GetDestinationOutput {
59    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
60        let mut formatter = f.debug_struct("GetDestinationOutput");
61        formatter.field("description", &self.description);
62        formatter.field("delivery_destination_arn", &self.delivery_destination_arn);
63        formatter.field("delivery_destination_type", &self.delivery_destination_type);
64        formatter.field("name", &self.name);
65        formatter.field("role_arn", &self.role_arn);
66        formatter.field("created_at", &self.created_at);
67        formatter.field("updated_at", &self.updated_at);
68        formatter.field("tags", &"*** Sensitive Data Redacted ***");
69        formatter.field("_request_id", &self._request_id);
70        formatter.finish()
71    }
72}
73impl ::aws_types::request_id::RequestId for GetDestinationOutput {
74    fn request_id(&self) -> Option<&str> {
75        self._request_id.as_deref()
76    }
77}
78impl GetDestinationOutput {
79    /// Creates a new builder-style object to manufacture [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput).
80    pub fn builder() -> crate::operation::get_destination::builders::GetDestinationOutputBuilder {
81        crate::operation::get_destination::builders::GetDestinationOutputBuilder::default()
82    }
83}
84
85/// A builder for [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput).
86#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
87#[non_exhaustive]
88pub struct GetDestinationOutputBuilder {
89    pub(crate) description: ::std::option::Option<::std::string::String>,
90    pub(crate) delivery_destination_arn: ::std::option::Option<::std::string::String>,
91    pub(crate) delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
92    pub(crate) name: ::std::option::Option<::std::string::String>,
93    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
94    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
95    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
96    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
97    _request_id: Option<String>,
98}
99impl GetDestinationOutputBuilder {
100    /// <p>The description of the customer-managed destination.</p>
101    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.description = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The description of the customer-managed destination.</p>
106    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.description = input;
108        self
109    }
110    /// <p>The description of the customer-managed destination.</p>
111    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
112        &self.description
113    }
114    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
115    pub fn delivery_destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.delivery_destination_arn = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
120    pub fn set_delivery_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.delivery_destination_arn = input;
122        self
123    }
124    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
125    pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
126        &self.delivery_destination_arn
127    }
128    /// <p>The destination type for the customer-managed destination.</p>
129    pub fn delivery_destination_type(mut self, input: crate::types::DeliveryDestinationType) -> Self {
130        self.delivery_destination_type = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The destination type for the customer-managed destination.</p>
134    pub fn set_delivery_destination_type(mut self, input: ::std::option::Option<crate::types::DeliveryDestinationType>) -> Self {
135        self.delivery_destination_type = input;
136        self
137    }
138    /// <p>The destination type for the customer-managed destination.</p>
139    pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
140        &self.delivery_destination_type
141    }
142    /// <p>The name of the customer-managed destination.</p>
143    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.name = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The name of the customer-managed destination.</p>
148    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.name = input;
150        self
151    }
152    /// <p>The name of the customer-managed destination.</p>
153    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
154        &self.name
155    }
156    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
157    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.role_arn = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
162    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.role_arn = input;
164        self
165    }
166    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
167    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
168        &self.role_arn
169    }
170    /// <p>The timestamp value of when the destination creation requset occurred.</p>
171    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
172        self.created_at = ::std::option::Option::Some(input);
173        self
174    }
175    /// <p>The timestamp value of when the destination creation requset occurred.</p>
176    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
177        self.created_at = input;
178        self
179    }
180    /// <p>The timestamp value of when the destination creation requset occurred.</p>
181    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
182        &self.created_at
183    }
184    /// <p>The timestamp value of when the destination update requset occurred.</p>
185    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
186        self.updated_at = ::std::option::Option::Some(input);
187        self
188    }
189    /// <p>The timestamp value of when the destination update requset occurred.</p>
190    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
191        self.updated_at = input;
192        self
193    }
194    /// <p>The timestamp value of when the destination update requset occurred.</p>
195    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
196        &self.updated_at
197    }
198    /// Adds a key-value pair to `tags`.
199    ///
200    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
201    ///
202    /// <p>A set of key/value pairs that are used to manage the customer-managed destination.</p>
203    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
204        let mut hash_map = self.tags.unwrap_or_default();
205        hash_map.insert(k.into(), v.into());
206        self.tags = ::std::option::Option::Some(hash_map);
207        self
208    }
209    /// <p>A set of key/value pairs that are used to manage the customer-managed destination.</p>
210    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
211        self.tags = input;
212        self
213    }
214    /// <p>A set of key/value pairs that are used to manage the customer-managed destination.</p>
215    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
216        &self.tags
217    }
218    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
219        self._request_id = Some(request_id.into());
220        self
221    }
222
223    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
224        self._request_id = request_id;
225        self
226    }
227    /// Consumes the builder and constructs a [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput).
228    pub fn build(self) -> crate::operation::get_destination::GetDestinationOutput {
229        crate::operation::get_destination::GetDestinationOutput {
230            description: self.description,
231            delivery_destination_arn: self.delivery_destination_arn,
232            delivery_destination_type: self.delivery_destination_type,
233            name: self.name,
234            role_arn: self.role_arn,
235            created_at: self.created_at,
236            updated_at: self.updated_at,
237            tags: self.tags,
238            _request_id: self._request_id,
239        }
240    }
241}
242impl ::std::fmt::Debug for GetDestinationOutputBuilder {
243    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
244        let mut formatter = f.debug_struct("GetDestinationOutputBuilder");
245        formatter.field("description", &self.description);
246        formatter.field("delivery_destination_arn", &self.delivery_destination_arn);
247        formatter.field("delivery_destination_type", &self.delivery_destination_type);
248        formatter.field("name", &self.name);
249        formatter.field("role_arn", &self.role_arn);
250        formatter.field("created_at", &self.created_at);
251        formatter.field("updated_at", &self.updated_at);
252        formatter.field("tags", &"*** Sensitive Data Redacted ***");
253        formatter.field("_request_id", &self._request_id);
254        formatter.finish()
255    }
256}