#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeTaskOutput {
#[doc(hidden)]
pub task_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub task_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub targets: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub state: std::option::Option<crate::types::TaskState>,
#[doc(hidden)]
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub completed_at: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
_request_id: Option<String>,
}
impl DescribeTaskOutput {
pub fn task_id(&self) -> std::option::Option<&str> {
self.task_id.as_deref()
}
pub fn task_arn(&self) -> std::option::Option<&str> {
self.task_arn.as_deref()
}
pub fn targets(&self) -> std::option::Option<&[std::string::String]> {
self.targets.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::types::TaskState> {
self.state.as_ref()
}
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn last_updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated_at.as_ref()
}
pub fn completed_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.completed_at.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl aws_http::request_id::RequestId for DescribeTaskOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeTaskOutput {
pub fn builder() -> crate::operation::describe_task::builders::DescribeTaskOutputBuilder {
crate::operation::describe_task::builders::DescribeTaskOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeTaskOutputBuilder {
pub(crate) task_id: std::option::Option<std::string::String>,
pub(crate) task_arn: std::option::Option<std::string::String>,
pub(crate) targets: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) state: std::option::Option<crate::types::TaskState>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) completed_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
_request_id: Option<String>,
}
impl DescribeTaskOutputBuilder {
pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.task_id = Some(input.into());
self
}
pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.task_id = input;
self
}
pub fn task_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.task_arn = Some(input.into());
self
}
pub fn set_task_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.task_arn = input;
self
}
pub fn targets(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.targets.unwrap_or_default();
v.push(input.into());
self.targets = Some(v);
self
}
pub fn set_targets(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.targets = input;
self
}
pub fn state(mut self, input: crate::types::TaskState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(mut self, input: std::option::Option<crate::types::TaskState>) -> Self {
self.state = input;
self
}
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = 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 last_updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated_at = 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 completed_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.completed_at = Some(input);
self
}
pub fn set_completed_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.completed_at = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = 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(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) -> crate::operation::describe_task::DescribeTaskOutput {
crate::operation::describe_task::DescribeTaskOutput {
task_id: self.task_id,
task_arn: self.task_arn,
targets: self.targets,
state: self.state,
created_at: self.created_at,
last_updated_at: self.last_updated_at,
completed_at: self.completed_at,
description: self.description,
tags: self.tags,
_request_id: self._request_id,
}
}
}