aws_sdk_rekognition/operation/recognize_celebrities/
_recognize_celebrities_output.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 RecognizeCelebritiesOutput {
6    /// <p>Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 celebrities in an image. Each celebrity object includes the following attributes: <code>Face</code>, <code>Confidence</code>, <code>Emotions</code>, <code>Landmarks</code>, <code>Pose</code>, <code>Quality</code>, <code>Smile</code>, <code>Id</code>, <code>KnownGender</code>, <code>MatchConfidence</code>, <code>Name</code>, <code>Urls</code>.</p>
7    pub celebrity_faces: ::std::option::Option<::std::vec::Vec<crate::types::Celebrity>>,
8    /// <p>Details about each unrecognized face in the image.</p>
9    pub unrecognized_faces: ::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>>,
10    /// <note>
11    /// <p>Support for estimating image orientation using the the OrientationCorrection field has ceased as of August 2021. Any returned values for this field included in an API response will always be NULL.</p>
12    /// </note>
13    /// <p>The orientation of the input image (counterclockwise direction). If your application displays the image, you can use this value to correct the orientation. The bounding box coordinates returned in <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> represent face locations before the image orientation is corrected.</p><note>
14    /// <p>If the input image is in .jpeg format, it might contain exchangeable image (Exif) metadata that includes the image's orientation. If so, and the Exif metadata for the input image populates the orientation field, the value of <code>OrientationCorrection</code> is null. The <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> bounding box coordinates represent face locations after Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
15    /// </note>
16    pub orientation_correction: ::std::option::Option<crate::types::OrientationCorrection>,
17    _request_id: Option<String>,
18}
19impl RecognizeCelebritiesOutput {
20    /// <p>Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 celebrities in an image. Each celebrity object includes the following attributes: <code>Face</code>, <code>Confidence</code>, <code>Emotions</code>, <code>Landmarks</code>, <code>Pose</code>, <code>Quality</code>, <code>Smile</code>, <code>Id</code>, <code>KnownGender</code>, <code>MatchConfidence</code>, <code>Name</code>, <code>Urls</code>.</p>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.celebrity_faces.is_none()`.
23    pub fn celebrity_faces(&self) -> &[crate::types::Celebrity] {
24        self.celebrity_faces.as_deref().unwrap_or_default()
25    }
26    /// <p>Details about each unrecognized face in the image.</p>
27    ///
28    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.unrecognized_faces.is_none()`.
29    pub fn unrecognized_faces(&self) -> &[crate::types::ComparedFace] {
30        self.unrecognized_faces.as_deref().unwrap_or_default()
31    }
32    /// <note>
33    /// <p>Support for estimating image orientation using the the OrientationCorrection field has ceased as of August 2021. Any returned values for this field included in an API response will always be NULL.</p>
34    /// </note>
35    /// <p>The orientation of the input image (counterclockwise direction). If your application displays the image, you can use this value to correct the orientation. The bounding box coordinates returned in <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> represent face locations before the image orientation is corrected.</p><note>
36    /// <p>If the input image is in .jpeg format, it might contain exchangeable image (Exif) metadata that includes the image's orientation. If so, and the Exif metadata for the input image populates the orientation field, the value of <code>OrientationCorrection</code> is null. The <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> bounding box coordinates represent face locations after Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
37    /// </note>
38    pub fn orientation_correction(&self) -> ::std::option::Option<&crate::types::OrientationCorrection> {
39        self.orientation_correction.as_ref()
40    }
41}
42impl ::aws_types::request_id::RequestId for RecognizeCelebritiesOutput {
43    fn request_id(&self) -> Option<&str> {
44        self._request_id.as_deref()
45    }
46}
47impl RecognizeCelebritiesOutput {
48    /// Creates a new builder-style object to manufacture [`RecognizeCelebritiesOutput`](crate::operation::recognize_celebrities::RecognizeCelebritiesOutput).
49    pub fn builder() -> crate::operation::recognize_celebrities::builders::RecognizeCelebritiesOutputBuilder {
50        crate::operation::recognize_celebrities::builders::RecognizeCelebritiesOutputBuilder::default()
51    }
52}
53
54/// A builder for [`RecognizeCelebritiesOutput`](crate::operation::recognize_celebrities::RecognizeCelebritiesOutput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct RecognizeCelebritiesOutputBuilder {
58    pub(crate) celebrity_faces: ::std::option::Option<::std::vec::Vec<crate::types::Celebrity>>,
59    pub(crate) unrecognized_faces: ::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>>,
60    pub(crate) orientation_correction: ::std::option::Option<crate::types::OrientationCorrection>,
61    _request_id: Option<String>,
62}
63impl RecognizeCelebritiesOutputBuilder {
64    /// Appends an item to `celebrity_faces`.
65    ///
66    /// To override the contents of this collection use [`set_celebrity_faces`](Self::set_celebrity_faces).
67    ///
68    /// <p>Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 celebrities in an image. Each celebrity object includes the following attributes: <code>Face</code>, <code>Confidence</code>, <code>Emotions</code>, <code>Landmarks</code>, <code>Pose</code>, <code>Quality</code>, <code>Smile</code>, <code>Id</code>, <code>KnownGender</code>, <code>MatchConfidence</code>, <code>Name</code>, <code>Urls</code>.</p>
69    pub fn celebrity_faces(mut self, input: crate::types::Celebrity) -> Self {
70        let mut v = self.celebrity_faces.unwrap_or_default();
71        v.push(input);
72        self.celebrity_faces = ::std::option::Option::Some(v);
73        self
74    }
75    /// <p>Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 celebrities in an image. Each celebrity object includes the following attributes: <code>Face</code>, <code>Confidence</code>, <code>Emotions</code>, <code>Landmarks</code>, <code>Pose</code>, <code>Quality</code>, <code>Smile</code>, <code>Id</code>, <code>KnownGender</code>, <code>MatchConfidence</code>, <code>Name</code>, <code>Urls</code>.</p>
76    pub fn set_celebrity_faces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Celebrity>>) -> Self {
77        self.celebrity_faces = input;
78        self
79    }
80    /// <p>Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 celebrities in an image. Each celebrity object includes the following attributes: <code>Face</code>, <code>Confidence</code>, <code>Emotions</code>, <code>Landmarks</code>, <code>Pose</code>, <code>Quality</code>, <code>Smile</code>, <code>Id</code>, <code>KnownGender</code>, <code>MatchConfidence</code>, <code>Name</code>, <code>Urls</code>.</p>
81    pub fn get_celebrity_faces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Celebrity>> {
82        &self.celebrity_faces
83    }
84    /// Appends an item to `unrecognized_faces`.
85    ///
86    /// To override the contents of this collection use [`set_unrecognized_faces`](Self::set_unrecognized_faces).
87    ///
88    /// <p>Details about each unrecognized face in the image.</p>
89    pub fn unrecognized_faces(mut self, input: crate::types::ComparedFace) -> Self {
90        let mut v = self.unrecognized_faces.unwrap_or_default();
91        v.push(input);
92        self.unrecognized_faces = ::std::option::Option::Some(v);
93        self
94    }
95    /// <p>Details about each unrecognized face in the image.</p>
96    pub fn set_unrecognized_faces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>>) -> Self {
97        self.unrecognized_faces = input;
98        self
99    }
100    /// <p>Details about each unrecognized face in the image.</p>
101    pub fn get_unrecognized_faces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>> {
102        &self.unrecognized_faces
103    }
104    /// <note>
105    /// <p>Support for estimating image orientation using the the OrientationCorrection field has ceased as of August 2021. Any returned values for this field included in an API response will always be NULL.</p>
106    /// </note>
107    /// <p>The orientation of the input image (counterclockwise direction). If your application displays the image, you can use this value to correct the orientation. The bounding box coordinates returned in <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> represent face locations before the image orientation is corrected.</p><note>
108    /// <p>If the input image is in .jpeg format, it might contain exchangeable image (Exif) metadata that includes the image's orientation. If so, and the Exif metadata for the input image populates the orientation field, the value of <code>OrientationCorrection</code> is null. The <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> bounding box coordinates represent face locations after Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
109    /// </note>
110    pub fn orientation_correction(mut self, input: crate::types::OrientationCorrection) -> Self {
111        self.orientation_correction = ::std::option::Option::Some(input);
112        self
113    }
114    /// <note>
115    /// <p>Support for estimating image orientation using the the OrientationCorrection field has ceased as of August 2021. Any returned values for this field included in an API response will always be NULL.</p>
116    /// </note>
117    /// <p>The orientation of the input image (counterclockwise direction). If your application displays the image, you can use this value to correct the orientation. The bounding box coordinates returned in <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> represent face locations before the image orientation is corrected.</p><note>
118    /// <p>If the input image is in .jpeg format, it might contain exchangeable image (Exif) metadata that includes the image's orientation. If so, and the Exif metadata for the input image populates the orientation field, the value of <code>OrientationCorrection</code> is null. The <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> bounding box coordinates represent face locations after Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
119    /// </note>
120    pub fn set_orientation_correction(mut self, input: ::std::option::Option<crate::types::OrientationCorrection>) -> Self {
121        self.orientation_correction = input;
122        self
123    }
124    /// <note>
125    /// <p>Support for estimating image orientation using the the OrientationCorrection field has ceased as of August 2021. Any returned values for this field included in an API response will always be NULL.</p>
126    /// </note>
127    /// <p>The orientation of the input image (counterclockwise direction). If your application displays the image, you can use this value to correct the orientation. The bounding box coordinates returned in <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> represent face locations before the image orientation is corrected.</p><note>
128    /// <p>If the input image is in .jpeg format, it might contain exchangeable image (Exif) metadata that includes the image's orientation. If so, and the Exif metadata for the input image populates the orientation field, the value of <code>OrientationCorrection</code> is null. The <code>CelebrityFaces</code> and <code>UnrecognizedFaces</code> bounding box coordinates represent face locations after Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
129    /// </note>
130    pub fn get_orientation_correction(&self) -> &::std::option::Option<crate::types::OrientationCorrection> {
131        &self.orientation_correction
132    }
133    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
134        self._request_id = Some(request_id.into());
135        self
136    }
137
138    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
139        self._request_id = request_id;
140        self
141    }
142    /// Consumes the builder and constructs a [`RecognizeCelebritiesOutput`](crate::operation::recognize_celebrities::RecognizeCelebritiesOutput).
143    pub fn build(self) -> crate::operation::recognize_celebrities::RecognizeCelebritiesOutput {
144        crate::operation::recognize_celebrities::RecognizeCelebritiesOutput {
145            celebrity_faces: self.celebrity_faces,
146            unrecognized_faces: self.unrecognized_faces,
147            orientation_correction: self.orientation_correction,
148            _request_id: self._request_id,
149        }
150    }
151}