aws_sdk_transfer/operation/describe_execution/
_describe_execution_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeExecutionOutput {
6 pub workflow_id: ::std::string::String,
8 pub execution: ::std::option::Option<crate::types::DescribedExecution>,
10 _request_id: Option<String>,
11}
12impl DescribeExecutionOutput {
13 pub fn workflow_id(&self) -> &str {
15 use std::ops::Deref;
16 self.workflow_id.deref()
17 }
18 pub fn execution(&self) -> ::std::option::Option<&crate::types::DescribedExecution> {
20 self.execution.as_ref()
21 }
22}
23impl ::aws_types::request_id::RequestId for DescribeExecutionOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl DescribeExecutionOutput {
29 pub fn builder() -> crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder {
31 crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DescribeExecutionOutputBuilder {
39 pub(crate) workflow_id: ::std::option::Option<::std::string::String>,
40 pub(crate) execution: ::std::option::Option<crate::types::DescribedExecution>,
41 _request_id: Option<String>,
42}
43impl DescribeExecutionOutputBuilder {
44 pub fn workflow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.workflow_id = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_workflow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.workflow_id = input;
53 self
54 }
55 pub fn get_workflow_id(&self) -> &::std::option::Option<::std::string::String> {
57 &self.workflow_id
58 }
59 pub fn execution(mut self, input: crate::types::DescribedExecution) -> Self {
62 self.execution = ::std::option::Option::Some(input);
63 self
64 }
65 pub fn set_execution(mut self, input: ::std::option::Option<crate::types::DescribedExecution>) -> Self {
67 self.execution = input;
68 self
69 }
70 pub fn get_execution(&self) -> &::std::option::Option<crate::types::DescribedExecution> {
72 &self.execution
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(
87 self,
88 ) -> ::std::result::Result<crate::operation::describe_execution::DescribeExecutionOutput, ::aws_smithy_types::error::operation::BuildError> {
89 ::std::result::Result::Ok(crate::operation::describe_execution::DescribeExecutionOutput {
90 workflow_id: self.workflow_id.ok_or_else(|| {
91 ::aws_smithy_types::error::operation::BuildError::missing_field(
92 "workflow_id",
93 "workflow_id was not specified but it is required when building DescribeExecutionOutput",
94 )
95 })?,
96 execution: self.execution,
97 _request_id: self._request_id,
98 })
99 }
100}