aws-sdk-ecs 1.128.0

AWS SDK for Amazon EC2 Container Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteTaskSetInput {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.</p>
    pub cluster: ::std::option::Option<::std::string::String>,
    /// <p>The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.</p>
    pub service: ::std::option::Option<::std::string::String>,
    /// <p>The task set ID or full Amazon Resource Name (ARN) of the task set to delete.</p>
    pub task_set: ::std::option::Option<::std::string::String>,
    /// <p>If <code>true</code>, you can delete a task set even if it hasn't been scaled down to zero.</p>
    pub force: ::std::option::Option<bool>,
}
impl DeleteTaskSetInput {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.</p>
    pub fn cluster(&self) -> ::std::option::Option<&str> {
        self.cluster.as_deref()
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.</p>
    pub fn service(&self) -> ::std::option::Option<&str> {
        self.service.as_deref()
    }
    /// <p>The task set ID or full Amazon Resource Name (ARN) of the task set to delete.</p>
    pub fn task_set(&self) -> ::std::option::Option<&str> {
        self.task_set.as_deref()
    }
    /// <p>If <code>true</code>, you can delete a task set even if it hasn't been scaled down to zero.</p>
    pub fn force(&self) -> ::std::option::Option<bool> {
        self.force
    }
}
impl DeleteTaskSetInput {
    /// Creates a new builder-style object to manufacture [`DeleteTaskSetInput`](crate::operation::delete_task_set::DeleteTaskSetInput).
    pub fn builder() -> crate::operation::delete_task_set::builders::DeleteTaskSetInputBuilder {
        crate::operation::delete_task_set::builders::DeleteTaskSetInputBuilder::default()
    }
}

/// A builder for [`DeleteTaskSetInput`](crate::operation::delete_task_set::DeleteTaskSetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteTaskSetInputBuilder {
    pub(crate) cluster: ::std::option::Option<::std::string::String>,
    pub(crate) service: ::std::option::Option<::std::string::String>,
    pub(crate) task_set: ::std::option::Option<::std::string::String>,
    pub(crate) force: ::std::option::Option<bool>,
}
impl DeleteTaskSetInputBuilder {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.</p>
    /// This field is required.
    pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.</p>
    pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster = input;
        self
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.</p>
    pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.</p>
    /// This field is required.
    pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.</p>
    pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service = input;
        self
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.</p>
    pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
        &self.service
    }
    /// <p>The task set ID or full Amazon Resource Name (ARN) of the task set to delete.</p>
    /// This field is required.
    pub fn task_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_set = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The task set ID or full Amazon Resource Name (ARN) of the task set to delete.</p>
    pub fn set_task_set(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_set = input;
        self
    }
    /// <p>The task set ID or full Amazon Resource Name (ARN) of the task set to delete.</p>
    pub fn get_task_set(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_set
    }
    /// <p>If <code>true</code>, you can delete a task set even if it hasn't been scaled down to zero.</p>
    pub fn force(mut self, input: bool) -> Self {
        self.force = ::std::option::Option::Some(input);
        self
    }
    /// <p>If <code>true</code>, you can delete a task set even if it hasn't been scaled down to zero.</p>
    pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
        self.force = input;
        self
    }
    /// <p>If <code>true</code>, you can delete a task set even if it hasn't been scaled down to zero.</p>
    pub fn get_force(&self) -> &::std::option::Option<bool> {
        &self.force
    }
    /// Consumes the builder and constructs a [`DeleteTaskSetInput`](crate::operation::delete_task_set::DeleteTaskSetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_task_set::DeleteTaskSetInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_task_set::DeleteTaskSetInput {
            cluster: self.cluster,
            service: self.service,
            task_set: self.task_set,
            force: self.force,
        })
    }
}