aws_sdk_pipes/operation/update_pipe/
_update_pipe_input.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 UpdatePipeInput {
6    /// <p>The name of the pipe.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>A description of the pipe.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The state the pipe should be in.</p>
11    pub desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
12    /// <p>The parameters required to set up a source for your pipe.</p>
13    pub source_parameters: ::std::option::Option<crate::types::UpdatePipeSourceParameters>,
14    /// <p>The ARN of the enrichment resource.</p>
15    pub enrichment: ::std::option::Option<::std::string::String>,
16    /// <p>The parameters required to set up enrichment on your pipe.</p>
17    pub enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
18    /// <p>The ARN of the target resource.</p>
19    pub target: ::std::option::Option<::std::string::String>,
20    /// <p>The parameters required to set up a target for your pipe.</p>
21    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
22    pub target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
23    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
24    pub role_arn: ::std::option::Option<::std::string::String>,
25    /// <p>The logging configuration settings for the pipe.</p>
26    pub log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
27    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
28    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
29    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
30    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
31    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
32}
33impl UpdatePipeInput {
34    /// <p>The name of the pipe.</p>
35    pub fn name(&self) -> ::std::option::Option<&str> {
36        self.name.as_deref()
37    }
38    /// <p>A description of the pipe.</p>
39    pub fn description(&self) -> ::std::option::Option<&str> {
40        self.description.as_deref()
41    }
42    /// <p>The state the pipe should be in.</p>
43    pub fn desired_state(&self) -> ::std::option::Option<&crate::types::RequestedPipeState> {
44        self.desired_state.as_ref()
45    }
46    /// <p>The parameters required to set up a source for your pipe.</p>
47    pub fn source_parameters(&self) -> ::std::option::Option<&crate::types::UpdatePipeSourceParameters> {
48        self.source_parameters.as_ref()
49    }
50    /// <p>The ARN of the enrichment resource.</p>
51    pub fn enrichment(&self) -> ::std::option::Option<&str> {
52        self.enrichment.as_deref()
53    }
54    /// <p>The parameters required to set up enrichment on your pipe.</p>
55    pub fn enrichment_parameters(&self) -> ::std::option::Option<&crate::types::PipeEnrichmentParameters> {
56        self.enrichment_parameters.as_ref()
57    }
58    /// <p>The ARN of the target resource.</p>
59    pub fn target(&self) -> ::std::option::Option<&str> {
60        self.target.as_deref()
61    }
62    /// <p>The parameters required to set up a target for your pipe.</p>
63    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
64    pub fn target_parameters(&self) -> ::std::option::Option<&crate::types::PipeTargetParameters> {
65        self.target_parameters.as_ref()
66    }
67    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
68    pub fn role_arn(&self) -> ::std::option::Option<&str> {
69        self.role_arn.as_deref()
70    }
71    /// <p>The logging configuration settings for the pipe.</p>
72    pub fn log_configuration(&self) -> ::std::option::Option<&crate::types::PipeLogConfigurationParameters> {
73        self.log_configuration.as_ref()
74    }
75    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
76    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
77    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
78    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
79    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
80        self.kms_key_identifier.as_deref()
81    }
82}
83impl ::std::fmt::Debug for UpdatePipeInput {
84    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
85        let mut formatter = f.debug_struct("UpdatePipeInput");
86        formatter.field("name", &self.name);
87        formatter.field("description", &"*** Sensitive Data Redacted ***");
88        formatter.field("desired_state", &self.desired_state);
89        formatter.field("source_parameters", &self.source_parameters);
90        formatter.field("enrichment", &self.enrichment);
91        formatter.field("enrichment_parameters", &self.enrichment_parameters);
92        formatter.field("target", &self.target);
93        formatter.field("target_parameters", &self.target_parameters);
94        formatter.field("role_arn", &self.role_arn);
95        formatter.field("log_configuration", &self.log_configuration);
96        formatter.field("kms_key_identifier", &self.kms_key_identifier);
97        formatter.finish()
98    }
99}
100impl UpdatePipeInput {
101    /// Creates a new builder-style object to manufacture [`UpdatePipeInput`](crate::operation::update_pipe::UpdatePipeInput).
102    pub fn builder() -> crate::operation::update_pipe::builders::UpdatePipeInputBuilder {
103        crate::operation::update_pipe::builders::UpdatePipeInputBuilder::default()
104    }
105}
106
107/// A builder for [`UpdatePipeInput`](crate::operation::update_pipe::UpdatePipeInput).
108#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
109#[non_exhaustive]
110pub struct UpdatePipeInputBuilder {
111    pub(crate) name: ::std::option::Option<::std::string::String>,
112    pub(crate) description: ::std::option::Option<::std::string::String>,
113    pub(crate) desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
114    pub(crate) source_parameters: ::std::option::Option<crate::types::UpdatePipeSourceParameters>,
115    pub(crate) enrichment: ::std::option::Option<::std::string::String>,
116    pub(crate) enrichment_parameters: ::std::option::Option<crate::types::PipeEnrichmentParameters>,
117    pub(crate) target: ::std::option::Option<::std::string::String>,
118    pub(crate) target_parameters: ::std::option::Option<crate::types::PipeTargetParameters>,
119    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
120    pub(crate) log_configuration: ::std::option::Option<crate::types::PipeLogConfigurationParameters>,
121    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
122}
123impl UpdatePipeInputBuilder {
124    /// <p>The name of the pipe.</p>
125    /// This field is required.
126    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.name = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <p>The name of the pipe.</p>
131    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.name = input;
133        self
134    }
135    /// <p>The name of the pipe.</p>
136    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
137        &self.name
138    }
139    /// <p>A description of the pipe.</p>
140    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.description = ::std::option::Option::Some(input.into());
142        self
143    }
144    /// <p>A description of the pipe.</p>
145    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.description = input;
147        self
148    }
149    /// <p>A description of the pipe.</p>
150    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
151        &self.description
152    }
153    /// <p>The state the pipe should be in.</p>
154    pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
155        self.desired_state = ::std::option::Option::Some(input);
156        self
157    }
158    /// <p>The state the pipe should be in.</p>
159    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::RequestedPipeState>) -> Self {
160        self.desired_state = input;
161        self
162    }
163    /// <p>The state the pipe should be in.</p>
164    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::RequestedPipeState> {
165        &self.desired_state
166    }
167    /// <p>The parameters required to set up a source for your pipe.</p>
168    pub fn source_parameters(mut self, input: crate::types::UpdatePipeSourceParameters) -> Self {
169        self.source_parameters = ::std::option::Option::Some(input);
170        self
171    }
172    /// <p>The parameters required to set up a source for your pipe.</p>
173    pub fn set_source_parameters(mut self, input: ::std::option::Option<crate::types::UpdatePipeSourceParameters>) -> Self {
174        self.source_parameters = input;
175        self
176    }
177    /// <p>The parameters required to set up a source for your pipe.</p>
178    pub fn get_source_parameters(&self) -> &::std::option::Option<crate::types::UpdatePipeSourceParameters> {
179        &self.source_parameters
180    }
181    /// <p>The ARN of the enrichment resource.</p>
182    pub fn enrichment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183        self.enrichment = ::std::option::Option::Some(input.into());
184        self
185    }
186    /// <p>The ARN of the enrichment resource.</p>
187    pub fn set_enrichment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188        self.enrichment = input;
189        self
190    }
191    /// <p>The ARN of the enrichment resource.</p>
192    pub fn get_enrichment(&self) -> &::std::option::Option<::std::string::String> {
193        &self.enrichment
194    }
195    /// <p>The parameters required to set up enrichment on your pipe.</p>
196    pub fn enrichment_parameters(mut self, input: crate::types::PipeEnrichmentParameters) -> Self {
197        self.enrichment_parameters = ::std::option::Option::Some(input);
198        self
199    }
200    /// <p>The parameters required to set up enrichment on your pipe.</p>
201    pub fn set_enrichment_parameters(mut self, input: ::std::option::Option<crate::types::PipeEnrichmentParameters>) -> Self {
202        self.enrichment_parameters = input;
203        self
204    }
205    /// <p>The parameters required to set up enrichment on your pipe.</p>
206    pub fn get_enrichment_parameters(&self) -> &::std::option::Option<crate::types::PipeEnrichmentParameters> {
207        &self.enrichment_parameters
208    }
209    /// <p>The ARN of the target resource.</p>
210    pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211        self.target = ::std::option::Option::Some(input.into());
212        self
213    }
214    /// <p>The ARN of the target resource.</p>
215    pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216        self.target = input;
217        self
218    }
219    /// <p>The ARN of the target resource.</p>
220    pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
221        &self.target
222    }
223    /// <p>The parameters required to set up a target for your pipe.</p>
224    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
225    pub fn target_parameters(mut self, input: crate::types::PipeTargetParameters) -> Self {
226        self.target_parameters = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>The parameters required to set up a target for your pipe.</p>
230    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
231    pub fn set_target_parameters(mut self, input: ::std::option::Option<crate::types::PipeTargetParameters>) -> Self {
232        self.target_parameters = input;
233        self
234    }
235    /// <p>The parameters required to set up a target for your pipe.</p>
236    /// <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
237    pub fn get_target_parameters(&self) -> &::std::option::Option<crate::types::PipeTargetParameters> {
238        &self.target_parameters
239    }
240    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
241    /// This field is required.
242    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
243        self.role_arn = ::std::option::Option::Some(input.into());
244        self
245    }
246    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
247    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
248        self.role_arn = input;
249        self
250    }
251    /// <p>The ARN of the role that allows the pipe to send data to the target.</p>
252    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
253        &self.role_arn
254    }
255    /// <p>The logging configuration settings for the pipe.</p>
256    pub fn log_configuration(mut self, input: crate::types::PipeLogConfigurationParameters) -> Self {
257        self.log_configuration = ::std::option::Option::Some(input);
258        self
259    }
260    /// <p>The logging configuration settings for the pipe.</p>
261    pub fn set_log_configuration(mut self, input: ::std::option::Option<crate::types::PipeLogConfigurationParameters>) -> Self {
262        self.log_configuration = input;
263        self
264    }
265    /// <p>The logging configuration settings for the pipe.</p>
266    pub fn get_log_configuration(&self) -> &::std::option::Option<crate::types::PipeLogConfigurationParameters> {
267        &self.log_configuration
268    }
269    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
270    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
271    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
272    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
273    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
274        self.kms_key_identifier = ::std::option::Option::Some(input.into());
275        self
276    }
277    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
278    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
279    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
280    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
281    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
282        self.kms_key_identifier = input;
283        self
284    }
285    /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
286    /// <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p>
287    /// <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p>
288    /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
289    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
290        &self.kms_key_identifier
291    }
292    /// Consumes the builder and constructs a [`UpdatePipeInput`](crate::operation::update_pipe::UpdatePipeInput).
293    pub fn build(self) -> ::std::result::Result<crate::operation::update_pipe::UpdatePipeInput, ::aws_smithy_types::error::operation::BuildError> {
294        ::std::result::Result::Ok(crate::operation::update_pipe::UpdatePipeInput {
295            name: self.name,
296            description: self.description,
297            desired_state: self.desired_state,
298            source_parameters: self.source_parameters,
299            enrichment: self.enrichment,
300            enrichment_parameters: self.enrichment_parameters,
301            target: self.target,
302            target_parameters: self.target_parameters,
303            role_arn: self.role_arn,
304            log_configuration: self.log_configuration,
305            kms_key_identifier: self.kms_key_identifier,
306        })
307    }
308}
309impl ::std::fmt::Debug for UpdatePipeInputBuilder {
310    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
311        let mut formatter = f.debug_struct("UpdatePipeInputBuilder");
312        formatter.field("name", &self.name);
313        formatter.field("description", &"*** Sensitive Data Redacted ***");
314        formatter.field("desired_state", &self.desired_state);
315        formatter.field("source_parameters", &self.source_parameters);
316        formatter.field("enrichment", &self.enrichment);
317        formatter.field("enrichment_parameters", &self.enrichment_parameters);
318        formatter.field("target", &self.target);
319        formatter.field("target_parameters", &self.target_parameters);
320        formatter.field("role_arn", &self.role_arn);
321        formatter.field("log_configuration", &self.log_configuration);
322        formatter.field("kms_key_identifier", &self.kms_key_identifier);
323        formatter.finish()
324    }
325}