aws_sdk_appflow/operation/update_flow/
_update_flow_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 UpdateFlowInput {
6    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
7    pub flow_name: ::std::option::Option<::std::string::String>,
8    /// <p>A description of the flow.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The trigger settings that determine how and when the flow runs.</p>
11    pub trigger_config: ::std::option::Option<crate::types::TriggerConfig>,
12    /// <p>Contains information about the configuration of the source connector used in the flow.</p>
13    pub source_flow_config: ::std::option::Option<crate::types::SourceFlowConfig>,
14    /// <p>The configuration that controls how Amazon AppFlow transfers data to the destination connector.</p>
15    pub destination_flow_config_list: ::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>>,
16    /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
17    pub tasks: ::std::option::Option<::std::vec::Vec<crate::types::Task>>,
18    /// <p>Specifies the configuration that Amazon AppFlow uses when it catalogs the data that's transferred by the associated flow. When Amazon AppFlow catalogs the data from a flow, it stores metadata in a data catalog.</p>
19    pub metadata_catalog_config: ::std::option::Option<crate::types::MetadataCatalogConfig>,
20    /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>UpdateFlow</code> request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same <code>clientToken</code> parameter value.</p>
21    /// <p>If you omit a <code>clientToken</code> value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.</p>
22    /// <p>If you specify input parameters that differ from your first request, an error occurs. If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>UpdateFlow</code>. The token is active for 8 hours.</p>
23    pub client_token: ::std::option::Option<::std::string::String>,
24}
25impl UpdateFlowInput {
26    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
27    pub fn flow_name(&self) -> ::std::option::Option<&str> {
28        self.flow_name.as_deref()
29    }
30    /// <p>A description of the flow.</p>
31    pub fn description(&self) -> ::std::option::Option<&str> {
32        self.description.as_deref()
33    }
34    /// <p>The trigger settings that determine how and when the flow runs.</p>
35    pub fn trigger_config(&self) -> ::std::option::Option<&crate::types::TriggerConfig> {
36        self.trigger_config.as_ref()
37    }
38    /// <p>Contains information about the configuration of the source connector used in the flow.</p>
39    pub fn source_flow_config(&self) -> ::std::option::Option<&crate::types::SourceFlowConfig> {
40        self.source_flow_config.as_ref()
41    }
42    /// <p>The configuration that controls how Amazon AppFlow transfers data to the destination connector.</p>
43    ///
44    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.destination_flow_config_list.is_none()`.
45    pub fn destination_flow_config_list(&self) -> &[crate::types::DestinationFlowConfig] {
46        self.destination_flow_config_list.as_deref().unwrap_or_default()
47    }
48    /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
49    ///
50    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tasks.is_none()`.
51    pub fn tasks(&self) -> &[crate::types::Task] {
52        self.tasks.as_deref().unwrap_or_default()
53    }
54    /// <p>Specifies the configuration that Amazon AppFlow uses when it catalogs the data that's transferred by the associated flow. When Amazon AppFlow catalogs the data from a flow, it stores metadata in a data catalog.</p>
55    pub fn metadata_catalog_config(&self) -> ::std::option::Option<&crate::types::MetadataCatalogConfig> {
56        self.metadata_catalog_config.as_ref()
57    }
58    /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>UpdateFlow</code> request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same <code>clientToken</code> parameter value.</p>
59    /// <p>If you omit a <code>clientToken</code> value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.</p>
60    /// <p>If you specify input parameters that differ from your first request, an error occurs. If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>UpdateFlow</code>. The token is active for 8 hours.</p>
61    pub fn client_token(&self) -> ::std::option::Option<&str> {
62        self.client_token.as_deref()
63    }
64}
65impl UpdateFlowInput {
66    /// Creates a new builder-style object to manufacture [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
67    pub fn builder() -> crate::operation::update_flow::builders::UpdateFlowInputBuilder {
68        crate::operation::update_flow::builders::UpdateFlowInputBuilder::default()
69    }
70}
71
72/// A builder for [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct UpdateFlowInputBuilder {
76    pub(crate) flow_name: ::std::option::Option<::std::string::String>,
77    pub(crate) description: ::std::option::Option<::std::string::String>,
78    pub(crate) trigger_config: ::std::option::Option<crate::types::TriggerConfig>,
79    pub(crate) source_flow_config: ::std::option::Option<crate::types::SourceFlowConfig>,
80    pub(crate) destination_flow_config_list: ::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>>,
81    pub(crate) tasks: ::std::option::Option<::std::vec::Vec<crate::types::Task>>,
82    pub(crate) metadata_catalog_config: ::std::option::Option<crate::types::MetadataCatalogConfig>,
83    pub(crate) client_token: ::std::option::Option<::std::string::String>,
84}
85impl UpdateFlowInputBuilder {
86    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
87    /// This field is required.
88    pub fn flow_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.flow_name = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
93    pub fn set_flow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.flow_name = input;
95        self
96    }
97    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
98    pub fn get_flow_name(&self) -> &::std::option::Option<::std::string::String> {
99        &self.flow_name
100    }
101    /// <p>A description of the flow.</p>
102    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.description = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>A description of the flow.</p>
107    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.description = input;
109        self
110    }
111    /// <p>A description of the flow.</p>
112    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
113        &self.description
114    }
115    /// <p>The trigger settings that determine how and when the flow runs.</p>
116    /// This field is required.
117    pub fn trigger_config(mut self, input: crate::types::TriggerConfig) -> Self {
118        self.trigger_config = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>The trigger settings that determine how and when the flow runs.</p>
122    pub fn set_trigger_config(mut self, input: ::std::option::Option<crate::types::TriggerConfig>) -> Self {
123        self.trigger_config = input;
124        self
125    }
126    /// <p>The trigger settings that determine how and when the flow runs.</p>
127    pub fn get_trigger_config(&self) -> &::std::option::Option<crate::types::TriggerConfig> {
128        &self.trigger_config
129    }
130    /// <p>Contains information about the configuration of the source connector used in the flow.</p>
131    /// This field is required.
132    pub fn source_flow_config(mut self, input: crate::types::SourceFlowConfig) -> Self {
133        self.source_flow_config = ::std::option::Option::Some(input);
134        self
135    }
136    /// <p>Contains information about the configuration of the source connector used in the flow.</p>
137    pub fn set_source_flow_config(mut self, input: ::std::option::Option<crate::types::SourceFlowConfig>) -> Self {
138        self.source_flow_config = input;
139        self
140    }
141    /// <p>Contains information about the configuration of the source connector used in the flow.</p>
142    pub fn get_source_flow_config(&self) -> &::std::option::Option<crate::types::SourceFlowConfig> {
143        &self.source_flow_config
144    }
145    /// Appends an item to `destination_flow_config_list`.
146    ///
147    /// To override the contents of this collection use [`set_destination_flow_config_list`](Self::set_destination_flow_config_list).
148    ///
149    /// <p>The configuration that controls how Amazon AppFlow transfers data to the destination connector.</p>
150    pub fn destination_flow_config_list(mut self, input: crate::types::DestinationFlowConfig) -> Self {
151        let mut v = self.destination_flow_config_list.unwrap_or_default();
152        v.push(input);
153        self.destination_flow_config_list = ::std::option::Option::Some(v);
154        self
155    }
156    /// <p>The configuration that controls how Amazon AppFlow transfers data to the destination connector.</p>
157    pub fn set_destination_flow_config_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>>) -> Self {
158        self.destination_flow_config_list = input;
159        self
160    }
161    /// <p>The configuration that controls how Amazon AppFlow transfers data to the destination connector.</p>
162    pub fn get_destination_flow_config_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>> {
163        &self.destination_flow_config_list
164    }
165    /// Appends an item to `tasks`.
166    ///
167    /// To override the contents of this collection use [`set_tasks`](Self::set_tasks).
168    ///
169    /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
170    pub fn tasks(mut self, input: crate::types::Task) -> Self {
171        let mut v = self.tasks.unwrap_or_default();
172        v.push(input);
173        self.tasks = ::std::option::Option::Some(v);
174        self
175    }
176    /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
177    pub fn set_tasks(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Task>>) -> Self {
178        self.tasks = input;
179        self
180    }
181    /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
182    pub fn get_tasks(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Task>> {
183        &self.tasks
184    }
185    /// <p>Specifies the configuration that Amazon AppFlow uses when it catalogs the data that's transferred by the associated flow. When Amazon AppFlow catalogs the data from a flow, it stores metadata in a data catalog.</p>
186    pub fn metadata_catalog_config(mut self, input: crate::types::MetadataCatalogConfig) -> Self {
187        self.metadata_catalog_config = ::std::option::Option::Some(input);
188        self
189    }
190    /// <p>Specifies the configuration that Amazon AppFlow uses when it catalogs the data that's transferred by the associated flow. When Amazon AppFlow catalogs the data from a flow, it stores metadata in a data catalog.</p>
191    pub fn set_metadata_catalog_config(mut self, input: ::std::option::Option<crate::types::MetadataCatalogConfig>) -> Self {
192        self.metadata_catalog_config = input;
193        self
194    }
195    /// <p>Specifies the configuration that Amazon AppFlow uses when it catalogs the data that's transferred by the associated flow. When Amazon AppFlow catalogs the data from a flow, it stores metadata in a data catalog.</p>
196    pub fn get_metadata_catalog_config(&self) -> &::std::option::Option<crate::types::MetadataCatalogConfig> {
197        &self.metadata_catalog_config
198    }
199    /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>UpdateFlow</code> request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same <code>clientToken</code> parameter value.</p>
200    /// <p>If you omit a <code>clientToken</code> value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.</p>
201    /// <p>If you specify input parameters that differ from your first request, an error occurs. If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>UpdateFlow</code>. The token is active for 8 hours.</p>
202    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.client_token = ::std::option::Option::Some(input.into());
204        self
205    }
206    /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>UpdateFlow</code> request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same <code>clientToken</code> parameter value.</p>
207    /// <p>If you omit a <code>clientToken</code> value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.</p>
208    /// <p>If you specify input parameters that differ from your first request, an error occurs. If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>UpdateFlow</code>. The token is active for 8 hours.</p>
209    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.client_token = input;
211        self
212    }
213    /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>UpdateFlow</code> request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same <code>clientToken</code> parameter value.</p>
214    /// <p>If you omit a <code>clientToken</code> value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.</p>
215    /// <p>If you specify input parameters that differ from your first request, an error occurs. If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>UpdateFlow</code>. The token is active for 8 hours.</p>
216    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
217        &self.client_token
218    }
219    /// Consumes the builder and constructs a [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
220    pub fn build(self) -> ::std::result::Result<crate::operation::update_flow::UpdateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
221        ::std::result::Result::Ok(crate::operation::update_flow::UpdateFlowInput {
222            flow_name: self.flow_name,
223            description: self.description,
224            trigger_config: self.trigger_config,
225            source_flow_config: self.source_flow_config,
226            destination_flow_config_list: self.destination_flow_config_list,
227            tasks: self.tasks,
228            metadata_catalog_config: self.metadata_catalog_config,
229            client_token: self.client_token,
230        })
231    }
232}