aws_sdk_glue/operation/search_tables/
_search_tables_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchTablesInput {
6    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
7    pub catalog_id: ::std::option::Option<::std::string::String>,
8    /// <p>A continuation token, included if this is a continuation call.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
11    /// <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>
12    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>>,
13    /// <p>A string used for a text search.</p>
14    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
15    pub search_text: ::std::option::Option<::std::string::String>,
16    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
17    pub sort_criteria: ::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>>,
18    /// <p>The maximum number of tables to return in a single response.</p>
19    pub max_results: ::std::option::Option<i32>,
20    /// <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>
21    /// <ul>
22    /// <li>
23    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
24    /// <li>
25    /// <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>
26    /// </ul>
27    pub resource_share_type: ::std::option::Option<crate::types::ResourceShareType>,
28    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
29    pub include_status_details: ::std::option::Option<bool>,
30}
31impl SearchTablesInput {
32    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
33    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
34        self.catalog_id.as_deref()
35    }
36    /// <p>A continuation token, included if this is a continuation call.</p>
37    pub fn next_token(&self) -> ::std::option::Option<&str> {
38        self.next_token.as_deref()
39    }
40    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
41    /// <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>
42    ///
43    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
44    pub fn filters(&self) -> &[crate::types::PropertyPredicate] {
45        self.filters.as_deref().unwrap_or_default()
46    }
47    /// <p>A string used for a text search.</p>
48    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
49    pub fn search_text(&self) -> ::std::option::Option<&str> {
50        self.search_text.as_deref()
51    }
52    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
53    ///
54    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sort_criteria.is_none()`.
55    pub fn sort_criteria(&self) -> &[crate::types::SortCriterion] {
56        self.sort_criteria.as_deref().unwrap_or_default()
57    }
58    /// <p>The maximum number of tables to return in a single response.</p>
59    pub fn max_results(&self) -> ::std::option::Option<i32> {
60        self.max_results
61    }
62    /// <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>
63    /// <ul>
64    /// <li>
65    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
66    /// <li>
67    /// <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>
68    /// </ul>
69    pub fn resource_share_type(&self) -> ::std::option::Option<&crate::types::ResourceShareType> {
70        self.resource_share_type.as_ref()
71    }
72    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
73    pub fn include_status_details(&self) -> ::std::option::Option<bool> {
74        self.include_status_details
75    }
76}
77impl SearchTablesInput {
78    /// Creates a new builder-style object to manufacture [`SearchTablesInput`](crate::operation::search_tables::SearchTablesInput).
79    pub fn builder() -> crate::operation::search_tables::builders::SearchTablesInputBuilder {
80        crate::operation::search_tables::builders::SearchTablesInputBuilder::default()
81    }
82}
83
84/// A builder for [`SearchTablesInput`](crate::operation::search_tables::SearchTablesInput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct SearchTablesInputBuilder {
88    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
89    pub(crate) next_token: ::std::option::Option<::std::string::String>,
90    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>>,
91    pub(crate) search_text: ::std::option::Option<::std::string::String>,
92    pub(crate) sort_criteria: ::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>>,
93    pub(crate) max_results: ::std::option::Option<i32>,
94    pub(crate) resource_share_type: ::std::option::Option<crate::types::ResourceShareType>,
95    pub(crate) include_status_details: ::std::option::Option<bool>,
96}
97impl SearchTablesInputBuilder {
98    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
99    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.catalog_id = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
104    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.catalog_id = input;
106        self
107    }
108    /// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
109    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
110        &self.catalog_id
111    }
112    /// <p>A continuation token, included if this is a continuation call.</p>
113    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.next_token = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>A continuation token, included if this is a continuation call.</p>
118    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.next_token = input;
120        self
121    }
122    /// <p>A continuation token, included if this is a continuation call.</p>
123    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
124        &self.next_token
125    }
126    /// Appends an item to `filters`.
127    ///
128    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
129    ///
130    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
131    /// <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>
132    pub fn filters(mut self, input: crate::types::PropertyPredicate) -> Self {
133        let mut v = self.filters.unwrap_or_default();
134        v.push(input);
135        self.filters = ::std::option::Option::Some(v);
136        self
137    }
138    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
139    /// <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>
140    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>>) -> Self {
141        self.filters = input;
142        self
143    }
144    /// <p>A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.</p>
145    /// <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>
146    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>> {
147        &self.filters
148    }
149    /// <p>A string used for a text search.</p>
150    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
151    pub fn search_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.search_text = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>A string used for a text search.</p>
156    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
157    pub fn set_search_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.search_text = input;
159        self
160    }
161    /// <p>A string used for a text search.</p>
162    /// <p>Specifying a value in quotes filters based on an exact match to the value.</p>
163    pub fn get_search_text(&self) -> &::std::option::Option<::std::string::String> {
164        &self.search_text
165    }
166    /// Appends an item to `sort_criteria`.
167    ///
168    /// To override the contents of this collection use [`set_sort_criteria`](Self::set_sort_criteria).
169    ///
170    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
171    pub fn sort_criteria(mut self, input: crate::types::SortCriterion) -> Self {
172        let mut v = self.sort_criteria.unwrap_or_default();
173        v.push(input);
174        self.sort_criteria = ::std::option::Option::Some(v);
175        self
176    }
177    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
178    pub fn set_sort_criteria(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>>) -> Self {
179        self.sort_criteria = input;
180        self
181    }
182    /// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
183    pub fn get_sort_criteria(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>> {
184        &self.sort_criteria
185    }
186    /// <p>The maximum number of tables to return in a single response.</p>
187    pub fn max_results(mut self, input: i32) -> Self {
188        self.max_results = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>The maximum number of tables to return in a single response.</p>
192    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
193        self.max_results = input;
194        self
195    }
196    /// <p>The maximum number of tables to return in a single response.</p>
197    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
198        &self.max_results
199    }
200    /// <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>
201    /// <ul>
202    /// <li>
203    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
204    /// <li>
205    /// <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>
206    /// </ul>
207    pub fn resource_share_type(mut self, input: crate::types::ResourceShareType) -> Self {
208        self.resource_share_type = ::std::option::Option::Some(input);
209        self
210    }
211    /// <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>
212    /// <ul>
213    /// <li>
214    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
215    /// <li>
216    /// <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>
217    /// </ul>
218    pub fn set_resource_share_type(mut self, input: ::std::option::Option<crate::types::ResourceShareType>) -> Self {
219        self.resource_share_type = input;
220        self
221    }
222    /// <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>
223    /// <ul>
224    /// <li>
225    /// <p>If set to <code>FOREIGN</code>, will search the tables shared with your account.</p></li>
226    /// <li>
227    /// <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>
228    /// </ul>
229    pub fn get_resource_share_type(&self) -> &::std::option::Option<crate::types::ResourceShareType> {
230        &self.resource_share_type
231    }
232    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
233    pub fn include_status_details(mut self, input: bool) -> Self {
234        self.include_status_details = ::std::option::Option::Some(input);
235        self
236    }
237    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
238    pub fn set_include_status_details(mut self, input: ::std::option::Option<bool>) -> Self {
239        self.include_status_details = input;
240        self
241    }
242    /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
243    pub fn get_include_status_details(&self) -> &::std::option::Option<bool> {
244        &self.include_status_details
245    }
246    /// Consumes the builder and constructs a [`SearchTablesInput`](crate::operation::search_tables::SearchTablesInput).
247    pub fn build(
248        self,
249    ) -> ::std::result::Result<crate::operation::search_tables::SearchTablesInput, ::aws_smithy_types::error::operation::BuildError> {
250        ::std::result::Result::Ok(crate::operation::search_tables::SearchTablesInput {
251            catalog_id: self.catalog_id,
252            next_token: self.next_token,
253            filters: self.filters,
254            search_text: self.search_text,
255            sort_criteria: self.sort_criteria,
256            max_results: self.max_results,
257            resource_share_type: self.resource_share_type,
258            include_status_details: self.include_status_details,
259        })
260    }
261}