aws-sdk-glue 1.149.0

AWS SDK for AWS Glue
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::search_tables::_search_tables_input::SearchTablesInputBuilder;

pub use crate::operation::search_tables::_search_tables_output::SearchTablesOutputBuilder;

impl crate::operation::search_tables::builders::SearchTablesInputBuilder {
    /// 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_tables::SearchTablesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_tables::SearchTablesError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.search_tables();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `SearchTables`.
///
/// <p>Searches a set of tables based on properties in the table metadata as well as on the parent database. You can search against text or filter conditions.</p>
/// <p>You can only get tables that you have access to based on the security policies defined in Lake Formation. You need at least a read-only access to the table for it to be returned. If you do not have access to all the columns in the table, these columns will not be searched against when returning the list of tables back to you. If you have access to the columns but not the data in the columns, those columns and the associated metadata for those columns will be included in the search.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct SearchTablesFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::search_tables::builders::SearchTablesInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::search_tables::SearchTablesOutput,
        crate::operation::search_tables::SearchTablesError,
    > for SearchTablesFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::search_tables::SearchTablesOutput,
            crate::operation::search_tables::SearchTablesError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl SearchTablesFluentBuilder {
    /// Creates a new `SearchTablesFluentBuilder`.
    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 SearchTables as a reference.
    pub fn as_input(&self) -> &crate::operation::search_tables::builders::SearchTablesInputBuilder {
        &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_tables::SearchTablesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_tables::SearchTablesError,
            ::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_tables::SearchTables::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::search_tables::SearchTables::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_tables::SearchTablesOutput,
        crate::operation::search_tables::SearchTablesError,
        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_tables::paginator::SearchTablesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::search_tables::paginator::SearchTablesPaginator {
        crate::operation::search_tables::paginator::SearchTablesPaginator::new(self.handle, self.inner)
    }
    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.catalog_id(input.into());
        self
    }
    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_catalog_id(input);
        self
    }
    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_catalog_id()
    }
    /// <p>A continuation token, included if this is a continuation call.</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>A continuation token, included if this is a continuation call.</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>A continuation token, included if this is a continuation call.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_next_token()
    }
    ///
    /// Appends an item to `Filters`.
    ///
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
    ///
    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
    /// <p>The <code>Comparator</code> member of the <code>PropertyPredicate</code> struct is used only for time fields, and can be omitted for other field types. Also, when comparing string values, such as when <code>Key=Name</code>, a fuzzy match algorithm is used. The <code>Key</code> field (for example, the value of the <code>Name</code> field) is split on certain punctuation characters, for example, -, :, #, etc. into tokens. Then each token is exact-match compared with the <code>Value</code> member of <code>PropertyPredicate</code>. For example, if <code>Key=Name</code> and <code>Value=link</code>, tables named <code>customer-link</code> and <code>xx-link-yy</code> are returned, but <code>xxlinkyy</code> is not returned.</p>
    pub fn filters(mut self, input: crate::types::PropertyPredicate) -> Self {
        self.inner = self.inner.filters(input);
        self
    }
    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
    /// <p>The <code>Comparator</code> member of the <code>PropertyPredicate</code> struct is used only for time fields, and can be omitted for other field types. Also, when comparing string values, such as when <code>Key=Name</code>, a fuzzy match algorithm is used. The <code>Key</code> field (for example, the value of the <code>Name</code> field) is split on certain punctuation characters, for example, -, :, #, etc. into tokens. Then each token is exact-match compared with the <code>Value</code> member of <code>PropertyPredicate</code>. For example, if <code>Key=Name</code> and <code>Value=link</code>, tables named <code>customer-link</code> and <code>xx-link-yy</code> are returned, but <code>xxlinkyy</code> is not returned.</p>
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>>) -> Self {
        self.inner = self.inner.set_filters(input);
        self
    }
    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
    /// <p>The <code>Comparator</code> member of the <code>PropertyPredicate</code> struct is used only for time fields, and can be omitted for other field types. Also, when comparing string values, such as when <code>Key=Name</code>, a fuzzy match algorithm is used. The <code>Key</code> field (for example, the value of the <code>Name</code> field) is split on certain punctuation characters, for example, -, :, #, etc. into tokens. Then each token is exact-match compared with the <code>Value</code> member of <code>PropertyPredicate</code>. For example, if <code>Key=Name</code> and <code>Value=link</code>, tables named <code>customer-link</code> and <code>xx-link-yy</code> are returned, but <code>xxlinkyy</code> is not returned.</p>
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>> {
        self.inner.get_filters()
    }
    /// <p>A string used for a text search.</p>
    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
    pub fn search_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.search_text(input.into());
        self
    }
    /// <p>A string used for a text search.</p>
    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
    pub fn set_search_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_search_text(input);
        self
    }
    /// <p>A string used for a text search.</p>
    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
    pub fn get_search_text(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_search_text()
    }
    ///
    /// Appends an item to `SortCriteria`.
    ///
    /// To override the contents of this collection use [`set_sort_criteria`](Self::set_sort_criteria).
    ///
    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
    pub fn sort_criteria(mut self, input: crate::types::SortCriterion) -> Self {
        self.inner = self.inner.sort_criteria(input);
        self
    }
    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
    pub fn set_sort_criteria(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>>) -> Self {
        self.inner = self.inner.set_sort_criteria(input);
        self
    }
    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
    pub fn get_sort_criteria(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>> {
        self.inner.get_sort_criteria()
    }
    /// <p>The maximum number of tables to return in a single response.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.inner = self.inner.max_results(input);
        self
    }
    /// <p>The maximum number of tables to return in a single response.</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 tables to return in a single response.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_results()
    }
    /// <p>Allows you to specify that you want to search the tables shared with your account. The allowable values are <code>FOREIGN</code> or <code>ALL</code>.</p>
    /// <ul>
    /// <li>
    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
    /// <li>
    /// <p>If set to <code>ALL</code>, will search the tables shared with your account, as well as the tables in yor local account.</p></li>
    /// </ul>
    pub fn resource_share_type(mut self, input: crate::types::ResourceShareType) -> Self {
        self.inner = self.inner.resource_share_type(input);
        self
    }
    /// <p>Allows you to specify that you want to search the tables shared with your account. The allowable values are <code>FOREIGN</code> or <code>ALL</code>.</p>
    /// <ul>
    /// <li>
    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
    /// <li>
    /// <p>If set to <code>ALL</code>, will search the tables shared with your account, as well as the tables in yor local account.</p></li>
    /// </ul>
    pub fn set_resource_share_type(mut self, input: ::std::option::Option<crate::types::ResourceShareType>) -> Self {
        self.inner = self.inner.set_resource_share_type(input);
        self
    }
    /// <p>Allows you to specify that you want to search the tables shared with your account. The allowable values are <code>FOREIGN</code> or <code>ALL</code>.</p>
    /// <ul>
    /// <li>
    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
    /// <li>
    /// <p>If set to <code>ALL</code>, will search the tables shared with your account, as well as the tables in yor local account.</p></li>
    /// </ul>
    pub fn get_resource_share_type(&self) -> &::std::option::Option<crate::types::ResourceShareType> {
        self.inner.get_resource_share_type()
    }
    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
    pub fn include_status_details(mut self, input: bool) -> Self {
        self.inner = self.inner.include_status_details(input);
        self
    }
    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
    pub fn set_include_status_details(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_include_status_details(input);
        self
    }
    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
    pub fn get_include_status_details(&self) -> &::std::option::Option<bool> {
        self.inner.get_include_status_details()
    }
}