aws_sdk_rekognition/operation/search_faces/
_search_faces_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchFacesInput {
6 pub collection_id: ::std::option::Option<::std::string::String>,
8 pub face_id: ::std::option::Option<::std::string::String>,
10 pub max_faces: ::std::option::Option<i32>,
12 pub face_match_threshold: ::std::option::Option<f32>,
14}
15impl SearchFacesInput {
16 pub fn collection_id(&self) -> ::std::option::Option<&str> {
18 self.collection_id.as_deref()
19 }
20 pub fn face_id(&self) -> ::std::option::Option<&str> {
22 self.face_id.as_deref()
23 }
24 pub fn max_faces(&self) -> ::std::option::Option<i32> {
26 self.max_faces
27 }
28 pub fn face_match_threshold(&self) -> ::std::option::Option<f32> {
30 self.face_match_threshold
31 }
32}
33impl SearchFacesInput {
34 pub fn builder() -> crate::operation::search_faces::builders::SearchFacesInputBuilder {
36 crate::operation::search_faces::builders::SearchFacesInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct SearchFacesInputBuilder {
44 pub(crate) collection_id: ::std::option::Option<::std::string::String>,
45 pub(crate) face_id: ::std::option::Option<::std::string::String>,
46 pub(crate) max_faces: ::std::option::Option<i32>,
47 pub(crate) face_match_threshold: ::std::option::Option<f32>,
48}
49impl SearchFacesInputBuilder {
50 pub fn collection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.collection_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_collection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.collection_id = input;
59 self
60 }
61 pub fn get_collection_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.collection_id
64 }
65 pub fn face_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.face_id = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_face_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.face_id = input;
74 self
75 }
76 pub fn get_face_id(&self) -> &::std::option::Option<::std::string::String> {
78 &self.face_id
79 }
80 pub fn max_faces(mut self, input: i32) -> Self {
82 self.max_faces = ::std::option::Option::Some(input);
83 self
84 }
85 pub fn set_max_faces(mut self, input: ::std::option::Option<i32>) -> Self {
87 self.max_faces = input;
88 self
89 }
90 pub fn get_max_faces(&self) -> &::std::option::Option<i32> {
92 &self.max_faces
93 }
94 pub fn face_match_threshold(mut self, input: f32) -> Self {
96 self.face_match_threshold = ::std::option::Option::Some(input);
97 self
98 }
99 pub fn set_face_match_threshold(mut self, input: ::std::option::Option<f32>) -> Self {
101 self.face_match_threshold = input;
102 self
103 }
104 pub fn get_face_match_threshold(&self) -> &::std::option::Option<f32> {
106 &self.face_match_threshold
107 }
108 pub fn build(self) -> ::std::result::Result<crate::operation::search_faces::SearchFacesInput, ::aws_smithy_types::error::operation::BuildError> {
110 ::std::result::Result::Ok(crate::operation::search_faces::SearchFacesInput {
111 collection_id: self.collection_id,
112 face_id: self.face_id,
113 max_faces: self.max_faces,
114 face_match_threshold: self.face_match_threshold,
115 })
116 }
117}