aws_sdk_quicksight/operation/search_analyses/
_search_analyses_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 SearchAnalysesInput {
6    /// <p>The ID of the Amazon Web Services account that contains the analyses that you're searching for.</p>
7    pub aws_account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The structure for the search filters that you want to apply to your search.</p>
9    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisSearchFilter>>,
10    /// <p>A pagination token that can be used in a subsequent request.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The maximum number of results to return.</p>
13    pub max_results: ::std::option::Option<i32>,
14}
15impl SearchAnalysesInput {
16    /// <p>The ID of the Amazon Web Services account that contains the analyses that you're searching for.</p>
17    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
18        self.aws_account_id.as_deref()
19    }
20    /// <p>The structure for the search filters that you want to apply to your search.</p>
21    ///
22    /// 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()`.
23    pub fn filters(&self) -> &[crate::types::AnalysisSearchFilter] {
24        self.filters.as_deref().unwrap_or_default()
25    }
26    /// <p>A pagination token that can be used in a subsequent request.</p>
27    pub fn next_token(&self) -> ::std::option::Option<&str> {
28        self.next_token.as_deref()
29    }
30    /// <p>The maximum number of results to return.</p>
31    pub fn max_results(&self) -> ::std::option::Option<i32> {
32        self.max_results
33    }
34}
35impl SearchAnalysesInput {
36    /// Creates a new builder-style object to manufacture [`SearchAnalysesInput`](crate::operation::search_analyses::SearchAnalysesInput).
37    pub fn builder() -> crate::operation::search_analyses::builders::SearchAnalysesInputBuilder {
38        crate::operation::search_analyses::builders::SearchAnalysesInputBuilder::default()
39    }
40}
41
42/// A builder for [`SearchAnalysesInput`](crate::operation::search_analyses::SearchAnalysesInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct SearchAnalysesInputBuilder {
46    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
47    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisSearchFilter>>,
48    pub(crate) next_token: ::std::option::Option<::std::string::String>,
49    pub(crate) max_results: ::std::option::Option<i32>,
50}
51impl SearchAnalysesInputBuilder {
52    /// <p>The ID of the Amazon Web Services account that contains the analyses that you're searching for.</p>
53    /// This field is required.
54    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.aws_account_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The ID of the Amazon Web Services account that contains the analyses that you're searching for.</p>
59    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.aws_account_id = input;
61        self
62    }
63    /// <p>The ID of the Amazon Web Services account that contains the analyses that you're searching for.</p>
64    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.aws_account_id
66    }
67    /// Appends an item to `filters`.
68    ///
69    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
70    ///
71    /// <p>The structure for the search filters that you want to apply to your search.</p>
72    pub fn filters(mut self, input: crate::types::AnalysisSearchFilter) -> Self {
73        let mut v = self.filters.unwrap_or_default();
74        v.push(input);
75        self.filters = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>The structure for the search filters that you want to apply to your search.</p>
79    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisSearchFilter>>) -> Self {
80        self.filters = input;
81        self
82    }
83    /// <p>The structure for the search filters that you want to apply to your search.</p>
84    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AnalysisSearchFilter>> {
85        &self.filters
86    }
87    /// <p>A pagination token that can be used in a subsequent request.</p>
88    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.next_token = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>A pagination token that can be used in a subsequent request.</p>
93    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.next_token = input;
95        self
96    }
97    /// <p>A pagination token that can be used in a subsequent request.</p>
98    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
99        &self.next_token
100    }
101    /// <p>The maximum number of results to return.</p>
102    pub fn max_results(mut self, input: i32) -> Self {
103        self.max_results = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>The maximum number of results to return.</p>
107    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
108        self.max_results = input;
109        self
110    }
111    /// <p>The maximum number of results to return.</p>
112    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
113        &self.max_results
114    }
115    /// Consumes the builder and constructs a [`SearchAnalysesInput`](crate::operation::search_analyses::SearchAnalysesInput).
116    pub fn build(
117        self,
118    ) -> ::std::result::Result<crate::operation::search_analyses::SearchAnalysesInput, ::aws_smithy_types::error::operation::BuildError> {
119        ::std::result::Result::Ok(crate::operation::search_analyses::SearchAnalysesInput {
120            aws_account_id: self.aws_account_id,
121            filters: self.filters,
122            next_token: self.next_token,
123            max_results: self.max_results,
124        })
125    }
126}