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 UpdateTaskSetInput {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set is found in.</p>
    pub cluster: ::std::option::Option<::std::string::String>,
    /// <p>The short name or full Amazon Resource Name (ARN) of the service that the task set is found in.</p>
    pub service: ::std::option::Option<::std::string::String>,
    /// <p>The short name or full Amazon Resource Name (ARN) of the task set to update.</p>
    pub task_set: ::std::option::Option<::std::string::String>,
    /// <p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p>
    pub scale: ::std::option::Option<crate::types::Scale>,
}
impl UpdateTaskSetInput {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set is found in.</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 the task set is found in.</p>
    pub fn service(&self) -> ::std::option::Option<&str> {
        self.service.as_deref()
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the task set to update.</p>
    pub fn task_set(&self) -> ::std::option::Option<&str> {
        self.task_set.as_deref()
    }
    /// <p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p>
    pub fn scale(&self) -> ::std::option::Option<&crate::types::Scale> {
        self.scale.as_ref()
    }
}
impl UpdateTaskSetInput {
    /// Creates a new builder-style object to manufacture [`UpdateTaskSetInput`](crate::operation::update_task_set::UpdateTaskSetInput).
    pub fn builder() -> crate::operation::update_task_set::builders::UpdateTaskSetInputBuilder {
        crate::operation::update_task_set::builders::UpdateTaskSetInputBuilder::default()
    }
}

/// A builder for [`UpdateTaskSetInput`](crate::operation::update_task_set::UpdateTaskSetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTaskSetInputBuilder {
    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) scale: ::std::option::Option<crate::types::Scale>,
}
impl UpdateTaskSetInputBuilder {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set is found in.</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 is found in.</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 is found in.</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 the task set is found in.</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 the task set is found in.</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 the task set is found in.</p>
    pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
        &self.service
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the task set to update.</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 short name or full Amazon Resource Name (ARN) of the task set to update.</p>
    pub fn set_task_set(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_set = input;
        self
    }
    /// <p>The short name or full Amazon Resource Name (ARN) of the task set to update.</p>
    pub fn get_task_set(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_set
    }
    /// <p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p>
    /// This field is required.
    pub fn scale(mut self, input: crate::types::Scale) -> Self {
        self.scale = ::std::option::Option::Some(input);
        self
    }
    /// <p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p>
    pub fn set_scale(mut self, input: ::std::option::Option<crate::types::Scale>) -> Self {
        self.scale = input;
        self
    }
    /// <p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p>
    pub fn get_scale(&self) -> &::std::option::Option<crate::types::Scale> {
        &self.scale
    }
    /// Consumes the builder and constructs a [`UpdateTaskSetInput`](crate::operation::update_task_set::UpdateTaskSetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_task_set::UpdateTaskSetInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_task_set::UpdateTaskSetInput {
            cluster: self.cluster,
            service: self.service,
            task_set: self.task_set,
            scale: self.scale,
        })
    }
}