1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreatePipeInput {
    /// <p>The name of the pipe.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>A description of the pipe.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The state the pipe should be in.</p>
    #[doc(hidden)]
    pub desired_state: std::option::Option<crate::types::RequestedPipeState>,
    /// <p>The ARN of the source resource.</p>
    #[doc(hidden)]
    pub source: std::option::Option<std::string::String>,
    /// <p>The parameters required to set up a source for your pipe.</p>
    #[doc(hidden)]
    pub source_parameters: std::option::Option<crate::types::PipeSourceParameters>,
    /// <p>The ARN of the enrichment resource.</p>
    #[doc(hidden)]
    pub enrichment: std::option::Option<std::string::String>,
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    #[doc(hidden)]
    pub enrichment_parameters: std::option::Option<crate::types::PipeEnrichmentParameters>,
    /// <p>The ARN of the target resource.</p>
    #[doc(hidden)]
    pub target: std::option::Option<std::string::String>,
    /// <p>The parameters required to set up a target for your pipe.</p>
    #[doc(hidden)]
    pub target_parameters: std::option::Option<crate::types::PipeTargetParameters>,
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreatePipeInput {
    /// <p>The name of the pipe.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the pipe.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The state the pipe should be in.</p>
    pub fn desired_state(&self) -> std::option::Option<&crate::types::RequestedPipeState> {
        self.desired_state.as_ref()
    }
    /// <p>The ARN of the source resource.</p>
    pub fn source(&self) -> std::option::Option<&str> {
        self.source.as_deref()
    }
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub fn source_parameters(&self) -> std::option::Option<&crate::types::PipeSourceParameters> {
        self.source_parameters.as_ref()
    }
    /// <p>The ARN of the enrichment resource.</p>
    pub fn enrichment(&self) -> std::option::Option<&str> {
        self.enrichment.as_deref()
    }
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub fn enrichment_parameters(
        &self,
    ) -> std::option::Option<&crate::types::PipeEnrichmentParameters> {
        self.enrichment_parameters.as_ref()
    }
    /// <p>The ARN of the target resource.</p>
    pub fn target(&self) -> std::option::Option<&str> {
        self.target.as_deref()
    }
    /// <p>The parameters required to set up a target for your pipe.</p>
    pub fn target_parameters(&self) -> std::option::Option<&crate::types::PipeTargetParameters> {
        self.target_parameters.as_ref()
    }
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
impl std::fmt::Debug for CreatePipeInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CreatePipeInput");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("desired_state", &self.desired_state);
        formatter.field("source", &self.source);
        formatter.field("source_parameters", &self.source_parameters);
        formatter.field("enrichment", &self.enrichment);
        formatter.field("enrichment_parameters", &self.enrichment_parameters);
        formatter.field("target", &self.target);
        formatter.field("target_parameters", &self.target_parameters);
        formatter.field("role_arn", &self.role_arn);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}
impl CreatePipeInput {
    /// Creates a new builder-style object to manufacture [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
    pub fn builder() -> crate::operation::create_pipe::builders::CreatePipeInputBuilder {
        crate::operation::create_pipe::builders::CreatePipeInputBuilder::default()
    }
}

/// A builder for [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct CreatePipeInputBuilder {
    pub(crate) name: std::option::Option<std::string::String>,
    pub(crate) description: std::option::Option<std::string::String>,
    pub(crate) desired_state: std::option::Option<crate::types::RequestedPipeState>,
    pub(crate) source: std::option::Option<std::string::String>,
    pub(crate) source_parameters: std::option::Option<crate::types::PipeSourceParameters>,
    pub(crate) enrichment: std::option::Option<std::string::String>,
    pub(crate) enrichment_parameters: std::option::Option<crate::types::PipeEnrichmentParameters>,
    pub(crate) target: std::option::Option<std::string::String>,
    pub(crate) target_parameters: std::option::Option<crate::types::PipeTargetParameters>,
    pub(crate) role_arn: std::option::Option<std::string::String>,
    pub(crate) tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreatePipeInputBuilder {
    /// <p>The name of the pipe.</p>
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.name = Some(input.into());
        self
    }
    /// <p>The name of the pipe.</p>
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A description of the pipe.</p>
    pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
        self.description = Some(input.into());
        self
    }
    /// <p>A description of the pipe.</p>
    pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The state the pipe should be in.</p>
    pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
        self.desired_state = Some(input);
        self
    }
    /// <p>The state the pipe should be in.</p>
    pub fn set_desired_state(
        mut self,
        input: std::option::Option<crate::types::RequestedPipeState>,
    ) -> Self {
        self.desired_state = input;
        self
    }
    /// <p>The ARN of the source resource.</p>
    pub fn source(mut self, input: impl Into<std::string::String>) -> Self {
        self.source = Some(input.into());
        self
    }
    /// <p>The ARN of the source resource.</p>
    pub fn set_source(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.source = input;
        self
    }
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub fn source_parameters(mut self, input: crate::types::PipeSourceParameters) -> Self {
        self.source_parameters = Some(input);
        self
    }
    /// <p>The parameters required to set up a source for your pipe.</p>
    pub fn set_source_parameters(
        mut self,
        input: std::option::Option<crate::types::PipeSourceParameters>,
    ) -> Self {
        self.source_parameters = input;
        self
    }
    /// <p>The ARN of the enrichment resource.</p>
    pub fn enrichment(mut self, input: impl Into<std::string::String>) -> Self {
        self.enrichment = Some(input.into());
        self
    }
    /// <p>The ARN of the enrichment resource.</p>
    pub fn set_enrichment(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.enrichment = input;
        self
    }
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub fn enrichment_parameters(mut self, input: crate::types::PipeEnrichmentParameters) -> Self {
        self.enrichment_parameters = Some(input);
        self
    }
    /// <p>The parameters required to set up enrichment on your pipe.</p>
    pub fn set_enrichment_parameters(
        mut self,
        input: std::option::Option<crate::types::PipeEnrichmentParameters>,
    ) -> Self {
        self.enrichment_parameters = input;
        self
    }
    /// <p>The ARN of the target resource.</p>
    pub fn target(mut self, input: impl Into<std::string::String>) -> Self {
        self.target = Some(input.into());
        self
    }
    /// <p>The ARN of the target resource.</p>
    pub fn set_target(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.target = input;
        self
    }
    /// <p>The parameters required to set up a target for your pipe.</p>
    pub fn target_parameters(mut self, input: crate::types::PipeTargetParameters) -> Self {
        self.target_parameters = Some(input);
        self
    }
    /// <p>The parameters required to set up a target for your pipe.</p>
    pub fn set_target_parameters(
        mut self,
        input: std::option::Option<crate::types::PipeTargetParameters>,
    ) -> Self {
        self.target_parameters = input;
        self
    }
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.role_arn = Some(input.into());
        self
    }
    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
    pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub fn tags(
        mut self,
        k: impl Into<std::string::String>,
        v: impl Into<std::string::String>,
    ) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = Some(hash_map);
        self
    }
    /// <p>The list of key-value pairs to associate with the pipe.</p>
    pub fn set_tags(
        mut self,
        input: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    ) -> Self {
        self.tags = input;
        self
    }
    /// Consumes the builder and constructs a [`CreatePipeInput`](crate::operation::create_pipe::CreatePipeInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::create_pipe::CreatePipeInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::create_pipe::CreatePipeInput {
            name: self.name,
            description: self.description,
            desired_state: self.desired_state,
            source: self.source,
            source_parameters: self.source_parameters,
            enrichment: self.enrichment,
            enrichment_parameters: self.enrichment_parameters,
            target: self.target,
            target_parameters: self.target_parameters,
            role_arn: self.role_arn,
            tags: self.tags,
        })
    }
}
impl std::fmt::Debug for CreatePipeInputBuilder {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CreatePipeInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("desired_state", &self.desired_state);
        formatter.field("source", &self.source);
        formatter.field("source_parameters", &self.source_parameters);
        formatter.field("enrichment", &self.enrichment);
        formatter.field("enrichment_parameters", &self.enrichment_parameters);
        formatter.field("target", &self.target);
        formatter.field("target_parameters", &self.target_parameters);
        formatter.field("role_arn", &self.role_arn);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}