aws_sdk_rekognition/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 ID of an existing collection containing the UserID, used with a UserId or FaceId. If a FaceId is provided, UserId isn’t required to be present in the Collection.</p>
7    pub collection_id: ::std::option::Option<::std::string::String>,
8    /// <p>ID for the existing User.</p>
9    pub user_id: ::std::option::Option<::std::string::String>,
10    /// <p>ID for the existing face.</p>
11    pub face_id: ::std::option::Option<::std::string::String>,
12    /// <p>Optional value that specifies the minimum confidence in the matched UserID to return. Default value of 80.</p>
13    pub user_match_threshold: ::std::option::Option<f32>,
14    /// <p>Maximum number of identities to return.</p>
15    pub max_users: ::std::option::Option<i32>,
16}
17impl SearchUsersInput {
18    /// <p>The ID of an existing collection containing the UserID, used with a UserId or FaceId. If a FaceId is provided, UserId isn’t required to be present in the Collection.</p>
19    pub fn collection_id(&self) -> ::std::option::Option<&str> {
20        self.collection_id.as_deref()
21    }
22    /// <p>ID for the existing User.</p>
23    pub fn user_id(&self) -> ::std::option::Option<&str> {
24        self.user_id.as_deref()
25    }
26    /// <p>ID for the existing face.</p>
27    pub fn face_id(&self) -> ::std::option::Option<&str> {
28        self.face_id.as_deref()
29    }
30    /// <p>Optional value that specifies the minimum confidence in the matched UserID to return. Default value of 80.</p>
31    pub fn user_match_threshold(&self) -> ::std::option::Option<f32> {
32        self.user_match_threshold
33    }
34    /// <p>Maximum number of identities to return.</p>
35    pub fn max_users(&self) -> ::std::option::Option<i32> {
36        self.max_users
37    }
38}
39impl SearchUsersInput {
40    /// Creates a new builder-style object to manufacture [`SearchUsersInput`](crate::operation::search_users::SearchUsersInput).
41    pub fn builder() -> crate::operation::search_users::builders::SearchUsersInputBuilder {
42        crate::operation::search_users::builders::SearchUsersInputBuilder::default()
43    }
44}
45
46/// A builder for [`SearchUsersInput`](crate::operation::search_users::SearchUsersInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct SearchUsersInputBuilder {
50    pub(crate) collection_id: ::std::option::Option<::std::string::String>,
51    pub(crate) user_id: ::std::option::Option<::std::string::String>,
52    pub(crate) face_id: ::std::option::Option<::std::string::String>,
53    pub(crate) user_match_threshold: ::std::option::Option<f32>,
54    pub(crate) max_users: ::std::option::Option<i32>,
55}
56impl SearchUsersInputBuilder {
57    /// <p>The ID of an existing collection containing the UserID, used with a UserId or FaceId. If a FaceId is provided, UserId isn’t required to be present in the Collection.</p>
58    /// This field is required.
59    pub fn collection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.collection_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The ID of an existing collection containing the UserID, used with a UserId or FaceId. If a FaceId is provided, UserId isn’t required to be present in the Collection.</p>
64    pub fn set_collection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.collection_id = input;
66        self
67    }
68    /// <p>The ID of an existing collection containing the UserID, used with a UserId or FaceId. If a FaceId is provided, UserId isn’t required to be present in the Collection.</p>
69    pub fn get_collection_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.collection_id
71    }
72    /// <p>ID for the existing User.</p>
73    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.user_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>ID for the existing User.</p>
78    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.user_id = input;
80        self
81    }
82    /// <p>ID for the existing User.</p>
83    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.user_id
85    }
86    /// <p>ID for the existing face.</p>
87    pub fn face_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.face_id = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>ID for the existing face.</p>
92    pub fn set_face_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.face_id = input;
94        self
95    }
96    /// <p>ID for the existing face.</p>
97    pub fn get_face_id(&self) -> &::std::option::Option<::std::string::String> {
98        &self.face_id
99    }
100    /// <p>Optional value that specifies the minimum confidence in the matched UserID to return. Default value of 80.</p>
101    pub fn user_match_threshold(mut self, input: f32) -> Self {
102        self.user_match_threshold = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>Optional value that specifies the minimum confidence in the matched UserID to return. Default value of 80.</p>
106    pub fn set_user_match_threshold(mut self, input: ::std::option::Option<f32>) -> Self {
107        self.user_match_threshold = input;
108        self
109    }
110    /// <p>Optional value that specifies the minimum confidence in the matched UserID to return. Default value of 80.</p>
111    pub fn get_user_match_threshold(&self) -> &::std::option::Option<f32> {
112        &self.user_match_threshold
113    }
114    /// <p>Maximum number of identities to return.</p>
115    pub fn max_users(mut self, input: i32) -> Self {
116        self.max_users = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>Maximum number of identities to return.</p>
120    pub fn set_max_users(mut self, input: ::std::option::Option<i32>) -> Self {
121        self.max_users = input;
122        self
123    }
124    /// <p>Maximum number of identities to return.</p>
125    pub fn get_max_users(&self) -> &::std::option::Option<i32> {
126        &self.max_users
127    }
128    /// Consumes the builder and constructs a [`SearchUsersInput`](crate::operation::search_users::SearchUsersInput).
129    pub fn build(self) -> ::std::result::Result<crate::operation::search_users::SearchUsersInput, ::aws_smithy_types::error::operation::BuildError> {
130        ::std::result::Result::Ok(crate::operation::search_users::SearchUsersInput {
131            collection_id: self.collection_id,
132            user_id: self.user_id,
133            face_id: self.face_id,
134            user_match_threshold: self.user_match_threshold,
135            max_users: self.max_users,
136        })
137    }
138}