Skip to main content

aws_sdk_glue/operation/search_assets/
_search_assets_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 SearchAssetsInput {
6    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
7    pub search_text: ::std::option::Option<::std::string::String>,
8    /// <p>The maximum number of results to return in the response.</p>
9    pub max_results: ::std::option::Option<i32>,
10    /// <p>A continuation token, if this is a continuation call.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The sort criteria for the search results.</p>
13    pub sort: ::std::option::Option<crate::types::SearchSort>,
14    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
15    pub filter_clause: ::std::option::Option<crate::types::SearchFilterClause>,
16}
17impl SearchAssetsInput {
18    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
19    pub fn search_text(&self) -> ::std::option::Option<&str> {
20        self.search_text.as_deref()
21    }
22    /// <p>The maximum number of results to return in the response.</p>
23    pub fn max_results(&self) -> ::std::option::Option<i32> {
24        self.max_results
25    }
26    /// <p>A continuation token, if this is a continuation call.</p>
27    pub fn next_token(&self) -> ::std::option::Option<&str> {
28        self.next_token.as_deref()
29    }
30    /// <p>The sort criteria for the search results.</p>
31    pub fn sort(&self) -> ::std::option::Option<&crate::types::SearchSort> {
32        self.sort.as_ref()
33    }
34    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
35    pub fn filter_clause(&self) -> ::std::option::Option<&crate::types::SearchFilterClause> {
36        self.filter_clause.as_ref()
37    }
38}
39impl SearchAssetsInput {
40    /// Creates a new builder-style object to manufacture [`SearchAssetsInput`](crate::operation::search_assets::SearchAssetsInput).
41    pub fn builder() -> crate::operation::search_assets::builders::SearchAssetsInputBuilder {
42        crate::operation::search_assets::builders::SearchAssetsInputBuilder::default()
43    }
44}
45
46/// A builder for [`SearchAssetsInput`](crate::operation::search_assets::SearchAssetsInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct SearchAssetsInputBuilder {
50    pub(crate) search_text: ::std::option::Option<::std::string::String>,
51    pub(crate) max_results: ::std::option::Option<i32>,
52    pub(crate) next_token: ::std::option::Option<::std::string::String>,
53    pub(crate) sort: ::std::option::Option<crate::types::SearchSort>,
54    pub(crate) filter_clause: ::std::option::Option<crate::types::SearchFilterClause>,
55}
56impl SearchAssetsInputBuilder {
57    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
58    pub fn search_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.search_text = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
63    pub fn set_search_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.search_text = input;
65        self
66    }
67    /// <p>The text to search for. At least one of <code>searchText</code> or <code>filterClause</code> must be provided.</p>
68    pub fn get_search_text(&self) -> &::std::option::Option<::std::string::String> {
69        &self.search_text
70    }
71    /// <p>The maximum number of results to return in the response.</p>
72    pub fn max_results(mut self, input: i32) -> Self {
73        self.max_results = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>The maximum number of results to return in the response.</p>
77    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
78        self.max_results = input;
79        self
80    }
81    /// <p>The maximum number of results to return in the response.</p>
82    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
83        &self.max_results
84    }
85    /// <p>A continuation token, if this is a continuation call.</p>
86    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.next_token = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>A continuation token, if this is a continuation call.</p>
91    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.next_token = input;
93        self
94    }
95    /// <p>A continuation token, if this is a continuation call.</p>
96    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
97        &self.next_token
98    }
99    /// <p>The sort criteria for the search results.</p>
100    pub fn sort(mut self, input: crate::types::SearchSort) -> Self {
101        self.sort = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The sort criteria for the search results.</p>
105    pub fn set_sort(mut self, input: ::std::option::Option<crate::types::SearchSort>) -> Self {
106        self.sort = input;
107        self
108    }
109    /// <p>The sort criteria for the search results.</p>
110    pub fn get_sort(&self) -> &::std::option::Option<crate::types::SearchSort> {
111        &self.sort
112    }
113    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
114    pub fn filter_clause(mut self, input: crate::types::SearchFilterClause) -> Self {
115        self.filter_clause = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
119    pub fn set_filter_clause(mut self, input: ::std::option::Option<crate::types::SearchFilterClause>) -> Self {
120        self.filter_clause = input;
121        self
122    }
123    /// <p>The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.</p>
124    pub fn get_filter_clause(&self) -> &::std::option::Option<crate::types::SearchFilterClause> {
125        &self.filter_clause
126    }
127    /// Consumes the builder and constructs a [`SearchAssetsInput`](crate::operation::search_assets::SearchAssetsInput).
128    pub fn build(
129        self,
130    ) -> ::std::result::Result<crate::operation::search_assets::SearchAssetsInput, ::aws_smithy_types::error::operation::BuildError> {
131        ::std::result::Result::Ok(crate::operation::search_assets::SearchAssetsInput {
132            search_text: self.search_text,
133            max_results: self.max_results,
134            next_token: self.next_token,
135            sort: self.sort,
136            filter_clause: self.filter_clause,
137        })
138    }
139}