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 DescribeContainerInstancesInput {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.</p>
    pub cluster: ::std::option::Option<::std::string::String>,
    /// <p>A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.</p>
    pub container_instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Specifies whether you want to see the resource tags for the container instance. If <code>TAGS</code> is specified, the tags are included in the response. If <code>CONTAINER_INSTANCE_HEALTH</code> is specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren't included in the response.</p>
    pub include: ::std::option::Option<::std::vec::Vec<crate::types::ContainerInstanceField>>,
}
impl DescribeContainerInstancesInput {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.</p>
    pub fn cluster(&self) -> ::std::option::Option<&str> {
        self.cluster.as_deref()
    }
    /// <p>A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.container_instances.is_none()`.
    pub fn container_instances(&self) -> &[::std::string::String] {
        self.container_instances.as_deref().unwrap_or_default()
    }
    /// <p>Specifies whether you want to see the resource tags for the container instance. If <code>TAGS</code> is specified, the tags are included in the response. If <code>CONTAINER_INSTANCE_HEALTH</code> is specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren't included in the response.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.include.is_none()`.
    pub fn include(&self) -> &[crate::types::ContainerInstanceField] {
        self.include.as_deref().unwrap_or_default()
    }
}
impl DescribeContainerInstancesInput {
    /// Creates a new builder-style object to manufacture [`DescribeContainerInstancesInput`](crate::operation::describe_container_instances::DescribeContainerInstancesInput).
    pub fn builder() -> crate::operation::describe_container_instances::builders::DescribeContainerInstancesInputBuilder {
        crate::operation::describe_container_instances::builders::DescribeContainerInstancesInputBuilder::default()
    }
}

/// A builder for [`DescribeContainerInstancesInput`](crate::operation::describe_container_instances::DescribeContainerInstancesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeContainerInstancesInputBuilder {
    pub(crate) cluster: ::std::option::Option<::std::string::String>,
    pub(crate) container_instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) include: ::std::option::Option<::std::vec::Vec<crate::types::ContainerInstanceField>>,
}
impl DescribeContainerInstancesInputBuilder {
    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.</p>
    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 container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.</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 container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.</p>
    pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster
    }
    /// Appends an item to `container_instances`.
    ///
    /// To override the contents of this collection use [`set_container_instances`](Self::set_container_instances).
    ///
    /// <p>A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.</p>
    pub fn container_instances(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.container_instances.unwrap_or_default();
        v.push(input.into());
        self.container_instances = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.</p>
    pub fn set_container_instances(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.container_instances = input;
        self
    }
    /// <p>A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.</p>
    pub fn get_container_instances(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.container_instances
    }
    /// Appends an item to `include`.
    ///
    /// To override the contents of this collection use [`set_include`](Self::set_include).
    ///
    /// <p>Specifies whether you want to see the resource tags for the container instance. If <code>TAGS</code> is specified, the tags are included in the response. If <code>CONTAINER_INSTANCE_HEALTH</code> is specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren't included in the response.</p>
    pub fn include(mut self, input: crate::types::ContainerInstanceField) -> Self {
        let mut v = self.include.unwrap_or_default();
        v.push(input);
        self.include = ::std::option::Option::Some(v);
        self
    }
    /// <p>Specifies whether you want to see the resource tags for the container instance. If <code>TAGS</code> is specified, the tags are included in the response. If <code>CONTAINER_INSTANCE_HEALTH</code> is specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren't included in the response.</p>
    pub fn set_include(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ContainerInstanceField>>) -> Self {
        self.include = input;
        self
    }
    /// <p>Specifies whether you want to see the resource tags for the container instance. If <code>TAGS</code> is specified, the tags are included in the response. If <code>CONTAINER_INSTANCE_HEALTH</code> is specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren't included in the response.</p>
    pub fn get_include(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ContainerInstanceField>> {
        &self.include
    }
    /// Consumes the builder and constructs a [`DescribeContainerInstancesInput`](crate::operation::describe_container_instances::DescribeContainerInstancesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_container_instances::DescribeContainerInstancesInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::describe_container_instances::DescribeContainerInstancesInput {
            cluster: self.cluster,
            container_instances: self.container_instances,
            include: self.include,
        })
    }
}