aws_sdk_pipes/operation/create_pipe/
_create_pipe_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreatePipeInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
12 pub source: ::std::option::Option<::std::string::String>,
14 pub source_parameters: ::std::option::Option<crate::types::PipeSourceParameters>,
16 pub enrichment: ::std::option::Option<::std::string::String>,
18 pub enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
20 pub target: ::std::option::Option<::std::string::String>,
22 pub target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
25 pub role_arn: ::std::option::Option<::std::string::String>,
27 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
29 pub log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
31 pub kms_key_identifier: ::std::option::Option<::std::string::String>,
35}
36impl CreatePipeInput {
37 pub fn name(&self) -> ::std::option::Option<&str> {
39 self.name.as_deref()
40 }
41 pub fn description(&self) -> ::std::option::Option<&str> {
43 self.description.as_deref()
44 }
45 pub fn desired_state(&self) -> ::std::option::Option<&crate::types::RequestedPipeState> {
47 self.desired_state.as_ref()
48 }
49 pub fn source(&self) -> ::std::option::Option<&str> {
51 self.source.as_deref()
52 }
53 pub fn source_parameters(&self) -> ::std::option::Option<&crate::types::PipeSourceParameters> {
55 self.source_parameters.as_ref()
56 }
57 pub fn enrichment(&self) -> ::std::option::Option<&str> {
59 self.enrichment.as_deref()
60 }
61 pub fn enrichment_parameters(&self) -> ::std::option::Option<&crate::types::PipeEnrichmentParameters> {
63 self.enrichment_parameters.as_ref()
64 }
65 pub fn target(&self) -> ::std::option::Option<&str> {
67 self.target.as_deref()
68 }
69 pub fn target_parameters(&self) -> ::std::option::Option<&crate::types::PipeTargetParameters> {
72 self.target_parameters.as_ref()
73 }
74 pub fn role_arn(&self) -> ::std::option::Option<&str> {
76 self.role_arn.as_deref()
77 }
78 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
80 self.tags.as_ref()
81 }
82 pub fn log_configuration(&self) -> ::std::option::Option<&crate::types::PipeLogConfigurationParameters> {
84 self.log_configuration.as_ref()
85 }
86 pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
90 self.kms_key_identifier.as_deref()
91 }
92}
93impl ::std::fmt::Debug for CreatePipeInput {
94 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
95 let mut formatter = f.debug_struct("CreatePipeInput");
96 formatter.field("name", &self.name);
97 formatter.field("description", &"*** Sensitive Data Redacted ***");
98 formatter.field("desired_state", &self.desired_state);
99 formatter.field("source", &self.source);
100 formatter.field("source_parameters", &self.source_parameters);
101 formatter.field("enrichment", &self.enrichment);
102 formatter.field("enrichment_parameters", &self.enrichment_parameters);
103 formatter.field("target", &self.target);
104 formatter.field("target_parameters", &self.target_parameters);
105 formatter.field("role_arn", &self.role_arn);
106 formatter.field("tags", &"*** Sensitive Data Redacted ***");
107 formatter.field("log_configuration", &self.log_configuration);
108 formatter.field("kms_key_identifier", &self.kms_key_identifier);
109 formatter.finish()
110 }
111}
112impl CreatePipeInput {
113 pub fn builder() -> crate::operation::create_pipe::builders::CreatePipeInputBuilder {
115 crate::operation::create_pipe::builders::CreatePipeInputBuilder::default()
116 }
117}
118
119#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
121#[non_exhaustive]
122pub struct CreatePipeInputBuilder {
123 pub(crate) name: ::std::option::Option<::std::string::String>,
124 pub(crate) description: ::std::option::Option<::std::string::String>,
125 pub(crate) desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
126 pub(crate) source: ::std::option::Option<::std::string::String>,
127 pub(crate) source_parameters: ::std::option::Option<crate::types::PipeSourceParameters>,
128 pub(crate) enrichment: ::std::option::Option<::std::string::String>,
129 pub(crate) enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
130 pub(crate) target: ::std::option::Option<::std::string::String>,
131 pub(crate) target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
132 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
133 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
134 pub(crate) log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
135 pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
136}
137impl CreatePipeInputBuilder {
138 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.name = ::std::option::Option::Some(input.into());
142 self
143 }
144 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.name = input;
147 self
148 }
149 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
151 &self.name
152 }
153 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155 self.description = ::std::option::Option::Some(input.into());
156 self
157 }
158 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160 self.description = input;
161 self
162 }
163 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
165 &self.description
166 }
167 pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
169 self.desired_state = ::std::option::Option::Some(input);
170 self
171 }
172 pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::RequestedPipeState>) -> Self {
174 self.desired_state = input;
175 self
176 }
177 pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::RequestedPipeState> {
179 &self.desired_state
180 }
181 pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184 self.source = ::std::option::Option::Some(input.into());
185 self
186 }
187 pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.source = input;
190 self
191 }
192 pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
194 &self.source
195 }
196 pub fn source_parameters(mut self, input: crate::types::PipeSourceParameters) -> Self {
198 self.source_parameters = ::std::option::Option::Some(input);
199 self
200 }
201 pub fn set_source_parameters(mut self, input: ::std::option::Option<crate::types::PipeSourceParameters>) -> Self {
203 self.source_parameters = input;
204 self
205 }
206 pub fn get_source_parameters(&self) -> &::std::option::Option<crate::types::PipeSourceParameters> {
208 &self.source_parameters
209 }
210 pub fn enrichment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212 self.enrichment = ::std::option::Option::Some(input.into());
213 self
214 }
215 pub fn set_enrichment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217 self.enrichment = input;
218 self
219 }
220 pub fn get_enrichment(&self) -> &::std::option::Option<::std::string::String> {
222 &self.enrichment
223 }
224 pub fn enrichment_parameters(mut self, input: crate::types::PipeEnrichmentParameters) -> Self {
226 self.enrichment_parameters = ::std::option::Option::Some(input);
227 self
228 }
229 pub fn set_enrichment_parameters(mut self, input: ::std::option::Option<crate::types::PipeEnrichmentParameters>) -> Self {
231 self.enrichment_parameters = input;
232 self
233 }
234 pub fn get_enrichment_parameters(&self) -> &::std::option::Option<crate::types::PipeEnrichmentParameters> {
236 &self.enrichment_parameters
237 }
238 pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241 self.target = ::std::option::Option::Some(input.into());
242 self
243 }
244 pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246 self.target = input;
247 self
248 }
249 pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
251 &self.target
252 }
253 pub fn target_parameters(mut self, input: crate::types::PipeTargetParameters) -> Self {
256 self.target_parameters = ::std::option::Option::Some(input);
257 self
258 }
259 pub fn set_target_parameters(mut self, input: ::std::option::Option<crate::types::PipeTargetParameters>) -> Self {
262 self.target_parameters = input;
263 self
264 }
265 pub fn get_target_parameters(&self) -> &::std::option::Option<crate::types::PipeTargetParameters> {
268 &self.target_parameters
269 }
270 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273 self.role_arn = ::std::option::Option::Some(input.into());
274 self
275 }
276 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278 self.role_arn = input;
279 self
280 }
281 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
283 &self.role_arn
284 }
285 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
291 let mut hash_map = self.tags.unwrap_or_default();
292 hash_map.insert(k.into(), v.into());
293 self.tags = ::std::option::Option::Some(hash_map);
294 self
295 }
296 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
298 self.tags = input;
299 self
300 }
301 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
303 &self.tags
304 }
305 pub fn log_configuration(mut self, input: crate::types::PipeLogConfigurationParameters) -> Self {
307 self.log_configuration = ::std::option::Option::Some(input);
308 self
309 }
310 pub fn set_log_configuration(mut self, input: ::std::option::Option<crate::types::PipeLogConfigurationParameters>) -> Self {
312 self.log_configuration = input;
313 self
314 }
315 pub fn get_log_configuration(&self) -> &::std::option::Option<crate::types::PipeLogConfigurationParameters> {
317 &self.log_configuration
318 }
319 pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
323 self.kms_key_identifier = ::std::option::Option::Some(input.into());
324 self
325 }
326 pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
330 self.kms_key_identifier = input;
331 self
332 }
333 pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
337 &self.kms_key_identifier
338 }
339 pub fn build(self) -> ::std::result::Result<crate::operation::create_pipe::CreatePipeInput, ::aws_smithy_types::error::operation::BuildError> {
341 ::std::result::Result::Ok(crate::operation::create_pipe::CreatePipeInput {
342 name: self.name,
343 description: self.description,
344 desired_state: self.desired_state,
345 source: self.source,
346 source_parameters: self.source_parameters,
347 enrichment: self.enrichment,
348 enrichment_parameters: self.enrichment_parameters,
349 target: self.target,
350 target_parameters: self.target_parameters,
351 role_arn: self.role_arn,
352 tags: self.tags,
353 log_configuration: self.log_configuration,
354 kms_key_identifier: self.kms_key_identifier,
355 })
356 }
357}
358impl ::std::fmt::Debug for CreatePipeInputBuilder {
359 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
360 let mut formatter = f.debug_struct("CreatePipeInputBuilder");
361 formatter.field("name", &self.name);
362 formatter.field("description", &"*** Sensitive Data Redacted ***");
363 formatter.field("desired_state", &self.desired_state);
364 formatter.field("source", &self.source);
365 formatter.field("source_parameters", &self.source_parameters);
366 formatter.field("enrichment", &self.enrichment);
367 formatter.field("enrichment_parameters", &self.enrichment_parameters);
368 formatter.field("target", &self.target);
369 formatter.field("target_parameters", &self.target_parameters);
370 formatter.field("role_arn", &self.role_arn);
371 formatter.field("tags", &"*** Sensitive Data Redacted ***");
372 formatter.field("log_configuration", &self.log_configuration);
373 formatter.field("kms_key_identifier", &self.kms_key_identifier);
374 formatter.finish()
375 }
376}