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 SendTaskSuccessInput {
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
    pub task_token: ::std::option::Option<::std::string::String>,
    /// <p>The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub output: ::std::option::Option<::std::string::String>,
}
impl SendTaskSuccessInput {
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
    pub fn task_token(&self) -> ::std::option::Option<&str> {
        self.task_token.as_deref()
    }
    /// <p>The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub fn output(&self) -> ::std::option::Option<&str> {
        self.output.as_deref()
    }
}
impl ::std::fmt::Debug for SendTaskSuccessInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("SendTaskSuccessInput");
        formatter.field("task_token", &self.task_token);
        formatter.field("output", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl SendTaskSuccessInput {
    /// Creates a new builder-style object to manufacture [`SendTaskSuccessInput`](crate::operation::send_task_success::SendTaskSuccessInput).
    pub fn builder() -> crate::operation::send_task_success::builders::SendTaskSuccessInputBuilder {
        crate::operation::send_task_success::builders::SendTaskSuccessInputBuilder::default()
    }
}

/// A builder for [`SendTaskSuccessInput`](crate::operation::send_task_success::SendTaskSuccessInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SendTaskSuccessInputBuilder {
    pub(crate) task_token: ::std::option::Option<::std::string::String>,
    pub(crate) output: ::std::option::Option<::std::string::String>,
}
impl SendTaskSuccessInputBuilder {
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
    /// This field is required.
    pub fn task_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
    pub fn set_task_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_token = input;
        self
    }
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
    pub fn get_task_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_token
    }
    /// <p>The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    /// This field is required.
    pub fn output(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.output = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub fn set_output(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.output = input;
        self
    }
    /// <p>The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    pub fn get_output(&self) -> &::std::option::Option<::std::string::String> {
        &self.output
    }
    /// Consumes the builder and constructs a [`SendTaskSuccessInput`](crate::operation::send_task_success::SendTaskSuccessInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::send_task_success::SendTaskSuccessInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::send_task_success::SendTaskSuccessInput {
            task_token: self.task_token,
            output: self.output,
        })
    }
}
impl ::std::fmt::Debug for SendTaskSuccessInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("SendTaskSuccessInputBuilder");
        formatter.field("task_token", &self.task_token);
        formatter.field("output", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}