aws_sdk_connect/operation/search_users/
_search_users_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 SearchUsersInput {
6    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum number of results to return per page.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>Filters to be applied to search results.</p>
13    pub search_filter: ::std::option::Option<crate::types::UserSearchFilter>,
14    /// <p>The search criteria to be used to return users.</p><note>
15    /// <p>The <code>name</code> and <code>description</code> fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will throw invalid results.</p>
16    /// </note>
17    pub search_criteria: ::std::option::Option<crate::types::UserSearchCriteria>,
18}
19impl SearchUsersInput {
20    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
21    pub fn instance_id(&self) -> ::std::option::Option<&str> {
22        self.instance_id.as_deref()
23    }
24    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28    /// <p>The maximum number of results to return per page.</p>
29    pub fn max_results(&self) -> ::std::option::Option<i32> {
30        self.max_results
31    }
32    /// <p>Filters to be applied to search results.</p>
33    pub fn search_filter(&self) -> ::std::option::Option<&crate::types::UserSearchFilter> {
34        self.search_filter.as_ref()
35    }
36    /// <p>The search criteria to be used to return users.</p><note>
37    /// <p>The <code>name</code> and <code>description</code> fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will throw invalid results.</p>
38    /// </note>
39    pub fn search_criteria(&self) -> ::std::option::Option<&crate::types::UserSearchCriteria> {
40        self.search_criteria.as_ref()
41    }
42}
43impl SearchUsersInput {
44    /// Creates a new builder-style object to manufacture [`SearchUsersInput`](crate::operation::search_users::SearchUsersInput).
45    pub fn builder() -> crate::operation::search_users::builders::SearchUsersInputBuilder {
46        crate::operation::search_users::builders::SearchUsersInputBuilder::default()
47    }
48}
49
50/// A builder for [`SearchUsersInput`](crate::operation::search_users::SearchUsersInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct SearchUsersInputBuilder {
54    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
55    pub(crate) next_token: ::std::option::Option<::std::string::String>,
56    pub(crate) max_results: ::std::option::Option<i32>,
57    pub(crate) search_filter: ::std::option::Option<crate::types::UserSearchFilter>,
58    pub(crate) search_criteria: ::std::option::Option<crate::types::UserSearchCriteria>,
59}
60impl SearchUsersInputBuilder {
61    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
62    /// This field is required.
63    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64        self.instance_id = ::std::option::Option::Some(input.into());
65        self
66    }
67    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
68    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69        self.instance_id = input;
70        self
71    }
72    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
73    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
74        &self.instance_id
75    }
76    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
77    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.next_token = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
82    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.next_token = input;
84        self
85    }
86    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
87    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
88        &self.next_token
89    }
90    /// <p>The maximum number of results to return per page.</p>
91    pub fn max_results(mut self, input: i32) -> Self {
92        self.max_results = ::std::option::Option::Some(input);
93        self
94    }
95    /// <p>The maximum number of results to return per page.</p>
96    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
97        self.max_results = input;
98        self
99    }
100    /// <p>The maximum number of results to return per page.</p>
101    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
102        &self.max_results
103    }
104    /// <p>Filters to be applied to search results.</p>
105    pub fn search_filter(mut self, input: crate::types::UserSearchFilter) -> Self {
106        self.search_filter = ::std::option::Option::Some(input);
107        self
108    }
109    /// <p>Filters to be applied to search results.</p>
110    pub fn set_search_filter(mut self, input: ::std::option::Option<crate::types::UserSearchFilter>) -> Self {
111        self.search_filter = input;
112        self
113    }
114    /// <p>Filters to be applied to search results.</p>
115    pub fn get_search_filter(&self) -> &::std::option::Option<crate::types::UserSearchFilter> {
116        &self.search_filter
117    }
118    /// <p>The search criteria to be used to return users.</p><note>
119    /// <p>The <code>name</code> and <code>description</code> fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will throw invalid results.</p>
120    /// </note>
121    pub fn search_criteria(mut self, input: crate::types::UserSearchCriteria) -> Self {
122        self.search_criteria = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The search criteria to be used to return users.</p><note>
126    /// <p>The <code>name</code> and <code>description</code> fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will throw invalid results.</p>
127    /// </note>
128    pub fn set_search_criteria(mut self, input: ::std::option::Option<crate::types::UserSearchCriteria>) -> Self {
129        self.search_criteria = input;
130        self
131    }
132    /// <p>The search criteria to be used to return users.</p><note>
133    /// <p>The <code>name</code> and <code>description</code> fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will throw invalid results.</p>
134    /// </note>
135    pub fn get_search_criteria(&self) -> &::std::option::Option<crate::types::UserSearchCriteria> {
136        &self.search_criteria
137    }
138    /// Consumes the builder and constructs a [`SearchUsersInput`](crate::operation::search_users::SearchUsersInput).
139    pub fn build(self) -> ::std::result::Result<crate::operation::search_users::SearchUsersInput, ::aws_smithy_types::error::operation::BuildError> {
140        ::std::result::Result::Ok(crate::operation::search_users::SearchUsersInput {
141            instance_id: self.instance_id,
142            next_token: self.next_token,
143            max_results: self.max_results,
144            search_filter: self.search_filter,
145            search_criteria: self.search_criteria,
146        })
147    }
148}