#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetJobOutput {
pub job_id: ::std::string::String,
pub name: ::std::string::String,
pub lifecycle_status: crate::types::JobLifecycleStatus,
pub lifecycle_status_message: ::std::string::String,
pub priority: i32,
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 task_run_status: ::std::option::Option<crate::types::TaskRunStatus>,
pub target_task_run_status: ::std::option::Option<crate::types::JobTargetTaskRunStatus>,
pub task_run_status_counts: ::std::option::Option<::std::collections::HashMap<crate::types::TaskRunStatus, i32>>,
pub storage_profile_id: ::std::option::Option<::std::string::String>,
pub max_failed_tasks_count: ::std::option::Option<i32>,
pub max_retries_per_task: ::std::option::Option<i32>,
pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>>,
pub attachments: ::std::option::Option<crate::types::Attachments>,
pub description: ::std::option::Option<::std::string::String>,
pub source_job_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetJobOutput {
pub fn job_id(&self) -> &str {
use std::ops::Deref;
self.job_id.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn lifecycle_status(&self) -> &crate::types::JobLifecycleStatus {
&self.lifecycle_status
}
pub fn lifecycle_status_message(&self) -> &str {
use std::ops::Deref;
self.lifecycle_status_message.deref()
}
pub fn priority(&self) -> i32 {
self.priority
}
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 task_run_status(&self) -> ::std::option::Option<&crate::types::TaskRunStatus> {
self.task_run_status.as_ref()
}
pub fn target_task_run_status(&self) -> ::std::option::Option<&crate::types::JobTargetTaskRunStatus> {
self.target_task_run_status.as_ref()
}
pub fn task_run_status_counts(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::TaskRunStatus, i32>> {
self.task_run_status_counts.as_ref()
}
pub fn storage_profile_id(&self) -> ::std::option::Option<&str> {
self.storage_profile_id.as_deref()
}
pub fn max_failed_tasks_count(&self) -> ::std::option::Option<i32> {
self.max_failed_tasks_count
}
pub fn max_retries_per_task(&self) -> ::std::option::Option<i32> {
self.max_retries_per_task
}
pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::JobParameter>> {
self.parameters.as_ref()
}
pub fn attachments(&self) -> ::std::option::Option<&crate::types::Attachments> {
self.attachments.as_ref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn source_job_id(&self) -> ::std::option::Option<&str> {
self.source_job_id.as_deref()
}
}
impl ::std::fmt::Debug for GetJobOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetJobOutput");
formatter.field("job_id", &self.job_id);
formatter.field("name", &self.name);
formatter.field("lifecycle_status", &self.lifecycle_status);
formatter.field("lifecycle_status_message", &self.lifecycle_status_message);
formatter.field("priority", &self.priority);
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("task_run_status", &self.task_run_status);
formatter.field("target_task_run_status", &self.target_task_run_status);
formatter.field("task_run_status_counts", &self.task_run_status_counts);
formatter.field("storage_profile_id", &self.storage_profile_id);
formatter.field("max_failed_tasks_count", &self.max_failed_tasks_count);
formatter.field("max_retries_per_task", &self.max_retries_per_task);
formatter.field("parameters", &"*** Sensitive Data Redacted ***");
formatter.field("attachments", &self.attachments);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("source_job_id", &self.source_job_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetJobOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetJobOutput {
pub fn builder() -> crate::operation::get_job::builders::GetJobOutputBuilder {
crate::operation::get_job::builders::GetJobOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetJobOutputBuilder {
pub(crate) job_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::JobLifecycleStatus>,
pub(crate) lifecycle_status_message: ::std::option::Option<::std::string::String>,
pub(crate) priority: ::std::option::Option<i32>,
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) task_run_status: ::std::option::Option<crate::types::TaskRunStatus>,
pub(crate) target_task_run_status: ::std::option::Option<crate::types::JobTargetTaskRunStatus>,
pub(crate) task_run_status_counts: ::std::option::Option<::std::collections::HashMap<crate::types::TaskRunStatus, i32>>,
pub(crate) storage_profile_id: ::std::option::Option<::std::string::String>,
pub(crate) max_failed_tasks_count: ::std::option::Option<i32>,
pub(crate) max_retries_per_task: ::std::option::Option<i32>,
pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>>,
pub(crate) attachments: ::std::option::Option<crate::types::Attachments>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) source_job_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetJobOutputBuilder {
pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.job_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::JobLifecycleStatus) -> Self {
self.lifecycle_status = ::std::option::Option::Some(input);
self
}
pub fn set_lifecycle_status(mut self, input: ::std::option::Option<crate::types::JobLifecycleStatus>) -> Self {
self.lifecycle_status = input;
self
}
pub fn get_lifecycle_status(&self) -> &::std::option::Option<crate::types::JobLifecycleStatus> {
&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 priority(mut self, input: i32) -> Self {
self.priority = ::std::option::Option::Some(input);
self
}
pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
self.priority = input;
self
}
pub fn get_priority(&self) -> &::std::option::Option<i32> {
&self.priority
}
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 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 target_task_run_status(mut self, input: crate::types::JobTargetTaskRunStatus) -> 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::JobTargetTaskRunStatus>) -> Self {
self.target_task_run_status = input;
self
}
pub fn get_target_task_run_status(&self) -> &::std::option::Option<crate::types::JobTargetTaskRunStatus> {
&self.target_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 storage_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.storage_profile_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_storage_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.storage_profile_id = input;
self
}
pub fn get_storage_profile_id(&self) -> &::std::option::Option<::std::string::String> {
&self.storage_profile_id
}
pub fn max_failed_tasks_count(mut self, input: i32) -> Self {
self.max_failed_tasks_count = ::std::option::Option::Some(input);
self
}
pub fn set_max_failed_tasks_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_failed_tasks_count = input;
self
}
pub fn get_max_failed_tasks_count(&self) -> &::std::option::Option<i32> {
&self.max_failed_tasks_count
}
pub fn max_retries_per_task(mut self, input: i32) -> Self {
self.max_retries_per_task = ::std::option::Option::Some(input);
self
}
pub fn set_max_retries_per_task(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_retries_per_task = input;
self
}
pub fn get_max_retries_per_task(&self) -> &::std::option::Option<i32> {
&self.max_retries_per_task
}
pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::JobParameter) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v);
self.parameters = ::std::option::Option::Some(hash_map);
self
}
pub fn set_parameters(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>>,
) -> Self {
self.parameters = input;
self
}
pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>> {
&self.parameters
}
pub fn attachments(mut self, input: crate::types::Attachments) -> Self {
self.attachments = ::std::option::Option::Some(input);
self
}
pub fn set_attachments(mut self, input: ::std::option::Option<crate::types::Attachments>) -> Self {
self.attachments = input;
self
}
pub fn get_attachments(&self) -> &::std::option::Option<crate::types::Attachments> {
&self.attachments
}
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 fn source_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_job_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_source_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_job_id = input;
self
}
pub fn get_source_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_job_id
}
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_job::GetJobOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_job::GetJobOutput {
job_id: self.job_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"job_id",
"job_id was not specified but it is required when building GetJobOutput",
)
})?,
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 GetJobOutput",
)
})?,
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 GetJobOutput",
)
})?,
lifecycle_status_message: self.lifecycle_status_message.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"lifecycle_status_message",
"lifecycle_status_message was not specified but it is required when building GetJobOutput",
)
})?,
priority: self.priority.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"priority",
"priority was not specified but it is required when building GetJobOutput",
)
})?,
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 GetJobOutput",
)
})?,
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 GetJobOutput",
)
})?,
updated_at: self.updated_at,
updated_by: self.updated_by,
started_at: self.started_at,
ended_at: self.ended_at,
task_run_status: self.task_run_status,
target_task_run_status: self.target_task_run_status,
task_run_status_counts: self.task_run_status_counts,
storage_profile_id: self.storage_profile_id,
max_failed_tasks_count: self.max_failed_tasks_count,
max_retries_per_task: self.max_retries_per_task,
parameters: self.parameters,
attachments: self.attachments,
description: self.description,
source_job_id: self.source_job_id,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetJobOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetJobOutputBuilder");
formatter.field("job_id", &self.job_id);
formatter.field("name", &self.name);
formatter.field("lifecycle_status", &self.lifecycle_status);
formatter.field("lifecycle_status_message", &self.lifecycle_status_message);
formatter.field("priority", &self.priority);
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("task_run_status", &self.task_run_status);
formatter.field("target_task_run_status", &self.target_task_run_status);
formatter.field("task_run_status_counts", &self.task_run_status_counts);
formatter.field("storage_profile_id", &self.storage_profile_id);
formatter.field("max_failed_tasks_count", &self.max_failed_tasks_count);
formatter.field("max_retries_per_task", &self.max_retries_per_task);
formatter.field("parameters", &"*** Sensitive Data Redacted ***");
formatter.field("attachments", &self.attachments);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("source_job_id", &self.source_job_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}