aws_sdk_sfn/operation/redrive_execution/
_redrive_execution_output.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 RedriveExecutionOutput {
6    /// <p>The date the execution was last redriven.</p>
7    pub redrive_date: ::aws_smithy_types::DateTime,
8    _request_id: Option<String>,
9}
10impl RedriveExecutionOutput {
11    /// <p>The date the execution was last redriven.</p>
12    pub fn redrive_date(&self) -> &::aws_smithy_types::DateTime {
13        &self.redrive_date
14    }
15}
16impl ::aws_types::request_id::RequestId for RedriveExecutionOutput {
17    fn request_id(&self) -> Option<&str> {
18        self._request_id.as_deref()
19    }
20}
21impl RedriveExecutionOutput {
22    /// Creates a new builder-style object to manufacture [`RedriveExecutionOutput`](crate::operation::redrive_execution::RedriveExecutionOutput).
23    pub fn builder() -> crate::operation::redrive_execution::builders::RedriveExecutionOutputBuilder {
24        crate::operation::redrive_execution::builders::RedriveExecutionOutputBuilder::default()
25    }
26}
27
28/// A builder for [`RedriveExecutionOutput`](crate::operation::redrive_execution::RedriveExecutionOutput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct RedriveExecutionOutputBuilder {
32    pub(crate) redrive_date: ::std::option::Option<::aws_smithy_types::DateTime>,
33    _request_id: Option<String>,
34}
35impl RedriveExecutionOutputBuilder {
36    /// <p>The date the execution was last redriven.</p>
37    /// This field is required.
38    pub fn redrive_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
39        self.redrive_date = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The date the execution was last redriven.</p>
43    pub fn set_redrive_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
44        self.redrive_date = input;
45        self
46    }
47    /// <p>The date the execution was last redriven.</p>
48    pub fn get_redrive_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
49        &self.redrive_date
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`RedriveExecutionOutput`](crate::operation::redrive_execution::RedriveExecutionOutput).
61    /// This method will fail if any of the following fields are not set:
62    /// - [`redrive_date`](crate::operation::redrive_execution::builders::RedriveExecutionOutputBuilder::redrive_date)
63    pub fn build(
64        self,
65    ) -> ::std::result::Result<crate::operation::redrive_execution::RedriveExecutionOutput, ::aws_smithy_types::error::operation::BuildError> {
66        ::std::result::Result::Ok(crate::operation::redrive_execution::RedriveExecutionOutput {
67            redrive_date: self.redrive_date.ok_or_else(|| {
68                ::aws_smithy_types::error::operation::BuildError::missing_field(
69                    "redrive_date",
70                    "redrive_date was not specified but it is required when building RedriveExecutionOutput",
71                )
72            })?,
73            _request_id: self._request_id,
74        })
75    }
76}