aws_sdk_iotmanagedintegrations/operation/get_destination/
_get_destination_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetDestinationOutput {
6 pub description: ::std::option::Option<::std::string::String>,
8 pub delivery_destination_arn: ::std::option::Option<::std::string::String>,
10 pub delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
12 pub name: ::std::option::Option<::std::string::String>,
14 pub role_arn: ::std::option::Option<::std::string::String>,
16 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
18 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22 _request_id: Option<String>,
23}
24impl GetDestinationOutput {
25 pub fn description(&self) -> ::std::option::Option<&str> {
27 self.description.as_deref()
28 }
29 pub fn delivery_destination_arn(&self) -> ::std::option::Option<&str> {
31 self.delivery_destination_arn.as_deref()
32 }
33 pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
35 self.delivery_destination_type.as_ref()
36 }
37 pub fn name(&self) -> ::std::option::Option<&str> {
39 self.name.as_deref()
40 }
41 pub fn role_arn(&self) -> ::std::option::Option<&str> {
43 self.role_arn.as_deref()
44 }
45 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47 self.created_at.as_ref()
48 }
49 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51 self.updated_at.as_ref()
52 }
53 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 pub fn builder() -> crate::operation::get_destination::builders::GetDestinationOutputBuilder {
81 crate::operation::get_destination::builders::GetDestinationOutputBuilder::default()
82 }
83}
84
85#[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 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.description = input;
108 self
109 }
110 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
112 &self.description
113 }
114 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 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 pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
126 &self.delivery_destination_arn
127 }
128 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 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 pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
140 &self.delivery_destination_type
141 }
142 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.name = input;
150 self
151 }
152 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
154 &self.name
155 }
156 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 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.role_arn = input;
164 self
165 }
166 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
168 &self.role_arn
169 }
170 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 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 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
182 &self.created_at
183 }
184 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 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 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
196 &self.updated_at
197 }
198 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 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 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 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}