// 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 ListDaemonsInput {
/// <p>The Amazon Resource Name (ARN) of the cluster to filter daemons by. If not specified, daemons from all clusters are returned.</p>
pub cluster_arn: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Names (ARNs) of the capacity providers to filter daemons by. Only daemons associated with the specified capacity providers are returned.</p>
pub capacity_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The maximum number of daemon results that <code>ListDaemons</code> returned in paginated output. When this parameter is used, <code>ListDaemons</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListDaemons</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListDaemons</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
pub max_results: ::std::option::Option<i32>,
/// <p>The <code>nextToken</code> value returned from a <code>ListDaemons</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible for the number of results to be fewer than <code>maxResults</code>.</p><note>
/// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
/// </note>
pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListDaemonsInput {
/// <p>The Amazon Resource Name (ARN) of the cluster to filter daemons by. If not specified, daemons from all clusters are returned.</p>
pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
self.cluster_arn.as_deref()
}
/// <p>The Amazon Resource Names (ARNs) of the capacity providers to filter daemons by. Only daemons associated with the specified capacity providers are returned.</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 `.capacity_provider_arns.is_none()`.
pub fn capacity_provider_arns(&self) -> &[::std::string::String] {
self.capacity_provider_arns.as_deref().unwrap_or_default()
}
/// <p>The maximum number of daemon results that <code>ListDaemons</code> returned in paginated output. When this parameter is used, <code>ListDaemons</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListDaemons</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListDaemons</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
/// <p>The <code>nextToken</code> value returned from a <code>ListDaemons</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible for the number of results to be fewer than <code>maxResults</code>.</p><note>
/// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
/// </note>
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl ListDaemonsInput {
/// Creates a new builder-style object to manufacture [`ListDaemonsInput`](crate::operation::list_daemons::ListDaemonsInput).
pub fn builder() -> crate::operation::list_daemons::builders::ListDaemonsInputBuilder {
crate::operation::list_daemons::builders::ListDaemonsInputBuilder::default()
}
}
/// A builder for [`ListDaemonsInput`](crate::operation::list_daemons::ListDaemonsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListDaemonsInputBuilder {
pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
pub(crate) capacity_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListDaemonsInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the cluster to filter daemons by. If not specified, daemons from all clusters are returned.</p>
pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the cluster to filter daemons by. If not specified, daemons from all clusters are returned.</p>
pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the cluster to filter daemons by. If not specified, daemons from all clusters are returned.</p>
pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_arn
}
/// Appends an item to `capacity_provider_arns`.
///
/// To override the contents of this collection use [`set_capacity_provider_arns`](Self::set_capacity_provider_arns).
///
/// <p>The Amazon Resource Names (ARNs) of the capacity providers to filter daemons by. Only daemons associated with the specified capacity providers are returned.</p>
pub fn capacity_provider_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.capacity_provider_arns.unwrap_or_default();
v.push(input.into());
self.capacity_provider_arns = ::std::option::Option::Some(v);
self
}
/// <p>The Amazon Resource Names (ARNs) of the capacity providers to filter daemons by. Only daemons associated with the specified capacity providers are returned.</p>
pub fn set_capacity_provider_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.capacity_provider_arns = input;
self
}
/// <p>The Amazon Resource Names (ARNs) of the capacity providers to filter daemons by. Only daemons associated with the specified capacity providers are returned.</p>
pub fn get_capacity_provider_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.capacity_provider_arns
}
/// <p>The maximum number of daemon results that <code>ListDaemons</code> returned in paginated output. When this parameter is used, <code>ListDaemons</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListDaemons</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListDaemons</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of daemon results that <code>ListDaemons</code> returned in paginated output. When this parameter is used, <code>ListDaemons</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListDaemons</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListDaemons</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
/// <p>The maximum number of daemon results that <code>ListDaemons</code> returned in paginated output. When this parameter is used, <code>ListDaemons</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListDaemons</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListDaemons</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
/// <p>The <code>nextToken</code> value returned from a <code>ListDaemons</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible for the number of results to be fewer than <code>maxResults</code>.</p><note>
/// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
/// </note>
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
/// <p>The <code>nextToken</code> value returned from a <code>ListDaemons</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible for the number of results to be fewer than <code>maxResults</code>.</p><note>
/// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
/// </note>
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
/// <p>The <code>nextToken</code> value returned from a <code>ListDaemons</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible for the number of results to be fewer than <code>maxResults</code>.</p><note>
/// <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p>
/// </note>
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
/// Consumes the builder and constructs a [`ListDaemonsInput`](crate::operation::list_daemons::ListDaemonsInput).
pub fn build(self) -> ::std::result::Result<crate::operation::list_daemons::ListDaemonsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_daemons::ListDaemonsInput {
cluster_arn: self.cluster_arn,
capacity_provider_arns: self.capacity_provider_arns,
max_results: self.max_results,
next_token: self.next_token,
})
}
}