aws-sdk-glue 1.163.0

AWS SDK for AWS Glue
Documentation
// 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 SearchAssetsInput {
    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
    pub search_text: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of results to return in the response.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>A continuation token, if this is a continuation call.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The sort criteria for the search results.</p>
    pub sort: ::std::option::Option<crate::types::SearchSort>,
    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
    pub filter_clause: ::std::option::Option<crate::types::SearchFilterClause>,
}
impl SearchAssetsInput {
    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
    pub fn search_text(&self) -> ::std::option::Option<&str> {
        self.search_text.as_deref()
    }
    /// <p>The maximum number of results to return in the response.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>A continuation token, if this is a continuation call.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The sort criteria for the search results.</p>
    pub fn sort(&self) -> ::std::option::Option<&crate::types::SearchSort> {
        self.sort.as_ref()
    }
    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
    pub fn filter_clause(&self) -> ::std::option::Option<&crate::types::SearchFilterClause> {
        self.filter_clause.as_ref()
    }
}
impl SearchAssetsInput {
    /// Creates a new builder-style object to manufacture [`SearchAssetsInput`](crate::operation::search_assets::SearchAssetsInput).
    pub fn builder() -> crate::operation::search_assets::builders::SearchAssetsInputBuilder {
        crate::operation::search_assets::builders::SearchAssetsInputBuilder::default()
    }
}

/// A builder for [`SearchAssetsInput`](crate::operation::search_assets::SearchAssetsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchAssetsInputBuilder {
    pub(crate) search_text: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) sort: ::std::option::Option<crate::types::SearchSort>,
    pub(crate) filter_clause: ::std::option::Option<crate::types::SearchFilterClause>,
}
impl SearchAssetsInputBuilder {
    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</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>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
    pub fn set_search_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.search_text = input;
        self
    }
    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
    pub fn get_search_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.search_text
    }
    /// <p>The maximum number of results to return in the 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 results to return in the 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 results to return in the response.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>A continuation token, 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, 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, if this is a continuation call.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The sort criteria for the search results.</p>
    pub fn sort(mut self, input: crate::types::SearchSort) -> Self {
        self.sort = ::std::option::Option::Some(input);
        self
    }
    /// <p>The sort criteria for the search results.</p>
    pub fn set_sort(mut self, input: ::std::option::Option<crate::types::SearchSort>) -> Self {
        self.sort = input;
        self
    }
    /// <p>The sort criteria for the search results.</p>
    pub fn get_sort(&self) -> &::std::option::Option<crate::types::SearchSort> {
        &self.sort
    }
    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
    pub fn filter_clause(mut self, input: crate::types::SearchFilterClause) -> Self {
        self.filter_clause = ::std::option::Option::Some(input);
        self
    }
    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
    pub fn set_filter_clause(mut self, input: ::std::option::Option<crate::types::SearchFilterClause>) -> Self {
        self.filter_clause = input;
        self
    }
    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
    pub fn get_filter_clause(&self) -> &::std::option::Option<crate::types::SearchFilterClause> {
        &self.filter_clause
    }
    /// Consumes the builder and constructs a [`SearchAssetsInput`](crate::operation::search_assets::SearchAssetsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::search_assets::SearchAssetsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::search_assets::SearchAssetsInput {
            search_text: self.search_text,
            max_results: self.max_results,
            next_token: self.next_token,
            sort: self.sort,
            filter_clause: self.filter_clause,
        })
    }
}