aws_sdk_iotanalytics/operation/update_pipeline/_update_pipeline_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, ::std::fmt::Debug)]
5pub struct UpdatePipelineInput {
6 /// <p>The name of the pipeline to update.</p>
7 pub pipeline_name: ::std::option::Option<::std::string::String>,
8 /// <p>A list of <code>PipelineActivity</code> objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p>
9 /// <p>The list can be 2-25 <code>PipelineActivity</code> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity. For example:</p>
10 /// <p><code>pipelineActivities = \[ { "channel": { ... } }, { "lambda": { ... } }, ... \]</code></p>
11 pub pipeline_activities: ::std::option::Option<::std::vec::Vec<crate::types::PipelineActivity>>,
12}
13impl UpdatePipelineInput {
14 /// <p>The name of the pipeline to update.</p>
15 pub fn pipeline_name(&self) -> ::std::option::Option<&str> {
16 self.pipeline_name.as_deref()
17 }
18 /// <p>A list of <code>PipelineActivity</code> objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p>
19 /// <p>The list can be 2-25 <code>PipelineActivity</code> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity. For example:</p>
20 /// <p><code>pipelineActivities = \[ { "channel": { ... } }, { "lambda": { ... } }, ... \]</code></p>
21 ///
22 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.pipeline_activities.is_none()`.
23 pub fn pipeline_activities(&self) -> &[crate::types::PipelineActivity] {
24 self.pipeline_activities.as_deref().unwrap_or_default()
25 }
26}
27impl UpdatePipelineInput {
28 /// Creates a new builder-style object to manufacture [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
29 pub fn builder() -> crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder {
30 crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder::default()
31 }
32}
33
34/// A builder for [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdatePipelineInputBuilder {
38 pub(crate) pipeline_name: ::std::option::Option<::std::string::String>,
39 pub(crate) pipeline_activities: ::std::option::Option<::std::vec::Vec<crate::types::PipelineActivity>>,
40}
41impl UpdatePipelineInputBuilder {
42 /// <p>The name of the pipeline to update.</p>
43 /// This field is required.
44 pub fn pipeline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 self.pipeline_name = ::std::option::Option::Some(input.into());
46 self
47 }
48 /// <p>The name of the pipeline to update.</p>
49 pub fn set_pipeline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50 self.pipeline_name = input;
51 self
52 }
53 /// <p>The name of the pipeline to update.</p>
54 pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
55 &self.pipeline_name
56 }
57 /// Appends an item to `pipeline_activities`.
58 ///
59 /// To override the contents of this collection use [`set_pipeline_activities`](Self::set_pipeline_activities).
60 ///
61 /// <p>A list of <code>PipelineActivity</code> objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p>
62 /// <p>The list can be 2-25 <code>PipelineActivity</code> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity. For example:</p>
63 /// <p><code>pipelineActivities = \[ { "channel": { ... } }, { "lambda": { ... } }, ... \]</code></p>
64 pub fn pipeline_activities(mut self, input: crate::types::PipelineActivity) -> Self {
65 let mut v = self.pipeline_activities.unwrap_or_default();
66 v.push(input);
67 self.pipeline_activities = ::std::option::Option::Some(v);
68 self
69 }
70 /// <p>A list of <code>PipelineActivity</code> objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p>
71 /// <p>The list can be 2-25 <code>PipelineActivity</code> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity. For example:</p>
72 /// <p><code>pipelineActivities = \[ { "channel": { ... } }, { "lambda": { ... } }, ... \]</code></p>
73 pub fn set_pipeline_activities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PipelineActivity>>) -> Self {
74 self.pipeline_activities = input;
75 self
76 }
77 /// <p>A list of <code>PipelineActivity</code> objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p>
78 /// <p>The list can be 2-25 <code>PipelineActivity</code> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity. For example:</p>
79 /// <p><code>pipelineActivities = \[ { "channel": { ... } }, { "lambda": { ... } }, ... \]</code></p>
80 pub fn get_pipeline_activities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PipelineActivity>> {
81 &self.pipeline_activities
82 }
83 /// Consumes the builder and constructs a [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
84 pub fn build(
85 self,
86 ) -> ::std::result::Result<crate::operation::update_pipeline::UpdatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
87 ::std::result::Result::Ok(crate::operation::update_pipeline::UpdatePipelineInput {
88 pipeline_name: self.pipeline_name,
89 pipeline_activities: self.pipeline_activities,
90 })
91 }
92}