#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SearchFacesOutput {
#[doc(hidden)]
pub searched_face_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub face_matches: std::option::Option<std::vec::Vec<crate::types::FaceMatch>>,
#[doc(hidden)]
pub face_model_version: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl SearchFacesOutput {
pub fn searched_face_id(&self) -> std::option::Option<&str> {
self.searched_face_id.as_deref()
}
pub fn face_matches(&self) -> std::option::Option<&[crate::types::FaceMatch]> {
self.face_matches.as_deref()
}
pub fn face_model_version(&self) -> std::option::Option<&str> {
self.face_model_version.as_deref()
}
}
impl aws_http::request_id::RequestId for SearchFacesOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl SearchFacesOutput {
pub fn builder() -> crate::operation::search_faces::builders::SearchFacesOutputBuilder {
crate::operation::search_faces::builders::SearchFacesOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SearchFacesOutputBuilder {
pub(crate) searched_face_id: std::option::Option<std::string::String>,
pub(crate) face_matches: std::option::Option<std::vec::Vec<crate::types::FaceMatch>>,
pub(crate) face_model_version: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl SearchFacesOutputBuilder {
pub fn searched_face_id(mut self, input: impl Into<std::string::String>) -> Self {
self.searched_face_id = Some(input.into());
self
}
pub fn set_searched_face_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.searched_face_id = input;
self
}
pub fn face_matches(mut self, input: crate::types::FaceMatch) -> Self {
let mut v = self.face_matches.unwrap_or_default();
v.push(input);
self.face_matches = Some(v);
self
}
pub fn set_face_matches(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::FaceMatch>>,
) -> Self {
self.face_matches = input;
self
}
pub fn face_model_version(mut self, input: impl Into<std::string::String>) -> Self {
self.face_model_version = Some(input.into());
self
}
pub fn set_face_model_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.face_model_version = input;
self
}
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
}
pub fn build(self) -> crate::operation::search_faces::SearchFacesOutput {
crate::operation::search_faces::SearchFacesOutput {
searched_face_id: self.searched_face_id,
face_matches: self.face_matches,
face_model_version: self.face_model_version,
_request_id: self._request_id,
}
}
}