#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListWorkflowsItem {
pub workflow_type: crate::types::WorkflowType,
pub workflow_id: ::std::string::String,
pub status: crate::types::Status,
pub status_description: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub last_updated_at: ::aws_smithy_types::DateTime,
}
impl ListWorkflowsItem {
pub fn workflow_type(&self) -> &crate::types::WorkflowType {
&self.workflow_type
}
pub fn workflow_id(&self) -> &str {
use std::ops::Deref;
self.workflow_id.deref()
}
pub fn status(&self) -> &crate::types::Status {
&self.status
}
pub fn status_description(&self) -> &str {
use std::ops::Deref;
self.status_description.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn last_updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.last_updated_at
}
}
impl ListWorkflowsItem {
pub fn builder() -> crate::types::builders::ListWorkflowsItemBuilder {
crate::types::builders::ListWorkflowsItemBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListWorkflowsItemBuilder {
pub(crate) workflow_type: ::std::option::Option<crate::types::WorkflowType>,
pub(crate) workflow_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::Status>,
pub(crate) status_description: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ListWorkflowsItemBuilder {
pub fn workflow_type(mut self, input: crate::types::WorkflowType) -> Self {
self.workflow_type = ::std::option::Option::Some(input);
self
}
pub fn set_workflow_type(mut self, input: ::std::option::Option<crate::types::WorkflowType>) -> Self {
self.workflow_type = input;
self
}
pub fn get_workflow_type(&self) -> &::std::option::Option<crate::types::WorkflowType> {
&self.workflow_type
}
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 status(mut self, input: crate::types::Status) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
&self.status
}
pub fn status_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_description = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_description = input;
self
}
pub fn get_status_description(&self) -> &::std::option::Option<::std::string::String> {
&self.status_description
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_at = input;
self
}
pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_at
}
pub fn build(self) -> ::std::result::Result<crate::types::ListWorkflowsItem, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::ListWorkflowsItem {
workflow_type: self.workflow_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"workflow_type",
"workflow_type was not specified but it is required when building ListWorkflowsItem",
)
})?,
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 ListWorkflowsItem",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building ListWorkflowsItem",
)
})?,
status_description: self.status_description.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status_description",
"status_description was not specified but it is required when building ListWorkflowsItem",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building ListWorkflowsItem",
)
})?,
last_updated_at: self.last_updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"last_updated_at",
"last_updated_at was not specified but it is required when building ListWorkflowsItem",
)
})?,
})
}
}