aws_sdk_transfer/operation/describe_execution/
_describe_execution_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeExecutionOutput {
pub workflow_id: ::std::string::String,
pub execution: ::std::option::Option<crate::types::DescribedExecution>,
_request_id: Option<String>,
}
impl DescribeExecutionOutput {
pub fn workflow_id(&self) -> &str {
use std::ops::Deref;
self.workflow_id.deref()
}
pub fn execution(&self) -> ::std::option::Option<&crate::types::DescribedExecution> {
self.execution.as_ref()
}
}
impl ::aws_types::request_id::RequestId for DescribeExecutionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeExecutionOutput {
pub fn builder() -> crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder {
crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeExecutionOutputBuilder {
pub(crate) workflow_id: ::std::option::Option<::std::string::String>,
pub(crate) execution: ::std::option::Option<crate::types::DescribedExecution>,
_request_id: Option<String>,
}
impl DescribeExecutionOutputBuilder {
pub fn workflow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workflow_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_workflow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workflow_id = input;
self
}
pub fn get_workflow_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workflow_id
}
pub fn execution(mut self, input: crate::types::DescribedExecution) -> Self {
self.execution = ::std::option::Option::Some(input);
self
}
pub fn set_execution(mut self, input: ::std::option::Option<crate::types::DescribedExecution>) -> Self {
self.execution = input;
self
}
pub fn get_execution(&self) -> &::std::option::Option<crate::types::DescribedExecution> {
&self.execution
}
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
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::describe_execution::DescribeExecutionOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::describe_execution::DescribeExecutionOutput {
workflow_id: self.workflow_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"workflow_id",
"workflow_id was not specified but it is required when building DescribeExecutionOutput",
)
})?,
execution: self.execution,
_request_id: self._request_id,
})
}
}