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