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.
pub use crate::operation::search_data_tables::_search_data_tables_input::SearchDataTablesInputBuilder;

pub use crate::operation::search_data_tables::_search_data_tables_output::SearchDataTablesOutputBuilder;

impl crate::operation::search_data_tables::builders::SearchDataTablesInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::search_data_tables::SearchDataTablesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_data_tables::SearchDataTablesError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.search_data_tables();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `SearchDataTables`.
///
/// <p>Searches for data tables based on the table's ID, name, and description. In the future, this operation can support searching on attribute names and possibly primary values. Follows other search operations closely and supports both search criteria and filters.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct SearchDataTablesFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::search_data_tables::builders::SearchDataTablesInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::search_data_tables::SearchDataTablesOutput,
        crate::operation::search_data_tables::SearchDataTablesError,
    > for SearchDataTablesFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::search_data_tables::SearchDataTablesOutput,
            crate::operation::search_data_tables::SearchDataTablesError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl SearchDataTablesFluentBuilder {
    /// Creates a new `SearchDataTablesFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the SearchDataTables as a reference.
    pub fn as_input(&self) -> &crate::operation::search_data_tables::builders::SearchDataTablesInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::search_data_tables::SearchDataTablesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_data_tables::SearchDataTablesError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::search_data_tables::SearchDataTables::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::search_data_tables::SearchDataTables::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::search_data_tables::SearchDataTablesOutput,
        crate::operation::search_data_tables::SearchDataTablesError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::search_data_tables::paginator::SearchDataTablesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::search_data_tables::paginator::SearchDataTablesPaginator {
        crate::operation::search_data_tables::paginator::SearchDataTablesPaginator::new(self.handle, self.inner)
    }
    /// <p>The unique identifier for the Amazon Connect instance to search within.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.instance_id(input.into());
        self
    }
    /// <p>The unique identifier for the Amazon Connect instance to search within.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_instance_id(input);
        self
    }
    /// <p>The unique identifier for the Amazon Connect instance to search within.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_instance_id()
    }
    /// <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.inner = self.inner.next_token(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.inner = self.inner.set_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.inner.get_next_token()
    }
    /// <p>The maximum number of data tables to return in one page of results.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.inner = self.inner.max_results(input);
        self
    }
    /// <p>The maximum number of data tables to return in one page of results.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_results(input);
        self
    }
    /// <p>The maximum number of data tables to return in one page of results.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_results()
    }
    /// <p>Optional filters to apply to the search results, such as tag-based filtering for attribute-based access control.</p>
    pub fn search_filter(mut self, input: crate::types::DataTableSearchFilter) -> Self {
        self.inner = self.inner.search_filter(input);
        self
    }
    /// <p>Optional filters to apply to the search results, such as tag-based filtering for attribute-based access control.</p>
    pub fn set_search_filter(mut self, input: ::std::option::Option<crate::types::DataTableSearchFilter>) -> Self {
        self.inner = self.inner.set_search_filter(input);
        self
    }
    /// <p>Optional filters to apply to the search results, such as tag-based filtering for attribute-based access control.</p>
    pub fn get_search_filter(&self) -> &::std::option::Option<crate::types::DataTableSearchFilter> {
        self.inner.get_search_filter()
    }
    /// <p>Search criteria including string conditions for matching table names, descriptions, or resource IDs. Supports STARTS_WITH, CONTAINS, and EXACT comparison types.</p>
    pub fn search_criteria(mut self, input: crate::types::DataTableSearchCriteria) -> Self {
        self.inner = self.inner.search_criteria(input);
        self
    }
    /// <p>Search criteria including string conditions for matching table names, descriptions, or resource IDs. Supports STARTS_WITH, CONTAINS, and EXACT comparison types.</p>
    pub fn set_search_criteria(mut self, input: ::std::option::Option<crate::types::DataTableSearchCriteria>) -> Self {
        self.inner = self.inner.set_search_criteria(input);
        self
    }
    /// <p>Search criteria including string conditions for matching table names, descriptions, or resource IDs. Supports STARTS_WITH, CONTAINS, and EXACT comparison types.</p>
    pub fn get_search_criteria(&self) -> &::std::option::Option<crate::types::DataTableSearchCriteria> {
        self.inner.get_search_criteria()
    }
}