aws-sdk-kafka 1.126.0

AWS SDK for Managed Streaming for Kafka
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 ListClustersInput {
    /// <p>Specify a prefix of the name of the clusters that you want to list. The service lists all the clusters whose names start with this prefix.</p>
    pub cluster_name_filter: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListClustersInput {
    /// <p>Specify a prefix of the name of the clusters that you want to list. The service lists all the clusters whose names start with this prefix.</p>
    pub fn cluster_name_filter(&self) -> ::std::option::Option<&str> {
        self.cluster_name_filter.as_deref()
    }
    /// <p>The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListClustersInput {
    /// Creates a new builder-style object to manufacture [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
    pub fn builder() -> crate::operation::list_clusters::builders::ListClustersInputBuilder {
        crate::operation::list_clusters::builders::ListClustersInputBuilder::default()
    }
}

/// A builder for [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListClustersInputBuilder {
    pub(crate) cluster_name_filter: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListClustersInputBuilder {
    /// <p>Specify a prefix of the name of the clusters that you want to list. The service lists all the clusters whose names start with this prefix.</p>
    pub fn cluster_name_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_name_filter = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specify a prefix of the name of the clusters that you want to list. The service lists all the clusters whose names start with this prefix.</p>
    pub fn set_cluster_name_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_name_filter = input;
        self
    }
    /// <p>Specify a prefix of the name of the clusters that you want to list. The service lists all the clusters whose names start with this prefix.</p>
    pub fn get_cluster_name_filter(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_name_filter
    }
    /// <p>The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.</p>
    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 paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The paginated results marker. When the result of the operation is truncated, the call returns NextToken in the response. To get the next batch, provide this token in your next request.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_clusters::ListClustersInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_clusters::ListClustersInput {
            cluster_name_filter: self.cluster_name_filter,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}