aws-sdk-deadline 1.20.0

AWS SDK for AWSDeadlineCloud
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 queues on the list.</p>
    pub queues: ::std::vec::Vec<crate::types::QueueSummary>,
    /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListQueuesOutput {
    /// <p>The queues on the list.</p>
    pub fn queues(&self) -> &[crate::types::QueueSummary] {
        use std::ops::Deref;
        self.queues.deref()
    }
    /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</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 queues on the list.</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 queues on the list.</p>
    pub fn set_queues(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QueueSummary>>) -> Self {
        self.queues = input;
        self
    }
    /// <p>The queues on the list.</p>
    pub fn get_queues(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QueueSummary>> {
        &self.queues
    }
    /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</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>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</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,
        })
    }
}