1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SearchUsersOutput {
    /// <p>An array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.</p>
    pub user_matches: ::std::option::Option<::std::vec::Vec<crate::types::UserMatch>>,
    /// <p>Version number of the face detection model associated with the input CollectionId.</p>
    pub face_model_version: ::std::option::Option<::std::string::String>,
    /// <p>Contains the ID of a face that was used to search for matches in a collection.</p>
    pub searched_face: ::std::option::Option<crate::types::SearchedFace>,
    /// <p>Contains the ID of the UserID that was used to search for matches in a collection.</p>
    pub searched_user: ::std::option::Option<crate::types::SearchedUser>,
    _request_id: Option<String>,
}
impl SearchUsersOutput {
    /// <p>An array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_matches.is_none()`.
    pub fn user_matches(&self) -> &[crate::types::UserMatch] {
        self.user_matches.as_deref().unwrap_or_default()
    }
    /// <p>Version number of the face detection model associated with the input CollectionId.</p>
    pub fn face_model_version(&self) -> ::std::option::Option<&str> {
        self.face_model_version.as_deref()
    }
    /// <p>Contains the ID of a face that was used to search for matches in a collection.</p>
    pub fn searched_face(&self) -> ::std::option::Option<&crate::types::SearchedFace> {
        self.searched_face.as_ref()
    }
    /// <p>Contains the ID of the UserID that was used to search for matches in a collection.</p>
    pub fn searched_user(&self) -> ::std::option::Option<&crate::types::SearchedUser> {
        self.searched_user.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for SearchUsersOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl SearchUsersOutput {
    /// Creates a new builder-style object to manufacture [`SearchUsersOutput`](crate::operation::search_users::SearchUsersOutput).
    pub fn builder() -> crate::operation::search_users::builders::SearchUsersOutputBuilder {
        crate::operation::search_users::builders::SearchUsersOutputBuilder::default()
    }
}

/// A builder for [`SearchUsersOutput`](crate::operation::search_users::SearchUsersOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SearchUsersOutputBuilder {
    pub(crate) user_matches: ::std::option::Option<::std::vec::Vec<crate::types::UserMatch>>,
    pub(crate) face_model_version: ::std::option::Option<::std::string::String>,
    pub(crate) searched_face: ::std::option::Option<crate::types::SearchedFace>,
    pub(crate) searched_user: ::std::option::Option<crate::types::SearchedUser>,
    _request_id: Option<String>,
}
impl SearchUsersOutputBuilder {
    /// Appends an item to `user_matches`.
    ///
    /// To override the contents of this collection use [`set_user_matches`](Self::set_user_matches).
    ///
    /// <p>An array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.</p>
    pub fn user_matches(mut self, input: crate::types::UserMatch) -> Self {
        let mut v = self.user_matches.unwrap_or_default();
        v.push(input);
        self.user_matches = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.</p>
    pub fn set_user_matches(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserMatch>>) -> Self {
        self.user_matches = input;
        self
    }
    /// <p>An array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.</p>
    pub fn get_user_matches(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserMatch>> {
        &self.user_matches
    }
    /// <p>Version number of the face detection model associated with the input CollectionId.</p>
    pub fn face_model_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.face_model_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Version number of the face detection model associated with the input CollectionId.</p>
    pub fn set_face_model_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.face_model_version = input;
        self
    }
    /// <p>Version number of the face detection model associated with the input CollectionId.</p>
    pub fn get_face_model_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.face_model_version
    }
    /// <p>Contains the ID of a face that was used to search for matches in a collection.</p>
    pub fn searched_face(mut self, input: crate::types::SearchedFace) -> Self {
        self.searched_face = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the ID of a face that was used to search for matches in a collection.</p>
    pub fn set_searched_face(mut self, input: ::std::option::Option<crate::types::SearchedFace>) -> Self {
        self.searched_face = input;
        self
    }
    /// <p>Contains the ID of a face that was used to search for matches in a collection.</p>
    pub fn get_searched_face(&self) -> &::std::option::Option<crate::types::SearchedFace> {
        &self.searched_face
    }
    /// <p>Contains the ID of the UserID that was used to search for matches in a collection.</p>
    pub fn searched_user(mut self, input: crate::types::SearchedUser) -> Self {
        self.searched_user = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the ID of the UserID that was used to search for matches in a collection.</p>
    pub fn set_searched_user(mut self, input: ::std::option::Option<crate::types::SearchedUser>) -> Self {
        self.searched_user = input;
        self
    }
    /// <p>Contains the ID of the UserID that was used to search for matches in a collection.</p>
    pub fn get_searched_user(&self) -> &::std::option::Option<crate::types::SearchedUser> {
        &self.searched_user
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`SearchUsersOutput`](crate::operation::search_users::SearchUsersOutput).
    pub fn build(self) -> crate::operation::search_users::SearchUsersOutput {
        crate::operation::search_users::SearchUsersOutput {
            user_matches: self.user_matches,
            face_model_version: self.face_model_version,
            searched_face: self.searched_face,
            searched_user: self.searched_user,
            _request_id: self._request_id,
        }
    }
}