aws_sdk_appflow/operation/create_flow/_create_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 CreateFlowInput {
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 you want to create.</p>
9 pub description: ::std::option::Option<::std::string::String>,
10 /// <p>The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.</p>
11 pub kms_arn: ::std::option::Option<::std::string::String>,
12 /// <p>The trigger settings that determine how and when the flow runs.</p>
13 pub trigger_config: ::std::option::Option<crate::types::TriggerConfig>,
14 /// <p>The configuration that controls how Amazon AppFlow retrieves data from the source connector.</p>
15 pub source_flow_config: ::std::option::Option<crate::types::SourceFlowConfig>,
16 /// <p>The configuration that controls how Amazon AppFlow places data in the destination connector.</p>
17 pub destination_flow_config_list: ::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>>,
18 /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
19 pub tasks: ::std::option::Option<::std::vec::Vec<crate::types::Task>>,
20 /// <p>The tags used to organize, track, or control access for your flow.</p>
21 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22 /// <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>
23 pub metadata_catalog_config: ::std::option::Option<crate::types::MetadataCatalogConfig>,
24 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>CreateFlow</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>
25 /// <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>
26 /// <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>CreateFlow</code>. The token is active for 8 hours.</p>
27 pub client_token: ::std::option::Option<::std::string::String>,
28}
29impl CreateFlowInput {
30 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
31 pub fn flow_name(&self) -> ::std::option::Option<&str> {
32 self.flow_name.as_deref()
33 }
34 /// <p>A description of the flow you want to create.</p>
35 pub fn description(&self) -> ::std::option::Option<&str> {
36 self.description.as_deref()
37 }
38 /// <p>The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.</p>
39 pub fn kms_arn(&self) -> ::std::option::Option<&str> {
40 self.kms_arn.as_deref()
41 }
42 /// <p>The trigger settings that determine how and when the flow runs.</p>
43 pub fn trigger_config(&self) -> ::std::option::Option<&crate::types::TriggerConfig> {
44 self.trigger_config.as_ref()
45 }
46 /// <p>The configuration that controls how Amazon AppFlow retrieves data from the source connector.</p>
47 pub fn source_flow_config(&self) -> ::std::option::Option<&crate::types::SourceFlowConfig> {
48 self.source_flow_config.as_ref()
49 }
50 /// <p>The configuration that controls how Amazon AppFlow places data in the destination connector.</p>
51 ///
52 /// 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()`.
53 pub fn destination_flow_config_list(&self) -> &[crate::types::DestinationFlowConfig] {
54 self.destination_flow_config_list.as_deref().unwrap_or_default()
55 }
56 /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
57 ///
58 /// 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()`.
59 pub fn tasks(&self) -> &[crate::types::Task] {
60 self.tasks.as_deref().unwrap_or_default()
61 }
62 /// <p>The tags used to organize, track, or control access for your flow.</p>
63 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
64 self.tags.as_ref()
65 }
66 /// <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>
67 pub fn metadata_catalog_config(&self) -> ::std::option::Option<&crate::types::MetadataCatalogConfig> {
68 self.metadata_catalog_config.as_ref()
69 }
70 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>CreateFlow</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>
71 /// <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>
72 /// <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>CreateFlow</code>. The token is active for 8 hours.</p>
73 pub fn client_token(&self) -> ::std::option::Option<&str> {
74 self.client_token.as_deref()
75 }
76}
77impl CreateFlowInput {
78 /// Creates a new builder-style object to manufacture [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
79 pub fn builder() -> crate::operation::create_flow::builders::CreateFlowInputBuilder {
80 crate::operation::create_flow::builders::CreateFlowInputBuilder::default()
81 }
82}
83
84/// A builder for [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct CreateFlowInputBuilder {
88 pub(crate) flow_name: ::std::option::Option<::std::string::String>,
89 pub(crate) description: ::std::option::Option<::std::string::String>,
90 pub(crate) kms_arn: ::std::option::Option<::std::string::String>,
91 pub(crate) trigger_config: ::std::option::Option<crate::types::TriggerConfig>,
92 pub(crate) source_flow_config: ::std::option::Option<crate::types::SourceFlowConfig>,
93 pub(crate) destination_flow_config_list: ::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>>,
94 pub(crate) tasks: ::std::option::Option<::std::vec::Vec<crate::types::Task>>,
95 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
96 pub(crate) metadata_catalog_config: ::std::option::Option<crate::types::MetadataCatalogConfig>,
97 pub(crate) client_token: ::std::option::Option<::std::string::String>,
98}
99impl CreateFlowInputBuilder {
100 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
101 /// This field is required.
102 pub fn flow_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.flow_name = ::std::option::Option::Some(input.into());
104 self
105 }
106 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
107 pub fn set_flow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.flow_name = input;
109 self
110 }
111 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
112 pub fn get_flow_name(&self) -> &::std::option::Option<::std::string::String> {
113 &self.flow_name
114 }
115 /// <p>A description of the flow you want to create.</p>
116 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.description = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <p>A description of the flow you want to create.</p>
121 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.description = input;
123 self
124 }
125 /// <p>A description of the flow you want to create.</p>
126 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
127 &self.description
128 }
129 /// <p>The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.</p>
130 pub fn kms_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.kms_arn = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.</p>
135 pub fn set_kms_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.kms_arn = input;
137 self
138 }
139 /// <p>The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.</p>
140 pub fn get_kms_arn(&self) -> &::std::option::Option<::std::string::String> {
141 &self.kms_arn
142 }
143 /// <p>The trigger settings that determine how and when the flow runs.</p>
144 /// This field is required.
145 pub fn trigger_config(mut self, input: crate::types::TriggerConfig) -> Self {
146 self.trigger_config = ::std::option::Option::Some(input);
147 self
148 }
149 /// <p>The trigger settings that determine how and when the flow runs.</p>
150 pub fn set_trigger_config(mut self, input: ::std::option::Option<crate::types::TriggerConfig>) -> Self {
151 self.trigger_config = input;
152 self
153 }
154 /// <p>The trigger settings that determine how and when the flow runs.</p>
155 pub fn get_trigger_config(&self) -> &::std::option::Option<crate::types::TriggerConfig> {
156 &self.trigger_config
157 }
158 /// <p>The configuration that controls how Amazon AppFlow retrieves data from the source connector.</p>
159 /// This field is required.
160 pub fn source_flow_config(mut self, input: crate::types::SourceFlowConfig) -> Self {
161 self.source_flow_config = ::std::option::Option::Some(input);
162 self
163 }
164 /// <p>The configuration that controls how Amazon AppFlow retrieves data from the source connector.</p>
165 pub fn set_source_flow_config(mut self, input: ::std::option::Option<crate::types::SourceFlowConfig>) -> Self {
166 self.source_flow_config = input;
167 self
168 }
169 /// <p>The configuration that controls how Amazon AppFlow retrieves data from the source connector.</p>
170 pub fn get_source_flow_config(&self) -> &::std::option::Option<crate::types::SourceFlowConfig> {
171 &self.source_flow_config
172 }
173 /// Appends an item to `destination_flow_config_list`.
174 ///
175 /// To override the contents of this collection use [`set_destination_flow_config_list`](Self::set_destination_flow_config_list).
176 ///
177 /// <p>The configuration that controls how Amazon AppFlow places data in the destination connector.</p>
178 pub fn destination_flow_config_list(mut self, input: crate::types::DestinationFlowConfig) -> Self {
179 let mut v = self.destination_flow_config_list.unwrap_or_default();
180 v.push(input);
181 self.destination_flow_config_list = ::std::option::Option::Some(v);
182 self
183 }
184 /// <p>The configuration that controls how Amazon AppFlow places data in the destination connector.</p>
185 pub fn set_destination_flow_config_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>>) -> Self {
186 self.destination_flow_config_list = input;
187 self
188 }
189 /// <p>The configuration that controls how Amazon AppFlow places data in the destination connector.</p>
190 pub fn get_destination_flow_config_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DestinationFlowConfig>> {
191 &self.destination_flow_config_list
192 }
193 /// Appends an item to `tasks`.
194 ///
195 /// To override the contents of this collection use [`set_tasks`](Self::set_tasks).
196 ///
197 /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
198 pub fn tasks(mut self, input: crate::types::Task) -> Self {
199 let mut v = self.tasks.unwrap_or_default();
200 v.push(input);
201 self.tasks = ::std::option::Option::Some(v);
202 self
203 }
204 /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
205 pub fn set_tasks(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Task>>) -> Self {
206 self.tasks = input;
207 self
208 }
209 /// <p>A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.</p>
210 pub fn get_tasks(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Task>> {
211 &self.tasks
212 }
213 /// Adds a key-value pair to `tags`.
214 ///
215 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
216 ///
217 /// <p>The tags used to organize, track, or control access for your flow.</p>
218 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
219 let mut hash_map = self.tags.unwrap_or_default();
220 hash_map.insert(k.into(), v.into());
221 self.tags = ::std::option::Option::Some(hash_map);
222 self
223 }
224 /// <p>The tags used to organize, track, or control access for your flow.</p>
225 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
226 self.tags = input;
227 self
228 }
229 /// <p>The tags used to organize, track, or control access for your flow.</p>
230 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
231 &self.tags
232 }
233 /// <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>
234 pub fn metadata_catalog_config(mut self, input: crate::types::MetadataCatalogConfig) -> Self {
235 self.metadata_catalog_config = ::std::option::Option::Some(input);
236 self
237 }
238 /// <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>
239 pub fn set_metadata_catalog_config(mut self, input: ::std::option::Option<crate::types::MetadataCatalogConfig>) -> Self {
240 self.metadata_catalog_config = input;
241 self
242 }
243 /// <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>
244 pub fn get_metadata_catalog_config(&self) -> &::std::option::Option<crate::types::MetadataCatalogConfig> {
245 &self.metadata_catalog_config
246 }
247 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>CreateFlow</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>
248 /// <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>
249 /// <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>CreateFlow</code>. The token is active for 8 hours.</p>
250 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251 self.client_token = ::std::option::Option::Some(input.into());
252 self
253 }
254 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>CreateFlow</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>
255 /// <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>
256 /// <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>CreateFlow</code>. The token is active for 8 hours.</p>
257 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.client_token = input;
259 self
260 }
261 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>CreateFlow</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>
262 /// <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>
263 /// <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>CreateFlow</code>. The token is active for 8 hours.</p>
264 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
265 &self.client_token
266 }
267 /// Consumes the builder and constructs a [`CreateFlowInput`](crate::operation::create_flow::CreateFlowInput).
268 pub fn build(self) -> ::std::result::Result<crate::operation::create_flow::CreateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
269 ::std::result::Result::Ok(crate::operation::create_flow::CreateFlowInput {
270 flow_name: self.flow_name,
271 description: self.description,
272 kms_arn: self.kms_arn,
273 trigger_config: self.trigger_config,
274 source_flow_config: self.source_flow_config,
275 destination_flow_config_list: self.destination_flow_config_list,
276 tasks: self.tasks,
277 tags: self.tags,
278 metadata_catalog_config: self.metadata_catalog_config,
279 client_token: self.client_token,
280 })
281 }
282}