aws-sdk-lambda 1.121.0

AWS SDK for AWS Lambda
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, ::std::fmt::Debug)]
pub struct StopDurableExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
    pub durable_execution_arn: ::std::option::Option<::std::string::String>,
    /// <p>Optional error details explaining why the execution is being stopped.</p>
    pub error: ::std::option::Option<crate::types::ErrorObject>,
}
impl StopDurableExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
    pub fn durable_execution_arn(&self) -> ::std::option::Option<&str> {
        self.durable_execution_arn.as_deref()
    }
    /// <p>Optional error details explaining why the execution is being stopped.</p>
    pub fn error(&self) -> ::std::option::Option<&crate::types::ErrorObject> {
        self.error.as_ref()
    }
}
impl StopDurableExecutionInput {
    /// Creates a new builder-style object to manufacture [`StopDurableExecutionInput`](crate::operation::stop_durable_execution::StopDurableExecutionInput).
    pub fn builder() -> crate::operation::stop_durable_execution::builders::StopDurableExecutionInputBuilder {
        crate::operation::stop_durable_execution::builders::StopDurableExecutionInputBuilder::default()
    }
}

/// A builder for [`StopDurableExecutionInput`](crate::operation::stop_durable_execution::StopDurableExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopDurableExecutionInputBuilder {
    pub(crate) durable_execution_arn: ::std::option::Option<::std::string::String>,
    pub(crate) error: ::std::option::Option<crate::types::ErrorObject>,
}
impl StopDurableExecutionInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
    /// This field is required.
    pub fn durable_execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.durable_execution_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
    pub fn set_durable_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.durable_execution_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
    pub fn get_durable_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.durable_execution_arn
    }
    /// <p>Optional error details explaining why the execution is being stopped.</p>
    pub fn error(mut self, input: crate::types::ErrorObject) -> Self {
        self.error = ::std::option::Option::Some(input);
        self
    }
    /// <p>Optional error details explaining why the execution is being stopped.</p>
    pub fn set_error(mut self, input: ::std::option::Option<crate::types::ErrorObject>) -> Self {
        self.error = input;
        self
    }
    /// <p>Optional error details explaining why the execution is being stopped.</p>
    pub fn get_error(&self) -> &::std::option::Option<crate::types::ErrorObject> {
        &self.error
    }
    /// Consumes the builder and constructs a [`StopDurableExecutionInput`](crate::operation::stop_durable_execution::StopDurableExecutionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::stop_durable_execution::StopDurableExecutionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::stop_durable_execution::StopDurableExecutionInput {
            durable_execution_arn: self.durable_execution_arn,
            error: self.error,
        })
    }
}