aws_sdk_appflow/operation/start_flow/_start_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 StartFlowInput {
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>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>StartFlow</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>
9 /// <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>
10 /// <p>If you specify input parameters that differ from your first request, an error occurs for flows that run on a schedule or based on an event. However, the error doesn't occur for flows that run on demand. You set the conditions that initiate your flow for the <code>triggerConfig</code> parameter.</p>
11 /// <p>If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>StartFlow</code>. The token is active for 8 hours.</p>
12 pub client_token: ::std::option::Option<::std::string::String>,
13}
14impl StartFlowInput {
15 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
16 pub fn flow_name(&self) -> ::std::option::Option<&str> {
17 self.flow_name.as_deref()
18 }
19 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>StartFlow</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>
20 /// <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>
21 /// <p>If you specify input parameters that differ from your first request, an error occurs for flows that run on a schedule or based on an event. However, the error doesn't occur for flows that run on demand. You set the conditions that initiate your flow for the <code>triggerConfig</code> parameter.</p>
22 /// <p>If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>StartFlow</code>. The token is active for 8 hours.</p>
23 pub fn client_token(&self) -> ::std::option::Option<&str> {
24 self.client_token.as_deref()
25 }
26}
27impl StartFlowInput {
28 /// Creates a new builder-style object to manufacture [`StartFlowInput`](crate::operation::start_flow::StartFlowInput).
29 pub fn builder() -> crate::operation::start_flow::builders::StartFlowInputBuilder {
30 crate::operation::start_flow::builders::StartFlowInputBuilder::default()
31 }
32}
33
34/// A builder for [`StartFlowInput`](crate::operation::start_flow::StartFlowInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct StartFlowInputBuilder {
38 pub(crate) flow_name: ::std::option::Option<::std::string::String>,
39 pub(crate) client_token: ::std::option::Option<::std::string::String>,
40}
41impl StartFlowInputBuilder {
42 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
43 /// This field is required.
44 pub fn flow_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 self.flow_name = ::std::option::Option::Some(input.into());
46 self
47 }
48 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
49 pub fn set_flow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50 self.flow_name = input;
51 self
52 }
53 /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
54 pub fn get_flow_name(&self) -> &::std::option::Option<::std::string::String> {
55 &self.flow_name
56 }
57 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>StartFlow</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>
58 /// <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>
59 /// <p>If you specify input parameters that differ from your first request, an error occurs for flows that run on a schedule or based on an event. However, the error doesn't occur for flows that run on demand. You set the conditions that initiate your flow for the <code>triggerConfig</code> parameter.</p>
60 /// <p>If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>StartFlow</code>. The token is active for 8 hours.</p>
61 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.client_token = ::std::option::Option::Some(input.into());
63 self
64 }
65 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>StartFlow</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>
66 /// <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>
67 /// <p>If you specify input parameters that differ from your first request, an error occurs for flows that run on a schedule or based on an event. However, the error doesn't occur for flows that run on demand. You set the conditions that initiate your flow for the <code>triggerConfig</code> parameter.</p>
68 /// <p>If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>StartFlow</code>. The token is active for 8 hours.</p>
69 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.client_token = input;
71 self
72 }
73 /// <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>StartFlow</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>
74 /// <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>
75 /// <p>If you specify input parameters that differ from your first request, an error occurs for flows that run on a schedule or based on an event. However, the error doesn't occur for flows that run on demand. You set the conditions that initiate your flow for the <code>triggerConfig</code> parameter.</p>
76 /// <p>If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>StartFlow</code>. The token is active for 8 hours.</p>
77 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
78 &self.client_token
79 }
80 /// Consumes the builder and constructs a [`StartFlowInput`](crate::operation::start_flow::StartFlowInput).
81 pub fn build(self) -> ::std::result::Result<crate::operation::start_flow::StartFlowInput, ::aws_smithy_types::error::operation::BuildError> {
82 ::std::result::Result::Ok(crate::operation::start_flow::StartFlowInput {
83 flow_name: self.flow_name,
84 client_token: self.client_token,
85 })
86 }
87}