aws-sdk-lambda 1.119.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 StopDurableExecutionOutput {
    /// <p>The timestamp when the execution was stopped (ISO 8601 format).</p>
    pub stop_timestamp: ::aws_smithy_types::DateTime,
    _request_id: Option<String>,
}
impl StopDurableExecutionOutput {
    /// <p>The timestamp when the execution was stopped (ISO 8601 format).</p>
    pub fn stop_timestamp(&self) -> &::aws_smithy_types::DateTime {
        &self.stop_timestamp
    }
}
impl ::aws_types::request_id::RequestId for StopDurableExecutionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl StopDurableExecutionOutput {
    /// Creates a new builder-style object to manufacture [`StopDurableExecutionOutput`](crate::operation::stop_durable_execution::StopDurableExecutionOutput).
    pub fn builder() -> crate::operation::stop_durable_execution::builders::StopDurableExecutionOutputBuilder {
        crate::operation::stop_durable_execution::builders::StopDurableExecutionOutputBuilder::default()
    }
}

/// A builder for [`StopDurableExecutionOutput`](crate::operation::stop_durable_execution::StopDurableExecutionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopDurableExecutionOutputBuilder {
    pub(crate) stop_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl StopDurableExecutionOutputBuilder {
    /// <p>The timestamp when the execution was stopped (ISO 8601 format).</p>
    /// This field is required.
    pub fn stop_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.stop_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the execution was stopped (ISO 8601 format).</p>
    pub fn set_stop_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.stop_timestamp = input;
        self
    }
    /// <p>The timestamp when the execution was stopped (ISO 8601 format).</p>
    pub fn get_stop_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.stop_timestamp
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`StopDurableExecutionOutput`](crate::operation::stop_durable_execution::StopDurableExecutionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`stop_timestamp`](crate::operation::stop_durable_execution::builders::StopDurableExecutionOutputBuilder::stop_timestamp)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::stop_durable_execution::StopDurableExecutionOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::stop_durable_execution::StopDurableExecutionOutput {
            stop_timestamp: self.stop_timestamp.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "stop_timestamp",
                    "stop_timestamp was not specified but it is required when building StopDurableExecutionOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}