aws-sdk-snowball 0.27.0

AWS SDK for Amazon Import/Export Snowball
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 ListClustersOutput {
    /// <p>Each <code>ClusterListEntry</code> object contains a cluster's state, a cluster's ID, and other important status information.</p>
    #[doc(hidden)]
    pub cluster_list_entries: std::option::Option<std::vec::Vec<crate::types::ClusterListEntry>>,
    /// <p>HTTP requests are stateless. If you use the automatically generated <code>NextToken</code> value in your next <code>ClusterListEntry</code> call, your list of returned clusters will start from this point in the array.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListClustersOutput {
    /// <p>Each <code>ClusterListEntry</code> object contains a cluster's state, a cluster's ID, and other important status information.</p>
    pub fn cluster_list_entries(&self) -> std::option::Option<&[crate::types::ClusterListEntry]> {
        self.cluster_list_entries.as_deref()
    }
    /// <p>HTTP requests are stateless. If you use the automatically generated <code>NextToken</code> value in your next <code>ClusterListEntry</code> call, your list of returned clusters will start from this point in the array.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListClustersOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListClustersOutput {
    /// Creates a new builder-style object to manufacture [`ListClustersOutput`](crate::operation::list_clusters::ListClustersOutput).
    pub fn builder() -> crate::operation::list_clusters::builders::ListClustersOutputBuilder {
        crate::operation::list_clusters::builders::ListClustersOutputBuilder::default()
    }
}

/// A builder for [`ListClustersOutput`](crate::operation::list_clusters::ListClustersOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListClustersOutputBuilder {
    pub(crate) cluster_list_entries:
        std::option::Option<std::vec::Vec<crate::types::ClusterListEntry>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListClustersOutputBuilder {
    /// Appends an item to `cluster_list_entries`.
    ///
    /// To override the contents of this collection use [`set_cluster_list_entries`](Self::set_cluster_list_entries).
    ///
    /// <p>Each <code>ClusterListEntry</code> object contains a cluster's state, a cluster's ID, and other important status information.</p>
    pub fn cluster_list_entries(mut self, input: crate::types::ClusterListEntry) -> Self {
        let mut v = self.cluster_list_entries.unwrap_or_default();
        v.push(input);
        self.cluster_list_entries = Some(v);
        self
    }
    /// <p>Each <code>ClusterListEntry</code> object contains a cluster's state, a cluster's ID, and other important status information.</p>
    pub fn set_cluster_list_entries(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ClusterListEntry>>,
    ) -> Self {
        self.cluster_list_entries = input;
        self
    }
    /// <p>HTTP requests are stateless. If you use the automatically generated <code>NextToken</code> value in your next <code>ClusterListEntry</code> call, your list of returned clusters will start from this point in the array.</p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p>HTTP requests are stateless. If you use the automatically generated <code>NextToken</code> value in your next <code>ClusterListEntry</code> call, your list of returned clusters will start from this point in the array.</p>
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ListClustersOutput`](crate::operation::list_clusters::ListClustersOutput).
    pub fn build(self) -> crate::operation::list_clusters::ListClustersOutput {
        crate::operation::list_clusters::ListClustersOutput {
            cluster_list_entries: self.cluster_list_entries,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}