// 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 ListStoredQueriesOutput {
    /// <p>A list of <code>StoredQueryMetadata</code> objects.</p>
    pub stored_query_metadata: ::std::option::Option<::std::vec::Vec<crate::types::StoredQueryMetadata>>,
    /// <p>If the previous paginated request didn't return all of the remaining results, the response object's <code>NextToken</code> parameter value is set to a token. To retrieve the next set of results, call this operation again and assign that token to the request object's <code>NextToken</code> parameter. If there are no remaining results, the previous response object's <code>NextToken</code> parameter is set to <code>null</code>.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListStoredQueriesOutput {
    /// <p>A list of <code>StoredQueryMetadata</code> objects.</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 `.stored_query_metadata.is_none()`.
    pub fn stored_query_metadata(&self) -> &[crate::types::StoredQueryMetadata] {
        self.stored_query_metadata.as_deref().unwrap_or_default()
    }
    /// <p>If the previous paginated request didn't return all of the remaining results, the response object's <code>NextToken</code> parameter value is set to a token. To retrieve the next set of results, call this operation again and assign that token to the request object's <code>NextToken</code> parameter. If there are no remaining results, the previous response object's <code>NextToken</code> parameter is set to <code>null</code>.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ListStoredQueriesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListStoredQueriesOutput {
    /// Creates a new builder-style object to manufacture [`ListStoredQueriesOutput`](crate::operation::list_stored_queries::ListStoredQueriesOutput).
    pub fn builder() -> crate::operation::list_stored_queries::builders::ListStoredQueriesOutputBuilder {
        crate::operation::list_stored_queries::builders::ListStoredQueriesOutputBuilder::default()
    }
}

/// A builder for [`ListStoredQueriesOutput`](crate::operation::list_stored_queries::ListStoredQueriesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListStoredQueriesOutputBuilder {
    pub(crate) stored_query_metadata: ::std::option::Option<::std::vec::Vec<crate::types::StoredQueryMetadata>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListStoredQueriesOutputBuilder {
    /// Appends an item to `stored_query_metadata`.
    ///
    /// To override the contents of this collection use [`set_stored_query_metadata`](Self::set_stored_query_metadata).
    ///
    /// <p>A list of <code>StoredQueryMetadata</code> objects.</p>
    pub fn stored_query_metadata(mut self, input: crate::types::StoredQueryMetadata) -> Self {
        let mut v = self.stored_query_metadata.unwrap_or_default();
        v.push(input);
        self.stored_query_metadata = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of <code>StoredQueryMetadata</code> objects.</p>
    pub fn set_stored_query_metadata(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StoredQueryMetadata>>) -> Self {
        self.stored_query_metadata = input;
        self
    }
    /// <p>A list of <code>StoredQueryMetadata</code> objects.</p>
    pub fn get_stored_query_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StoredQueryMetadata>> {
        &self.stored_query_metadata
    }
    /// <p>If the previous paginated request didn't return all of the remaining results, the response object's <code>NextToken</code> parameter value is set to a token. To retrieve the next set of results, call this operation again and assign that token to the request object's <code>NextToken</code> parameter. If there are no remaining results, the previous response object's <code>NextToken</code> parameter is set to <code>null</code>.</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 the previous paginated request didn't return all of the remaining results, the response object's <code>NextToken</code> parameter value is set to a token. To retrieve the next set of results, call this operation again and assign that token to the request object's <code>NextToken</code> parameter. If there are no remaining results, the previous response object's <code>NextToken</code> parameter is set to <code>null</code>.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If the previous paginated request didn't return all of the remaining results, the response object's <code>NextToken</code> parameter value is set to a token. To retrieve the next set of results, call this operation again and assign that token to the request object's <code>NextToken</code> parameter. If there are no remaining results, the previous response object's <code>NextToken</code> parameter is set to <code>null</code>.</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 [`ListStoredQueriesOutput`](crate::operation::list_stored_queries::ListStoredQueriesOutput).
    pub fn build(self) -> crate::operation::list_stored_queries::ListStoredQueriesOutput {
        crate::operation::list_stored_queries::ListStoredQueriesOutput {
            stored_query_metadata: self.stored_query_metadata,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}
