aws_sdk_sfn/operation/start_execution/
_start_execution_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartExecutionOutput {
6 pub execution_arn: ::std::string::String,
8 pub start_date: ::aws_smithy_types::DateTime,
10 _request_id: Option<String>,
11}
12impl StartExecutionOutput {
13 pub fn execution_arn(&self) -> &str {
15 use std::ops::Deref;
16 self.execution_arn.deref()
17 }
18 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 pub fn builder() -> crate::operation::start_execution::builders::StartExecutionOutputBuilder {
31 crate::operation::start_execution::builders::StartExecutionOutputBuilder::default()
32 }
33}
34
35#[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 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 pub fn set_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.execution_arn = input;
53 self
54 }
55 pub fn get_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
57 &self.execution_arn
58 }
59 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 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 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 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}