aws_sdk_deadline/operation/get_step/
_get_step_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetStepOutput {
pub step_id: ::std::string::String,
pub name: ::std::string::String,
pub lifecycle_status: crate::types::StepLifecycleStatus,
pub lifecycle_status_message: ::std::option::Option<::std::string::String>,
pub task_run_status: crate::types::TaskRunStatus,
pub task_run_status_counts: ::std::collections::HashMap<crate::types::TaskRunStatus, i32>,
pub target_task_run_status: ::std::option::Option<crate::types::StepTargetTaskRunStatus>,
pub created_at: ::aws_smithy_types::DateTime,
pub created_by: ::std::string::String,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_by: ::std::option::Option<::std::string::String>,
pub started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub dependency_counts: ::std::option::Option<crate::types::DependencyCounts>,
pub required_capabilities: ::std::option::Option<crate::types::StepRequiredCapabilities>,
pub parameter_space: ::std::option::Option<crate::types::ParameterSpace>,
pub description: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetStepOutput {
pub fn step_id(&self) -> &str {
use std::ops::Deref;
self.step_id.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn lifecycle_status(&self) -> &crate::types::StepLifecycleStatus {
&self.lifecycle_status
}
pub fn lifecycle_status_message(&self) -> ::std::option::Option<&str> {
self.lifecycle_status_message.as_deref()
}
pub fn task_run_status(&self) -> &crate::types::TaskRunStatus {
&self.task_run_status
}
pub fn task_run_status_counts(&self) -> &::std::collections::HashMap<crate::types::TaskRunStatus, i32> {
&self.task_run_status_counts
}
pub fn target_task_run_status(&self) -> ::std::option::Option<&crate::types::StepTargetTaskRunStatus> {
self.target_task_run_status.as_ref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn created_by(&self) -> &str {
use std::ops::Deref;
self.created_by.deref()
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn updated_by(&self) -> ::std::option::Option<&str> {
self.updated_by.as_deref()
}
pub fn started_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.started_at.as_ref()
}
pub fn ended_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.ended_at.as_ref()
}
pub fn dependency_counts(&self) -> ::std::option::Option<&crate::types::DependencyCounts> {
self.dependency_counts.as_ref()
}
pub fn required_capabilities(&self) -> ::std::option::Option<&crate::types::StepRequiredCapabilities> {
self.required_capabilities.as_ref()
}
pub fn parameter_space(&self) -> ::std::option::Option<&crate::types::ParameterSpace> {
self.parameter_space.as_ref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
}
impl ::std::fmt::Debug for GetStepOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetStepOutput");
formatter.field("step_id", &self.step_id);
formatter.field("name", &self.name);
formatter.field("lifecycle_status", &self.lifecycle_status);
formatter.field("lifecycle_status_message", &self.lifecycle_status_message);
formatter.field("task_run_status", &self.task_run_status);
formatter.field("task_run_status_counts", &self.task_run_status_counts);
formatter.field("target_task_run_status", &self.target_task_run_status);
formatter.field("created_at", &self.created_at);
formatter.field("created_by", &self.created_by);
formatter.field("updated_at", &self.updated_at);
formatter.field("updated_by", &self.updated_by);
formatter.field("started_at", &self.started_at);
formatter.field("ended_at", &self.ended_at);
formatter.field("dependency_counts", &self.dependency_counts);
formatter.field("required_capabilities", &self.required_capabilities);
formatter.field("parameter_space", &self.parameter_space);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetStepOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetStepOutput {
pub fn builder() -> crate::operation::get_step::builders::GetStepOutputBuilder {
crate::operation::get_step::builders::GetStepOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetStepOutputBuilder {
pub(crate) step_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) lifecycle_status: ::std::option::Option<crate::types::StepLifecycleStatus>,
pub(crate) lifecycle_status_message: ::std::option::Option<::std::string::String>,
pub(crate) task_run_status: ::std::option::Option<crate::types::TaskRunStatus>,
pub(crate) task_run_status_counts: ::std::option::Option<::std::collections::HashMap<crate::types::TaskRunStatus, i32>>,
pub(crate) target_task_run_status: ::std::option::Option<crate::types::StepTargetTaskRunStatus>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_by: ::std::option::Option<::std::string::String>,
pub(crate) started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) dependency_counts: ::std::option::Option<crate::types::DependencyCounts>,
pub(crate) required_capabilities: ::std::option::Option<crate::types::StepRequiredCapabilities>,
pub(crate) parameter_space: ::std::option::Option<crate::types::ParameterSpace>,
pub(crate) description: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetStepOutputBuilder {
pub fn step_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.step_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_step_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.step_id = input;
self
}
pub fn get_step_id(&self) -> &::std::option::Option<::std::string::String> {
&self.step_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn lifecycle_status(mut self, input: crate::types::StepLifecycleStatus) -> Self {
self.lifecycle_status = ::std::option::Option::Some(input);
self
}
pub fn set_lifecycle_status(mut self, input: ::std::option::Option<crate::types::StepLifecycleStatus>) -> Self {
self.lifecycle_status = input;
self
}
pub fn get_lifecycle_status(&self) -> &::std::option::Option<crate::types::StepLifecycleStatus> {
&self.lifecycle_status
}
pub fn lifecycle_status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.lifecycle_status_message = ::std::option::Option::Some(input.into());
self
}
pub fn set_lifecycle_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.lifecycle_status_message = input;
self
}
pub fn get_lifecycle_status_message(&self) -> &::std::option::Option<::std::string::String> {
&self.lifecycle_status_message
}
pub fn task_run_status(mut self, input: crate::types::TaskRunStatus) -> Self {
self.task_run_status = ::std::option::Option::Some(input);
self
}
pub fn set_task_run_status(mut self, input: ::std::option::Option<crate::types::TaskRunStatus>) -> Self {
self.task_run_status = input;
self
}
pub fn get_task_run_status(&self) -> &::std::option::Option<crate::types::TaskRunStatus> {
&self.task_run_status
}
pub fn task_run_status_counts(mut self, k: crate::types::TaskRunStatus, v: i32) -> Self {
let mut hash_map = self.task_run_status_counts.unwrap_or_default();
hash_map.insert(k, v);
self.task_run_status_counts = ::std::option::Option::Some(hash_map);
self
}
pub fn set_task_run_status_counts(mut self, input: ::std::option::Option<::std::collections::HashMap<crate::types::TaskRunStatus, i32>>) -> Self {
self.task_run_status_counts = input;
self
}
pub fn get_task_run_status_counts(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::TaskRunStatus, i32>> {
&self.task_run_status_counts
}
pub fn target_task_run_status(mut self, input: crate::types::StepTargetTaskRunStatus) -> Self {
self.target_task_run_status = ::std::option::Option::Some(input);
self
}
pub fn set_target_task_run_status(mut self, input: ::std::option::Option<crate::types::StepTargetTaskRunStatus>) -> Self {
self.target_task_run_status = input;
self
}
pub fn get_target_task_run_status(&self) -> &::std::option::Option<crate::types::StepTargetTaskRunStatus> {
&self.target_task_run_status
}
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 created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.updated_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.updated_by = input;
self
}
pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
&self.updated_by
}
pub fn started_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.started_at = ::std::option::Option::Some(input);
self
}
pub fn set_started_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.started_at = input;
self
}
pub fn get_started_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.started_at
}
pub fn ended_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.ended_at = ::std::option::Option::Some(input);
self
}
pub fn set_ended_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.ended_at = input;
self
}
pub fn get_ended_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.ended_at
}
pub fn dependency_counts(mut self, input: crate::types::DependencyCounts) -> Self {
self.dependency_counts = ::std::option::Option::Some(input);
self
}
pub fn set_dependency_counts(mut self, input: ::std::option::Option<crate::types::DependencyCounts>) -> Self {
self.dependency_counts = input;
self
}
pub fn get_dependency_counts(&self) -> &::std::option::Option<crate::types::DependencyCounts> {
&self.dependency_counts
}
pub fn required_capabilities(mut self, input: crate::types::StepRequiredCapabilities) -> Self {
self.required_capabilities = ::std::option::Option::Some(input);
self
}
pub fn set_required_capabilities(mut self, input: ::std::option::Option<crate::types::StepRequiredCapabilities>) -> Self {
self.required_capabilities = input;
self
}
pub fn get_required_capabilities(&self) -> &::std::option::Option<crate::types::StepRequiredCapabilities> {
&self.required_capabilities
}
pub fn parameter_space(mut self, input: crate::types::ParameterSpace) -> Self {
self.parameter_space = ::std::option::Option::Some(input);
self
}
pub fn set_parameter_space(mut self, input: ::std::option::Option<crate::types::ParameterSpace>) -> Self {
self.parameter_space = input;
self
}
pub fn get_parameter_space(&self) -> &::std::option::Option<crate::types::ParameterSpace> {
&self.parameter_space
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
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::get_step::GetStepOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_step::GetStepOutput {
step_id: self.step_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"step_id",
"step_id was not specified but it is required when building GetStepOutput",
)
})?,
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building GetStepOutput",
)
})?,
lifecycle_status: self.lifecycle_status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"lifecycle_status",
"lifecycle_status was not specified but it is required when building GetStepOutput",
)
})?,
lifecycle_status_message: self.lifecycle_status_message,
task_run_status: self.task_run_status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"task_run_status",
"task_run_status was not specified but it is required when building GetStepOutput",
)
})?,
task_run_status_counts: self.task_run_status_counts.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"task_run_status_counts",
"task_run_status_counts was not specified but it is required when building GetStepOutput",
)
})?,
target_task_run_status: self.target_task_run_status,
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 GetStepOutput",
)
})?,
created_by: self.created_by.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_by",
"created_by was not specified but it is required when building GetStepOutput",
)
})?,
updated_at: self.updated_at,
updated_by: self.updated_by,
started_at: self.started_at,
ended_at: self.ended_at,
dependency_counts: self.dependency_counts,
required_capabilities: self.required_capabilities,
parameter_space: self.parameter_space,
description: self.description,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetStepOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetStepOutputBuilder");
formatter.field("step_id", &self.step_id);
formatter.field("name", &self.name);
formatter.field("lifecycle_status", &self.lifecycle_status);
formatter.field("lifecycle_status_message", &self.lifecycle_status_message);
formatter.field("task_run_status", &self.task_run_status);
formatter.field("task_run_status_counts", &self.task_run_status_counts);
formatter.field("target_task_run_status", &self.target_task_run_status);
formatter.field("created_at", &self.created_at);
formatter.field("created_by", &self.created_by);
formatter.field("updated_at", &self.updated_at);
formatter.field("updated_by", &self.updated_by);
formatter.field("started_at", &self.started_at);
formatter.field("ended_at", &self.ended_at);
formatter.field("dependency_counts", &self.dependency_counts);
formatter.field("required_capabilities", &self.required_capabilities);
formatter.field("parameter_space", &self.parameter_space);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}