aws-sdk-pcs 1.70.1

AWS SDK for AWS Parallel Computing 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 ListQueuesOutput {
    /// <p>The list of queues associated with the cluster.</p>
    pub queues: ::std::vec::Vec<crate::types::QueueSummary>,
    /// <p>The value of <code>nextToken</code> is a unique pagination token for each page of results returned. If <code>nextToken</code> is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns an <code>HTTP 400 InvalidToken</code> error.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListQueuesOutput {
    /// <p>The list of queues associated with the cluster.</p>
    pub fn queues(&self) -> &[crate::types::QueueSummary] {
        use std::ops::Deref;
        self.queues.deref()
    }
    /// <p>The value of <code>nextToken</code> is a unique pagination token for each page of results returned. If <code>nextToken</code> is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns an <code>HTTP 400 InvalidToken</code> error.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ListQueuesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListQueuesOutput {
    /// Creates a new builder-style object to manufacture [`ListQueuesOutput`](crate::operation::list_queues::ListQueuesOutput).
    pub fn builder() -> crate::operation::list_queues::builders::ListQueuesOutputBuilder {
        crate::operation::list_queues::builders::ListQueuesOutputBuilder::default()
    }
}

/// A builder for [`ListQueuesOutput`](crate::operation::list_queues::ListQueuesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListQueuesOutputBuilder {
    pub(crate) queues: ::std::option::Option<::std::vec::Vec<crate::types::QueueSummary>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListQueuesOutputBuilder {
    /// Appends an item to `queues`.
    ///
    /// To override the contents of this collection use [`set_queues`](Self::set_queues).
    ///
    /// <p>The list of queues associated with the cluster.</p>
    pub fn queues(mut self, input: crate::types::QueueSummary) -> Self {
        let mut v = self.queues.unwrap_or_default();
        v.push(input);
        self.queues = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of queues associated with the cluster.</p>
    pub fn set_queues(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QueueSummary>>) -> Self {
        self.queues = input;
        self
    }
    /// <p>The list of queues associated with the cluster.</p>
    pub fn get_queues(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QueueSummary>> {
        &self.queues
    }
    /// <p>The value of <code>nextToken</code> is a unique pagination token for each page of results returned. If <code>nextToken</code> is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns an <code>HTTP 400 InvalidToken</code> error.</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 value of <code>nextToken</code> is a unique pagination token for each page of results returned. If <code>nextToken</code> is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns an <code>HTTP 400 InvalidToken</code> error.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The value of <code>nextToken</code> is a unique pagination token for each page of results returned. If <code>nextToken</code> is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token returns an <code>HTTP 400 InvalidToken</code> error.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    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 [`ListQueuesOutput`](crate::operation::list_queues::ListQueuesOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`queues`](crate::operation::list_queues::builders::ListQueuesOutputBuilder::queues)
    pub fn build(self) -> ::std::result::Result<crate::operation::list_queues::ListQueuesOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_queues::ListQueuesOutput {
            queues: self.queues.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "queues",
                    "queues was not specified but it is required when building ListQueuesOutput",
                )
            })?,
            next_token: self.next_token,
            _request_id: self._request_id,
        })
    }
}