aws_sdk_macie2/operation/search_resources/
_search_resources_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 SearchResourcesInput {
6    /// <p>The filter conditions that determine which S3 buckets to include or exclude from the query results.</p>
7    pub bucket_criteria: ::std::option::Option<crate::types::SearchResourcesBucketCriteria>,
8    /// <p>The maximum number of items to include in each page of the response. The default value is 50.</p>
9    pub max_results: ::std::option::Option<i32>,
10    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The criteria to use to sort the results.</p>
13    pub sort_criteria: ::std::option::Option<crate::types::SearchResourcesSortCriteria>,
14}
15impl SearchResourcesInput {
16    /// <p>The filter conditions that determine which S3 buckets to include or exclude from the query results.</p>
17    pub fn bucket_criteria(&self) -> ::std::option::Option<&crate::types::SearchResourcesBucketCriteria> {
18        self.bucket_criteria.as_ref()
19    }
20    /// <p>The maximum number of items to include in each page of the response. The default value is 50.</p>
21    pub fn max_results(&self) -> ::std::option::Option<i32> {
22        self.max_results
23    }
24    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28    /// <p>The criteria to use to sort the results.</p>
29    pub fn sort_criteria(&self) -> ::std::option::Option<&crate::types::SearchResourcesSortCriteria> {
30        self.sort_criteria.as_ref()
31    }
32}
33impl SearchResourcesInput {
34    /// Creates a new builder-style object to manufacture [`SearchResourcesInput`](crate::operation::search_resources::SearchResourcesInput).
35    pub fn builder() -> crate::operation::search_resources::builders::SearchResourcesInputBuilder {
36        crate::operation::search_resources::builders::SearchResourcesInputBuilder::default()
37    }
38}
39
40/// A builder for [`SearchResourcesInput`](crate::operation::search_resources::SearchResourcesInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct SearchResourcesInputBuilder {
44    pub(crate) bucket_criteria: ::std::option::Option<crate::types::SearchResourcesBucketCriteria>,
45    pub(crate) max_results: ::std::option::Option<i32>,
46    pub(crate) next_token: ::std::option::Option<::std::string::String>,
47    pub(crate) sort_criteria: ::std::option::Option<crate::types::SearchResourcesSortCriteria>,
48}
49impl SearchResourcesInputBuilder {
50    /// <p>The filter conditions that determine which S3 buckets to include or exclude from the query results.</p>
51    pub fn bucket_criteria(mut self, input: crate::types::SearchResourcesBucketCriteria) -> Self {
52        self.bucket_criteria = ::std::option::Option::Some(input);
53        self
54    }
55    /// <p>The filter conditions that determine which S3 buckets to include or exclude from the query results.</p>
56    pub fn set_bucket_criteria(mut self, input: ::std::option::Option<crate::types::SearchResourcesBucketCriteria>) -> Self {
57        self.bucket_criteria = input;
58        self
59    }
60    /// <p>The filter conditions that determine which S3 buckets to include or exclude from the query results.</p>
61    pub fn get_bucket_criteria(&self) -> &::std::option::Option<crate::types::SearchResourcesBucketCriteria> {
62        &self.bucket_criteria
63    }
64    /// <p>The maximum number of items to include in each page of the response. The default value is 50.</p>
65    pub fn max_results(mut self, input: i32) -> Self {
66        self.max_results = ::std::option::Option::Some(input);
67        self
68    }
69    /// <p>The maximum number of items to include in each page of the response. The default value is 50.</p>
70    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
71        self.max_results = input;
72        self
73    }
74    /// <p>The maximum number of items to include in each page of the response. The default value is 50.</p>
75    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
76        &self.max_results
77    }
78    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
79    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.next_token = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
84    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.next_token = input;
86        self
87    }
88    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
89    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
90        &self.next_token
91    }
92    /// <p>The criteria to use to sort the results.</p>
93    pub fn sort_criteria(mut self, input: crate::types::SearchResourcesSortCriteria) -> Self {
94        self.sort_criteria = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>The criteria to use to sort the results.</p>
98    pub fn set_sort_criteria(mut self, input: ::std::option::Option<crate::types::SearchResourcesSortCriteria>) -> Self {
99        self.sort_criteria = input;
100        self
101    }
102    /// <p>The criteria to use to sort the results.</p>
103    pub fn get_sort_criteria(&self) -> &::std::option::Option<crate::types::SearchResourcesSortCriteria> {
104        &self.sort_criteria
105    }
106    /// Consumes the builder and constructs a [`SearchResourcesInput`](crate::operation::search_resources::SearchResourcesInput).
107    pub fn build(
108        self,
109    ) -> ::std::result::Result<crate::operation::search_resources::SearchResourcesInput, ::aws_smithy_types::error::operation::BuildError> {
110        ::std::result::Result::Ok(crate::operation::search_resources::SearchResourcesInput {
111            bucket_criteria: self.bucket_criteria,
112            max_results: self.max_results,
113            next_token: self.next_token,
114            sort_criteria: self.sort_criteria,
115        })
116    }
117}