aws_sdk_ecs/operation/describe_clusters/
_describe_clusters_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeClustersInput {
6    /// <p>A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.</p>
7    pub clusters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>Determines whether to include additional information about the clusters in the response. If this field is omitted, this information isn't included.</p>
9    /// <p>If <code>ATTACHMENTS</code> is specified, the attachments for the container instances or tasks within the cluster are included, for example the capacity providers.</p>
10    /// <p>If <code>SETTINGS</code> is specified, the settings for the cluster are included.</p>
11    /// <p>If <code>CONFIGURATIONS</code> is specified, the configuration for the cluster is included.</p>
12    /// <p>If <code>STATISTICS</code> is specified, the task and service count is included, separated by launch type.</p>
13    /// <p>If <code>TAGS</code> is specified, the metadata tags associated with the cluster are included.</p>
14    pub include: ::std::option::Option<::std::vec::Vec<crate::types::ClusterField>>,
15}
16impl DescribeClustersInput {
17    /// <p>A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.</p>
18    ///
19    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.clusters.is_none()`.
20    pub fn clusters(&self) -> &[::std::string::String] {
21        self.clusters.as_deref().unwrap_or_default()
22    }
23    /// <p>Determines whether to include additional information about the clusters in the response. If this field is omitted, this information isn't included.</p>
24    /// <p>If <code>ATTACHMENTS</code> is specified, the attachments for the container instances or tasks within the cluster are included, for example the capacity providers.</p>
25    /// <p>If <code>SETTINGS</code> is specified, the settings for the cluster are included.</p>
26    /// <p>If <code>CONFIGURATIONS</code> is specified, the configuration for the cluster is included.</p>
27    /// <p>If <code>STATISTICS</code> is specified, the task and service count is included, separated by launch type.</p>
28    /// <p>If <code>TAGS</code> is specified, the metadata tags associated with the cluster are included.</p>
29    ///
30    /// 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()`.
31    pub fn include(&self) -> &[crate::types::ClusterField] {
32        self.include.as_deref().unwrap_or_default()
33    }
34}
35impl DescribeClustersInput {
36    /// Creates a new builder-style object to manufacture [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
37    pub fn builder() -> crate::operation::describe_clusters::builders::DescribeClustersInputBuilder {
38        crate::operation::describe_clusters::builders::DescribeClustersInputBuilder::default()
39    }
40}
41
42/// A builder for [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct DescribeClustersInputBuilder {
46    pub(crate) clusters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
47    pub(crate) include: ::std::option::Option<::std::vec::Vec<crate::types::ClusterField>>,
48}
49impl DescribeClustersInputBuilder {
50    /// Appends an item to `clusters`.
51    ///
52    /// To override the contents of this collection use [`set_clusters`](Self::set_clusters).
53    ///
54    /// <p>A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.</p>
55    pub fn clusters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56        let mut v = self.clusters.unwrap_or_default();
57        v.push(input.into());
58        self.clusters = ::std::option::Option::Some(v);
59        self
60    }
61    /// <p>A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.</p>
62    pub fn set_clusters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
63        self.clusters = input;
64        self
65    }
66    /// <p>A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.</p>
67    pub fn get_clusters(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
68        &self.clusters
69    }
70    /// Appends an item to `include`.
71    ///
72    /// To override the contents of this collection use [`set_include`](Self::set_include).
73    ///
74    /// <p>Determines whether to include additional information about the clusters in the response. If this field is omitted, this information isn't included.</p>
75    /// <p>If <code>ATTACHMENTS</code> is specified, the attachments for the container instances or tasks within the cluster are included, for example the capacity providers.</p>
76    /// <p>If <code>SETTINGS</code> is specified, the settings for the cluster are included.</p>
77    /// <p>If <code>CONFIGURATIONS</code> is specified, the configuration for the cluster is included.</p>
78    /// <p>If <code>STATISTICS</code> is specified, the task and service count is included, separated by launch type.</p>
79    /// <p>If <code>TAGS</code> is specified, the metadata tags associated with the cluster are included.</p>
80    pub fn include(mut self, input: crate::types::ClusterField) -> Self {
81        let mut v = self.include.unwrap_or_default();
82        v.push(input);
83        self.include = ::std::option::Option::Some(v);
84        self
85    }
86    /// <p>Determines whether to include additional information about the clusters in the response. If this field is omitted, this information isn't included.</p>
87    /// <p>If <code>ATTACHMENTS</code> is specified, the attachments for the container instances or tasks within the cluster are included, for example the capacity providers.</p>
88    /// <p>If <code>SETTINGS</code> is specified, the settings for the cluster are included.</p>
89    /// <p>If <code>CONFIGURATIONS</code> is specified, the configuration for the cluster is included.</p>
90    /// <p>If <code>STATISTICS</code> is specified, the task and service count is included, separated by launch type.</p>
91    /// <p>If <code>TAGS</code> is specified, the metadata tags associated with the cluster are included.</p>
92    pub fn set_include(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterField>>) -> Self {
93        self.include = input;
94        self
95    }
96    /// <p>Determines whether to include additional information about the clusters in the response. If this field is omitted, this information isn't included.</p>
97    /// <p>If <code>ATTACHMENTS</code> is specified, the attachments for the container instances or tasks within the cluster are included, for example the capacity providers.</p>
98    /// <p>If <code>SETTINGS</code> is specified, the settings for the cluster are included.</p>
99    /// <p>If <code>CONFIGURATIONS</code> is specified, the configuration for the cluster is included.</p>
100    /// <p>If <code>STATISTICS</code> is specified, the task and service count is included, separated by launch type.</p>
101    /// <p>If <code>TAGS</code> is specified, the metadata tags associated with the cluster are included.</p>
102    pub fn get_include(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterField>> {
103        &self.include
104    }
105    /// Consumes the builder and constructs a [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
106    pub fn build(
107        self,
108    ) -> ::std::result::Result<crate::operation::describe_clusters::DescribeClustersInput, ::aws_smithy_types::error::operation::BuildError> {
109        ::std::result::Result::Ok(crate::operation::describe_clusters::DescribeClustersInput {
110            clusters: self.clusters,
111            include: self.include,
112        })
113    }
114}