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 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateDestinationInput {
22 pub fn delivery_destination_arn(&self) -> ::std::option::Option<&str> {
24 self.delivery_destination_arn.as_deref()
25 }
26 pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
28 self.delivery_destination_type.as_ref()
29 }
30 pub fn name(&self) -> ::std::option::Option<&str> {
32 self.name.as_deref()
33 }
34 pub fn role_arn(&self) -> ::std::option::Option<&str> {
36 self.role_arn.as_deref()
37 }
38 pub fn client_token(&self) -> ::std::option::Option<&str> {
40 self.client_token.as_deref()
41 }
42 pub fn description(&self) -> ::std::option::Option<&str> {
44 self.description.as_deref()
45 }
46 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 pub fn builder() -> crate::operation::create_destination::builders::CreateDestinationInputBuilder {
67 crate::operation::create_destination::builders::CreateDestinationInputBuilder::default()
68 }
69}
70
71#[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 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 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 pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
97 &self.delivery_destination_arn
98 }
99 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 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 pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
112 &self.delivery_destination_type
113 }
114 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.name = input;
123 self
124 }
125 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
127 &self.name
128 }
129 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 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.role_arn = input;
138 self
139 }
140 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
142 &self.role_arn
143 }
144 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 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.client_token = input;
152 self
153 }
154 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
156 &self.client_token
157 }
158 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.description = input;
166 self
167 }
168 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
170 &self.description
171 }
172 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
190 &self.tags
191 }
192 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}