aws_sdk_quicksight/operation/search_groups/
_search_groups_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchGroupsInput {
6 pub aws_account_id: ::std::option::Option<::std::string::String>,
8 pub next_token: ::std::option::Option<::std::string::String>,
10 pub max_results: ::std::option::Option<i32>,
12 pub namespace: ::std::option::Option<::std::string::String>,
14 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::GroupSearchFilter>>,
16}
17impl SearchGroupsInput {
18 pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
20 self.aws_account_id.as_deref()
21 }
22 pub fn next_token(&self) -> ::std::option::Option<&str> {
24 self.next_token.as_deref()
25 }
26 pub fn max_results(&self) -> ::std::option::Option<i32> {
28 self.max_results
29 }
30 pub fn namespace(&self) -> ::std::option::Option<&str> {
32 self.namespace.as_deref()
33 }
34 pub fn filters(&self) -> &[crate::types::GroupSearchFilter] {
38 self.filters.as_deref().unwrap_or_default()
39 }
40}
41impl SearchGroupsInput {
42 pub fn builder() -> crate::operation::search_groups::builders::SearchGroupsInputBuilder {
44 crate::operation::search_groups::builders::SearchGroupsInputBuilder::default()
45 }
46}
47
48#[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 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 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 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.aws_account_id
73 }
74 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 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.next_token = input;
82 self
83 }
84 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
86 &self.next_token
87 }
88 pub fn max_results(mut self, input: i32) -> Self {
90 self.max_results = ::std::option::Option::Some(input);
91 self
92 }
93 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
95 self.max_results = input;
96 self
97 }
98 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
100 &self.max_results
101 }
102 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 pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.namespace = input;
111 self
112 }
113 pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
115 &self.namespace
116 }
117 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 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 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GroupSearchFilter>> {
135 &self.filters
136 }
137 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}