#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetJobOutput {
pub action: crate::types::JobAction,
pub action_options: ::std::option::Option<crate::types::JobActionOptions>,
pub created_at: ::aws_smithy_types::DateTime,
pub ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub error: ::std::option::Option<crate::types::JobError>,
pub execution_role_arn: ::std::string::String,
pub input_options: ::std::option::Option<crate::types::JobInputOptions>,
pub job_arn: ::std::string::String,
pub job_id: ::std::string::String,
pub name: ::std::option::Option<::std::string::String>,
pub output_options: ::std::option::Option<crate::types::JobOutputOptions>,
pub status: crate::types::JobStatus,
pub updated_at: ::aws_smithy_types::DateTime,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetJobOutput {
pub fn action(&self) -> &crate::types::JobAction {
&self.action
}
pub fn action_options(&self) -> ::std::option::Option<&crate::types::JobActionOptions> {
self.action_options.as_ref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn ended_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.ended_at.as_ref()
}
pub fn error(&self) -> ::std::option::Option<&crate::types::JobError> {
self.error.as_ref()
}
pub fn execution_role_arn(&self) -> &str {
use std::ops::Deref;
self.execution_role_arn.deref()
}
pub fn input_options(&self) -> ::std::option::Option<&crate::types::JobInputOptions> {
self.input_options.as_ref()
}
pub fn job_arn(&self) -> &str {
use std::ops::Deref;
self.job_arn.deref()
}
pub fn job_id(&self) -> &str {
use std::ops::Deref;
self.job_id.deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn output_options(&self) -> ::std::option::Option<&crate::types::JobOutputOptions> {
self.output_options.as_ref()
}
pub fn status(&self) -> &crate::types::JobStatus {
&self.status
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
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("action", &self.action);
formatter.field("action_options", &self.action_options);
formatter.field("created_at", &"*** Sensitive Data Redacted ***");
formatter.field("ended_at", &"*** Sensitive Data Redacted ***");
formatter.field("error", &self.error);
formatter.field("execution_role_arn", &self.execution_role_arn);
formatter.field("input_options", &self.input_options);
formatter.field("job_arn", &self.job_arn);
formatter.field("job_id", &self.job_id);
formatter.field("name", &self.name);
formatter.field("output_options", &self.output_options);
formatter.field("status", &self.status);
formatter.field("updated_at", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &self.tags);
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) action: ::std::option::Option<crate::types::JobAction>,
pub(crate) action_options: ::std::option::Option<crate::types::JobActionOptions>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) error: ::std::option::Option<crate::types::JobError>,
pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) input_options: ::std::option::Option<crate::types::JobInputOptions>,
pub(crate) job_arn: ::std::option::Option<::std::string::String>,
pub(crate) job_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) output_options: ::std::option::Option<crate::types::JobOutputOptions>,
pub(crate) status: ::std::option::Option<crate::types::JobStatus>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetJobOutputBuilder {
pub fn action(mut self, input: crate::types::JobAction) -> Self {
self.action = ::std::option::Option::Some(input);
self
}
pub fn set_action(mut self, input: ::std::option::Option<crate::types::JobAction>) -> Self {
self.action = input;
self
}
pub fn get_action(&self) -> &::std::option::Option<crate::types::JobAction> {
&self.action
}
pub fn action_options(mut self, input: crate::types::JobActionOptions) -> Self {
self.action_options = ::std::option::Option::Some(input);
self
}
pub fn set_action_options(mut self, input: ::std::option::Option<crate::types::JobActionOptions>) -> Self {
self.action_options = input;
self
}
pub fn get_action_options(&self) -> &::std::option::Option<crate::types::JobActionOptions> {
&self.action_options
}
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 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 error(mut self, input: crate::types::JobError) -> Self {
self.error = ::std::option::Option::Some(input);
self
}
pub fn set_error(mut self, input: ::std::option::Option<crate::types::JobError>) -> Self {
self.error = input;
self
}
pub fn get_error(&self) -> &::std::option::Option<crate::types::JobError> {
&self.error
}
pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.execution_role_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.execution_role_arn = input;
self
}
pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.execution_role_arn
}
pub fn input_options(mut self, input: crate::types::JobInputOptions) -> Self {
self.input_options = ::std::option::Option::Some(input);
self
}
pub fn set_input_options(mut self, input: ::std::option::Option<crate::types::JobInputOptions>) -> Self {
self.input_options = input;
self
}
pub fn get_input_options(&self) -> &::std::option::Option<crate::types::JobInputOptions> {
&self.input_options
}
pub fn job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_arn = input;
self
}
pub fn get_job_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.job_arn
}
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 output_options(mut self, input: crate::types::JobOutputOptions) -> Self {
self.output_options = ::std::option::Option::Some(input);
self
}
pub fn set_output_options(mut self, input: ::std::option::Option<crate::types::JobOutputOptions>) -> Self {
self.output_options = input;
self
}
pub fn get_output_options(&self) -> &::std::option::Option<crate::types::JobOutputOptions> {
&self.output_options
}
pub fn status(mut self, input: crate::types::JobStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::JobStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::JobStatus> {
&self.status
}
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 tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
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 {
action: self.action.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"action",
"action was not specified but it is required when building GetJobOutput",
)
})?,
action_options: self.action_options,
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",
)
})?,
ended_at: self.ended_at,
error: self.error,
execution_role_arn: self.execution_role_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"execution_role_arn",
"execution_role_arn was not specified but it is required when building GetJobOutput",
)
})?,
input_options: self.input_options,
job_arn: self.job_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"job_arn",
"job_arn was not specified but it is required when building 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,
output_options: self.output_options,
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 GetJobOutput",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building GetJobOutput",
)
})?,
tags: self.tags,
_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("action", &self.action);
formatter.field("action_options", &self.action_options);
formatter.field("created_at", &"*** Sensitive Data Redacted ***");
formatter.field("ended_at", &"*** Sensitive Data Redacted ***");
formatter.field("error", &self.error);
formatter.field("execution_role_arn", &self.execution_role_arn);
formatter.field("input_options", &self.input_options);
formatter.field("job_arn", &self.job_arn);
formatter.field("job_id", &self.job_id);
formatter.field("name", &self.name);
formatter.field("output_options", &self.output_options);
formatter.field("status", &self.status);
formatter.field("updated_at", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &self.tags);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}