aws-sdk-sfn 1.107.0

AWS SDK for AWS Step Functions
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct StartSyncExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
    pub state_machine_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the execution.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The string that contains the JSON input data for the execution, for example:</p>
    /// <p><code>"{\"first_name\" : \"Alejandro\"}"</code></p><note>
    /// <p>If you don't include any JSON input data, you still must include the two braces, for example: <code>"{}"</code></p>
    /// </note>
    /// <p>Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub input: ::std::option::Option<::std::string::String>,
    /// <p>Passes the X-Ray trace header. The trace header can also be passed in the request payload.</p><note>
    /// <p>For X-Ray traces, all Amazon Web Services services use the <code>X-Amzn-Trace-Id</code> header from the HTTP request. Using the header is the preferred mechanism to identify a trace. <code>StartExecution</code> and <code>StartSyncExecution</code> API operations can also use <code>traceHeader</code> from the body of the request payload. If <b>both</b> sources are provided, Step Functions will use the <b>header value</b> (preferred) over the value in the request body.</p>
    /// </note>
    pub trace_header: ::std::option::Option<::std::string::String>,
    /// <p>If your state machine definition is encrypted with a KMS key, callers must have <code>kms:Decrypt</code> permission to decrypt the definition. Alternatively, you can call the API with <code>includedData = METADATA_ONLY</code> to get a successful response without the encrypted definition.</p>
    pub included_data: ::std::option::Option<crate::types::IncludedData>,
}
impl StartSyncExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
    pub fn state_machine_arn(&self) -> ::std::option::Option<&str> {
        self.state_machine_arn.as_deref()
    }
    /// <p>The name of the execution.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The string that contains the JSON input data for the execution, for example:</p>
    /// <p><code>"{\"first_name\" : \"Alejandro\"}"</code></p><note>
    /// <p>If you don't include any JSON input data, you still must include the two braces, for example: <code>"{}"</code></p>
    /// </note>
    /// <p>Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub fn input(&self) -> ::std::option::Option<&str> {
        self.input.as_deref()
    }
    /// <p>Passes the X-Ray trace header. The trace header can also be passed in the request payload.</p><note>
    /// <p>For X-Ray traces, all Amazon Web Services services use the <code>X-Amzn-Trace-Id</code> header from the HTTP request. Using the header is the preferred mechanism to identify a trace. <code>StartExecution</code> and <code>StartSyncExecution</code> API operations can also use <code>traceHeader</code> from the body of the request payload. If <b>both</b> sources are provided, Step Functions will use the <b>header value</b> (preferred) over the value in the request body.</p>
    /// </note>
    pub fn trace_header(&self) -> ::std::option::Option<&str> {
        self.trace_header.as_deref()
    }
    /// <p>If your state machine definition is encrypted with a KMS key, callers must have <code>kms:Decrypt</code> permission to decrypt the definition. Alternatively, you can call the API with <code>includedData = METADATA_ONLY</code> to get a successful response without the encrypted definition.</p>
    pub fn included_data(&self) -> ::std::option::Option<&crate::types::IncludedData> {
        self.included_data.as_ref()
    }
}
impl ::std::fmt::Debug for StartSyncExecutionInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartSyncExecutionInput");
        formatter.field("state_machine_arn", &self.state_machine_arn);
        formatter.field("name", &self.name);
        formatter.field("input", &"*** Sensitive Data Redacted ***");
        formatter.field("trace_header", &self.trace_header);
        formatter.field("included_data", &self.included_data);
        formatter.finish()
    }
}
impl StartSyncExecutionInput {
    /// Creates a new builder-style object to manufacture [`StartSyncExecutionInput`](crate::operation::start_sync_execution::StartSyncExecutionInput).
    pub fn builder() -> crate::operation::start_sync_execution::builders::StartSyncExecutionInputBuilder {
        crate::operation::start_sync_execution::builders::StartSyncExecutionInputBuilder::default()
    }
}

/// A builder for [`StartSyncExecutionInput`](crate::operation::start_sync_execution::StartSyncExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartSyncExecutionInputBuilder {
    pub(crate) state_machine_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) input: ::std::option::Option<::std::string::String>,
    pub(crate) trace_header: ::std::option::Option<::std::string::String>,
    pub(crate) included_data: ::std::option::Option<crate::types::IncludedData>,
}
impl StartSyncExecutionInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
    /// This field is required.
    pub fn state_machine_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state_machine_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
    pub fn set_state_machine_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state_machine_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
    pub fn get_state_machine_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.state_machine_arn
    }
    /// <p>The name of the execution.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the execution.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the execution.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The string that contains the JSON input data for the execution, for example:</p>
    /// <p><code>"{\"first_name\" : \"Alejandro\"}"</code></p><note>
    /// <p>If you don't include any JSON input data, you still must include the two braces, for example: <code>"{}"</code></p>
    /// </note>
    /// <p>Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub fn input(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.input = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The string that contains the JSON input data for the execution, for example:</p>
    /// <p><code>"{\"first_name\" : \"Alejandro\"}"</code></p><note>
    /// <p>If you don't include any JSON input data, you still must include the two braces, for example: <code>"{}"</code></p>
    /// </note>
    /// <p>Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub fn set_input(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.input = input;
        self
    }
    /// <p>The string that contains the JSON input data for the execution, for example:</p>
    /// <p><code>"{\"first_name\" : \"Alejandro\"}"</code></p><note>
    /// <p>If you don't include any JSON input data, you still must include the two braces, for example: <code>"{}"</code></p>
    /// </note>
    /// <p>Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub fn get_input(&self) -> &::std::option::Option<::std::string::String> {
        &self.input
    }
    /// <p>Passes the X-Ray trace header. The trace header can also be passed in the request payload.</p><note>
    /// <p>For X-Ray traces, all Amazon Web Services services use the <code>X-Amzn-Trace-Id</code> header from the HTTP request. Using the header is the preferred mechanism to identify a trace. <code>StartExecution</code> and <code>StartSyncExecution</code> API operations can also use <code>traceHeader</code> from the body of the request payload. If <b>both</b> sources are provided, Step Functions will use the <b>header value</b> (preferred) over the value in the request body.</p>
    /// </note>
    pub fn trace_header(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.trace_header = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Passes the X-Ray trace header. The trace header can also be passed in the request payload.</p><note>
    /// <p>For X-Ray traces, all Amazon Web Services services use the <code>X-Amzn-Trace-Id</code> header from the HTTP request. Using the header is the preferred mechanism to identify a trace. <code>StartExecution</code> and <code>StartSyncExecution</code> API operations can also use <code>traceHeader</code> from the body of the request payload. If <b>both</b> sources are provided, Step Functions will use the <b>header value</b> (preferred) over the value in the request body.</p>
    /// </note>
    pub fn set_trace_header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.trace_header = input;
        self
    }
    /// <p>Passes the X-Ray trace header. The trace header can also be passed in the request payload.</p><note>
    /// <p>For X-Ray traces, all Amazon Web Services services use the <code>X-Amzn-Trace-Id</code> header from the HTTP request. Using the header is the preferred mechanism to identify a trace. <code>StartExecution</code> and <code>StartSyncExecution</code> API operations can also use <code>traceHeader</code> from the body of the request payload. If <b>both</b> sources are provided, Step Functions will use the <b>header value</b> (preferred) over the value in the request body.</p>
    /// </note>
    pub fn get_trace_header(&self) -> &::std::option::Option<::std::string::String> {
        &self.trace_header
    }
    /// <p>If your state machine definition is encrypted with a KMS key, callers must have <code>kms:Decrypt</code> permission to decrypt the definition. Alternatively, you can call the API with <code>includedData = METADATA_ONLY</code> to get a successful response without the encrypted definition.</p>
    pub fn included_data(mut self, input: crate::types::IncludedData) -> Self {
        self.included_data = ::std::option::Option::Some(input);
        self
    }
    /// <p>If your state machine definition is encrypted with a KMS key, callers must have <code>kms:Decrypt</code> permission to decrypt the definition. Alternatively, you can call the API with <code>includedData = METADATA_ONLY</code> to get a successful response without the encrypted definition.</p>
    pub fn set_included_data(mut self, input: ::std::option::Option<crate::types::IncludedData>) -> Self {
        self.included_data = input;
        self
    }
    /// <p>If your state machine definition is encrypted with a KMS key, callers must have <code>kms:Decrypt</code> permission to decrypt the definition. Alternatively, you can call the API with <code>includedData = METADATA_ONLY</code> to get a successful response without the encrypted definition.</p>
    pub fn get_included_data(&self) -> &::std::option::Option<crate::types::IncludedData> {
        &self.included_data
    }
    /// Consumes the builder and constructs a [`StartSyncExecutionInput`](crate::operation::start_sync_execution::StartSyncExecutionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_sync_execution::StartSyncExecutionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_sync_execution::StartSyncExecutionInput {
            state_machine_arn: self.state_machine_arn,
            name: self.name,
            input: self.input,
            trace_header: self.trace_header,
            included_data: self.included_data,
        })
    }
}
impl ::std::fmt::Debug for StartSyncExecutionInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartSyncExecutionInputBuilder");
        formatter.field("state_machine_arn", &self.state_machine_arn);
        formatter.field("name", &self.name);
        formatter.field("input", &"*** Sensitive Data Redacted ***");
        formatter.field("trace_header", &self.trace_header);
        formatter.field("included_data", &self.included_data);
        formatter.finish()
    }
}