aws_sdk_sfn/operation/start_execution/
_start_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 StartExecutionOutput {
6    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
7    pub execution_arn: ::std::string::String,
8    /// <p>The date the execution is started.</p>
9    pub start_date: ::aws_smithy_types::DateTime,
10    _request_id: Option<String>,
11}
12impl StartExecutionOutput {
13    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
14    pub fn execution_arn(&self) -> &str {
15        use std::ops::Deref;
16        self.execution_arn.deref()
17    }
18    /// <p>The date the execution is started.</p>
19    pub fn start_date(&self) -> &::aws_smithy_types::DateTime {
20        &self.start_date
21    }
22}
23impl ::aws_types::request_id::RequestId for StartExecutionOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl StartExecutionOutput {
29    /// Creates a new builder-style object to manufacture [`StartExecutionOutput`](crate::operation::start_execution::StartExecutionOutput).
30    pub fn builder() -> crate::operation::start_execution::builders::StartExecutionOutputBuilder {
31        crate::operation::start_execution::builders::StartExecutionOutputBuilder::default()
32    }
33}
34
35/// A builder for [`StartExecutionOutput`](crate::operation::start_execution::StartExecutionOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct StartExecutionOutputBuilder {
39    pub(crate) execution_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
41    _request_id: Option<String>,
42}
43impl StartExecutionOutputBuilder {
44    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
45    /// This field is required.
46    pub fn execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.execution_arn = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
51    pub fn set_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.execution_arn = input;
53        self
54    }
55    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
56    pub fn get_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
57        &self.execution_arn
58    }
59    /// <p>The date the execution is started.</p>
60    /// This field is required.
61    pub fn start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
62        self.start_date = ::std::option::Option::Some(input);
63        self
64    }
65    /// <p>The date the execution is started.</p>
66    pub fn set_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
67        self.start_date = input;
68        self
69    }
70    /// <p>The date the execution is started.</p>
71    pub fn get_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
72        &self.start_date
73    }
74    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
75        self._request_id = Some(request_id.into());
76        self
77    }
78
79    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
80        self._request_id = request_id;
81        self
82    }
83    /// Consumes the builder and constructs a [`StartExecutionOutput`](crate::operation::start_execution::StartExecutionOutput).
84    /// This method will fail if any of the following fields are not set:
85    /// - [`execution_arn`](crate::operation::start_execution::builders::StartExecutionOutputBuilder::execution_arn)
86    /// - [`start_date`](crate::operation::start_execution::builders::StartExecutionOutputBuilder::start_date)
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::start_execution::StartExecutionOutput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::start_execution::StartExecutionOutput {
91            execution_arn: self.execution_arn.ok_or_else(|| {
92                ::aws_smithy_types::error::operation::BuildError::missing_field(
93                    "execution_arn",
94                    "execution_arn was not specified but it is required when building StartExecutionOutput",
95                )
96            })?,
97            start_date: self.start_date.ok_or_else(|| {
98                ::aws_smithy_types::error::operation::BuildError::missing_field(
99                    "start_date",
100                    "start_date was not specified but it is required when building StartExecutionOutput",
101                )
102            })?,
103            _request_id: self._request_id,
104        })
105    }
106}