#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeTaskOutput {
pub task_id: ::std::option::Option<::std::string::String>,
pub task_arn: ::std::option::Option<::std::string::String>,
pub targets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub state: ::std::option::Option<crate::types::TaskState>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub completed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub description: ::std::option::Option<::std::string::String>,
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::string::String] {
self.targets.as_deref().unwrap_or_default()
}
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_types::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()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
self.task_id = ::std::option::Option::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 get_task_id(&self) -> &::std::option::Option<::std::string::String> {
&self.task_id
}
pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.task_arn = ::std::option::Option::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 get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.task_arn
}
pub fn targets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.targets.unwrap_or_default();
v.push(input.into());
self.targets = ::std::option::Option::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 get_targets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.targets
}
pub fn state(mut self, input: crate::types::TaskState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
pub fn set_state(mut self, input: ::std::option::Option<crate::types::TaskState>) -> Self {
self.state = input;
self
}
pub fn get_state(&self) -> &::std::option::Option<crate::types::TaskState> {
&self.state
}
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 completed_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.completed_at = ::std::option::Option::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 get_completed_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.completed_at
}
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 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) -> 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,
}
}
}