aws_sdk_glue/operation/search_tables/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::search_tables::_search_tables_output::SearchTablesOutputBuilder;
3
4pub use crate::operation::search_tables::_search_tables_input::SearchTablesInputBuilder;
5
6impl crate::operation::search_tables::builders::SearchTablesInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::search_tables::SearchTablesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::search_tables::SearchTablesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.search_tables();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `SearchTables`.
24///
25/// <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>
26/// <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>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct SearchTablesFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::search_tables::builders::SearchTablesInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::search_tables::SearchTablesOutput,
36 crate::operation::search_tables::SearchTablesError,
37 > for SearchTablesFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::search_tables::SearchTablesOutput,
45 crate::operation::search_tables::SearchTablesError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl SearchTablesFluentBuilder {
52 /// Creates a new `SearchTablesFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the SearchTables as a reference.
61 pub fn as_input(&self) -> &crate::operation::search_tables::builders::SearchTablesInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::search_tables::SearchTablesOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::search_tables::SearchTablesError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::search_tables::SearchTables::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::search_tables::SearchTables::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::search_tables::SearchTablesOutput,
98 crate::operation::search_tables::SearchTablesError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// Create a paginator for this request
113 ///
114 /// 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).
115 pub fn into_paginator(self) -> crate::operation::search_tables::paginator::SearchTablesPaginator {
116 crate::operation::search_tables::paginator::SearchTablesPaginator::new(self.handle, self.inner)
117 }
118 /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
119 pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.inner = self.inner.catalog_id(input.into());
121 self
122 }
123 /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
124 pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.inner = self.inner.set_catalog_id(input);
126 self
127 }
128 /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
129 pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
130 self.inner.get_catalog_id()
131 }
132 /// <p>A continuation token, included if this is a continuation call.</p>
133 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.next_token(input.into());
135 self
136 }
137 /// <p>A continuation token, included if this is a continuation call.</p>
138 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.inner = self.inner.set_next_token(input);
140 self
141 }
142 /// <p>A continuation token, included if this is a continuation call.</p>
143 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
144 self.inner.get_next_token()
145 }
146 ///
147 /// Appends an item to `Filters`.
148 ///
149 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
150 ///
151 /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
152 /// <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>
153 pub fn filters(mut self, input: crate::types::PropertyPredicate) -> Self {
154 self.inner = self.inner.filters(input);
155 self
156 }
157 /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
158 /// <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>
159 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>>) -> Self {
160 self.inner = self.inner.set_filters(input);
161 self
162 }
163 /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
164 /// <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>
165 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>> {
166 self.inner.get_filters()
167 }
168 /// <p>A string used for a text search.</p>
169 /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
170 pub fn search_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171 self.inner = self.inner.search_text(input.into());
172 self
173 }
174 /// <p>A string used for a text search.</p>
175 /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
176 pub fn set_search_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.inner = self.inner.set_search_text(input);
178 self
179 }
180 /// <p>A string used for a text search.</p>
181 /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
182 pub fn get_search_text(&self) -> &::std::option::Option<::std::string::String> {
183 self.inner.get_search_text()
184 }
185 ///
186 /// Appends an item to `SortCriteria`.
187 ///
188 /// To override the contents of this collection use [`set_sort_criteria`](Self::set_sort_criteria).
189 ///
190 /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
191 pub fn sort_criteria(mut self, input: crate::types::SortCriterion) -> Self {
192 self.inner = self.inner.sort_criteria(input);
193 self
194 }
195 /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
196 pub fn set_sort_criteria(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>>) -> Self {
197 self.inner = self.inner.set_sort_criteria(input);
198 self
199 }
200 /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
201 pub fn get_sort_criteria(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>> {
202 self.inner.get_sort_criteria()
203 }
204 /// <p>The maximum number of tables to return in a single response.</p>
205 pub fn max_results(mut self, input: i32) -> Self {
206 self.inner = self.inner.max_results(input);
207 self
208 }
209 /// <p>The maximum number of tables to return in a single response.</p>
210 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
211 self.inner = self.inner.set_max_results(input);
212 self
213 }
214 /// <p>The maximum number of tables to return in a single response.</p>
215 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
216 self.inner.get_max_results()
217 }
218 /// <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>
219 /// <ul>
220 /// <li>
221 /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
222 /// <li>
223 /// <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>
224 /// </ul>
225 pub fn resource_share_type(mut self, input: crate::types::ResourceShareType) -> Self {
226 self.inner = self.inner.resource_share_type(input);
227 self
228 }
229 /// <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>
230 /// <ul>
231 /// <li>
232 /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
233 /// <li>
234 /// <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>
235 /// </ul>
236 pub fn set_resource_share_type(mut self, input: ::std::option::Option<crate::types::ResourceShareType>) -> Self {
237 self.inner = self.inner.set_resource_share_type(input);
238 self
239 }
240 /// <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>
241 /// <ul>
242 /// <li>
243 /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
244 /// <li>
245 /// <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>
246 /// </ul>
247 pub fn get_resource_share_type(&self) -> &::std::option::Option<crate::types::ResourceShareType> {
248 self.inner.get_resource_share_type()
249 }
250 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
251 pub fn include_status_details(mut self, input: bool) -> Self {
252 self.inner = self.inner.include_status_details(input);
253 self
254 }
255 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
256 pub fn set_include_status_details(mut self, input: ::std::option::Option<bool>) -> Self {
257 self.inner = self.inner.set_include_status_details(input);
258 self
259 }
260 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
261 pub fn get_include_status_details(&self) -> &::std::option::Option<bool> {
262 self.inner.get_include_status_details()
263 }
264}