// 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 SearchTablesInput {
/// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
pub catalog_id: ::std::option::Option<::std::string::String>,
/// <p>A continuation token, included if this is a continuation call.</p>
pub next_token: ::std::option::Option<::std::string::String>,
/// <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 filters: ::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>>,
/// <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 search_text: ::std::option::Option<::std::string::String>,
/// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</p>
pub sort_criteria: ::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>>,
/// <p>The maximum number of tables to return in a single response.</p>
pub max_results: ::std::option::Option<i32>,
/// <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 resource_share_type: ::std::option::Option<crate::types::ResourceShareType>,
/// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
pub include_status_details: ::std::option::Option<bool>,
}
impl SearchTablesInput {
/// <p>A unique identifier, consisting of <code> <i>account_id</i> </code>.</p>
pub fn catalog_id(&self) -> ::std::option::Option<&str> {
self.catalog_id.as_deref()
}
/// <p>A continuation token, included if this is a continuation call.</p>
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
/// <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>
///
/// 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()`.
pub fn filters(&self) -> &[crate::types::PropertyPredicate] {
self.filters.as_deref().unwrap_or_default()
}
/// <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(&self) -> ::std::option::Option<&str> {
self.search_text.as_deref()
}
/// <p>A list of criteria for sorting the results by a field name, in an ascending or descending order.</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 `.sort_criteria.is_none()`.
pub fn sort_criteria(&self) -> &[crate::types::SortCriterion] {
self.sort_criteria.as_deref().unwrap_or_default()
}
/// <p>The maximum number of tables to return in a single response.</p>
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.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(&self) -> ::std::option::Option<&crate::types::ResourceShareType> {
self.resource_share_type.as_ref()
}
/// <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(&self) -> ::std::option::Option<bool> {
self.include_status_details
}
}
impl SearchTablesInput {
/// Creates a new builder-style object to manufacture [`SearchTablesInput`](crate::operation::search_tables::SearchTablesInput).
pub fn builder() -> crate::operation::search_tables::builders::SearchTablesInputBuilder {
crate::operation::search_tables::builders::SearchTablesInputBuilder::default()
}
}
/// A builder for [`SearchTablesInput`](crate::operation::search_tables::SearchTablesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchTablesInputBuilder {
pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::PropertyPredicate>>,
pub(crate) search_text: ::std::option::Option<::std::string::String>,
pub(crate) sort_criteria: ::std::option::Option<::std::vec::Vec<crate::types::SortCriterion>>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) resource_share_type: ::std::option::Option<crate::types::ResourceShareType>,
pub(crate) include_status_details: ::std::option::Option<bool>,
}
impl SearchTablesInputBuilder {
/// <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.catalog_id = ::std::option::Option::Some(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.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.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.next_token = ::std::option::Option::Some(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.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.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 {
let mut v = self.filters.unwrap_or_default();
v.push(input);
self.filters = ::std::option::Option::Some(v);
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.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.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.search_text = ::std::option::Option::Some(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.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.search_text
}
/// Appends an item to `sort_criteria`.
///
/// 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 {
let mut v = self.sort_criteria.unwrap_or_default();
v.push(input);
self.sort_criteria = ::std::option::Option::Some(v);
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.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.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.max_results = ::std::option::Option::Some(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.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.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.resource_share_type = ::std::option::Option::Some(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.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.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.include_status_details = ::std::option::Option::Some(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.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.include_status_details
}
/// Consumes the builder and constructs a [`SearchTablesInput`](crate::operation::search_tables::SearchTablesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::search_tables::SearchTablesInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::search_tables::SearchTablesInput {
catalog_id: self.catalog_id,
next_token: self.next_token,
filters: self.filters,
search_text: self.search_text,
sort_criteria: self.sort_criteria,
max_results: self.max_results,
resource_share_type: self.resource_share_type,
include_status_details: self.include_status_details,
})
}
}