aws-sdk-connect 1.172.0

AWS SDK for Amazon Connect 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 SearchDataTablesOutput {
    /// <p>An array of data tables matching the search criteria with the same structure as DescribeTable except Version, VersionDescription, and LockVersion are omitted.</p>
    pub data_tables: ::std::option::Option<::std::vec::Vec<crate::types::DataTable>>,
    /// <p>Specify the pagination token from a previous request to retrieve the next page of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The approximate number of data tables that matched the search criteria.</p>
    pub approximate_total_count: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl SearchDataTablesOutput {
    /// <p>An array of data tables matching the search criteria with the same structure as DescribeTable except Version, VersionDescription, and LockVersion are omitted.</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 `.data_tables.is_none()`.
    pub fn data_tables(&self) -> &[crate::types::DataTable] {
        self.data_tables.as_deref().unwrap_or_default()
    }
    /// <p>Specify the pagination token from a previous request to retrieve the next page of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The approximate number of data tables that matched the search criteria.</p>
    pub fn approximate_total_count(&self) -> ::std::option::Option<i64> {
        self.approximate_total_count
    }
}
impl ::aws_types::request_id::RequestId for SearchDataTablesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl SearchDataTablesOutput {
    /// Creates a new builder-style object to manufacture [`SearchDataTablesOutput`](crate::operation::search_data_tables::SearchDataTablesOutput).
    pub fn builder() -> crate::operation::search_data_tables::builders::SearchDataTablesOutputBuilder {
        crate::operation::search_data_tables::builders::SearchDataTablesOutputBuilder::default()
    }
}

/// A builder for [`SearchDataTablesOutput`](crate::operation::search_data_tables::SearchDataTablesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchDataTablesOutputBuilder {
    pub(crate) data_tables: ::std::option::Option<::std::vec::Vec<crate::types::DataTable>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) approximate_total_count: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl SearchDataTablesOutputBuilder {
    /// Appends an item to `data_tables`.
    ///
    /// To override the contents of this collection use [`set_data_tables`](Self::set_data_tables).
    ///
    /// <p>An array of data tables matching the search criteria with the same structure as DescribeTable except Version, VersionDescription, and LockVersion are omitted.</p>
    pub fn data_tables(mut self, input: crate::types::DataTable) -> Self {
        let mut v = self.data_tables.unwrap_or_default();
        v.push(input);
        self.data_tables = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of data tables matching the search criteria with the same structure as DescribeTable except Version, VersionDescription, and LockVersion are omitted.</p>
    pub fn set_data_tables(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataTable>>) -> Self {
        self.data_tables = input;
        self
    }
    /// <p>An array of data tables matching the search criteria with the same structure as DescribeTable except Version, VersionDescription, and LockVersion are omitted.</p>
    pub fn get_data_tables(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataTable>> {
        &self.data_tables
    }
    /// <p>Specify the pagination token from a previous request to retrieve the next page of results.</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>Specify the pagination token from a previous request to retrieve the next page of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>Specify the pagination token from a previous request to retrieve the next page of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The approximate number of data tables that matched the search criteria.</p>
    pub fn approximate_total_count(mut self, input: i64) -> Self {
        self.approximate_total_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The approximate number of data tables that matched the search criteria.</p>
    pub fn set_approximate_total_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.approximate_total_count = input;
        self
    }
    /// <p>The approximate number of data tables that matched the search criteria.</p>
    pub fn get_approximate_total_count(&self) -> &::std::option::Option<i64> {
        &self.approximate_total_count
    }
    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 [`SearchDataTablesOutput`](crate::operation::search_data_tables::SearchDataTablesOutput).
    pub fn build(self) -> crate::operation::search_data_tables::SearchDataTablesOutput {
        crate::operation::search_data_tables::SearchDataTablesOutput {
            data_tables: self.data_tables,
            next_token: self.next_token,
            approximate_total_count: self.approximate_total_count,
            _request_id: self._request_id,
        }
    }
}