aws_sdk_rekognition/operation/search_faces/
_search_faces_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchFacesOutput {
6 pub searched_face_id: ::std::option::Option<::std::string::String>,
8 pub face_matches: ::std::option::Option<::std::vec::Vec<crate::types::FaceMatch>>,
10 pub face_model_version: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl SearchFacesOutput {
15 pub fn searched_face_id(&self) -> ::std::option::Option<&str> {
17 self.searched_face_id.as_deref()
18 }
19 pub fn face_matches(&self) -> &[crate::types::FaceMatch] {
23 self.face_matches.as_deref().unwrap_or_default()
24 }
25 pub fn face_model_version(&self) -> ::std::option::Option<&str> {
27 self.face_model_version.as_deref()
28 }
29}
30impl ::aws_types::request_id::RequestId for SearchFacesOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl SearchFacesOutput {
36 pub fn builder() -> crate::operation::search_faces::builders::SearchFacesOutputBuilder {
38 crate::operation::search_faces::builders::SearchFacesOutputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct SearchFacesOutputBuilder {
46 pub(crate) searched_face_id: ::std::option::Option<::std::string::String>,
47 pub(crate) face_matches: ::std::option::Option<::std::vec::Vec<crate::types::FaceMatch>>,
48 pub(crate) face_model_version: ::std::option::Option<::std::string::String>,
49 _request_id: Option<String>,
50}
51impl SearchFacesOutputBuilder {
52 pub fn searched_face_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.searched_face_id = ::std::option::Option::Some(input.into());
55 self
56 }
57 pub fn set_searched_face_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.searched_face_id = input;
60 self
61 }
62 pub fn get_searched_face_id(&self) -> &::std::option::Option<::std::string::String> {
64 &self.searched_face_id
65 }
66 pub fn face_matches(mut self, input: crate::types::FaceMatch) -> Self {
72 let mut v = self.face_matches.unwrap_or_default();
73 v.push(input);
74 self.face_matches = ::std::option::Option::Some(v);
75 self
76 }
77 pub fn set_face_matches(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FaceMatch>>) -> Self {
79 self.face_matches = input;
80 self
81 }
82 pub fn get_face_matches(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FaceMatch>> {
84 &self.face_matches
85 }
86 pub fn face_model_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.face_model_version = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_face_model_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.face_model_version = input;
94 self
95 }
96 pub fn get_face_model_version(&self) -> &::std::option::Option<::std::string::String> {
98 &self.face_model_version
99 }
100 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
101 self._request_id = Some(request_id.into());
102 self
103 }
104
105 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
106 self._request_id = request_id;
107 self
108 }
109 pub fn build(self) -> crate::operation::search_faces::SearchFacesOutput {
111 crate::operation::search_faces::SearchFacesOutput {
112 searched_face_id: self.searched_face_id,
113 face_matches: self.face_matches,
114 face_model_version: self.face_model_version,
115 _request_id: self._request_id,
116 }
117 }
118}