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
141
142
143
144
145
146
147
148
149
150
151
// 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 RecognizeCelebritiesOutput {
    /// <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>
    pub celebrity_faces: ::std::option::Option<::std::vec::Vec<crate::types::Celebrity>>,
    /// <p>Details about each unrecognized face in the image.</p>
    pub unrecognized_faces: ::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>>,
    /// <note>
    /// <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>
    /// </note>
    /// <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>
    /// <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>
    /// </note>
    pub orientation_correction: ::std::option::Option<crate::types::OrientationCorrection>,
    _request_id: Option<String>,
}
impl RecognizeCelebritiesOutput {
    /// <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>
    ///
    /// 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()`.
    pub fn celebrity_faces(&self) -> &[crate::types::Celebrity] {
        self.celebrity_faces.as_deref().unwrap_or_default()
    }
    /// <p>Details about each unrecognized face in the image.</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 `.unrecognized_faces.is_none()`.
    pub fn unrecognized_faces(&self) -> &[crate::types::ComparedFace] {
        self.unrecognized_faces.as_deref().unwrap_or_default()
    }
    /// <note>
    /// <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>
    /// </note>
    /// <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>
    /// <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>
    /// </note>
    pub fn orientation_correction(&self) -> ::std::option::Option<&crate::types::OrientationCorrection> {
        self.orientation_correction.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for RecognizeCelebritiesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl RecognizeCelebritiesOutput {
    /// Creates a new builder-style object to manufacture [`RecognizeCelebritiesOutput`](crate::operation::recognize_celebrities::RecognizeCelebritiesOutput).
    pub fn builder() -> crate::operation::recognize_celebrities::builders::RecognizeCelebritiesOutputBuilder {
        crate::operation::recognize_celebrities::builders::RecognizeCelebritiesOutputBuilder::default()
    }
}

/// A builder for [`RecognizeCelebritiesOutput`](crate::operation::recognize_celebrities::RecognizeCelebritiesOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RecognizeCelebritiesOutputBuilder {
    pub(crate) celebrity_faces: ::std::option::Option<::std::vec::Vec<crate::types::Celebrity>>,
    pub(crate) unrecognized_faces: ::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>>,
    pub(crate) orientation_correction: ::std::option::Option<crate::types::OrientationCorrection>,
    _request_id: Option<String>,
}
impl RecognizeCelebritiesOutputBuilder {
    /// Appends an item to `celebrity_faces`.
    ///
    /// To override the contents of this collection use [`set_celebrity_faces`](Self::set_celebrity_faces).
    ///
    /// <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>
    pub fn celebrity_faces(mut self, input: crate::types::Celebrity) -> Self {
        let mut v = self.celebrity_faces.unwrap_or_default();
        v.push(input);
        self.celebrity_faces = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_celebrity_faces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Celebrity>>) -> Self {
        self.celebrity_faces = input;
        self
    }
    /// <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>
    pub fn get_celebrity_faces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Celebrity>> {
        &self.celebrity_faces
    }
    /// Appends an item to `unrecognized_faces`.
    ///
    /// To override the contents of this collection use [`set_unrecognized_faces`](Self::set_unrecognized_faces).
    ///
    /// <p>Details about each unrecognized face in the image.</p>
    pub fn unrecognized_faces(mut self, input: crate::types::ComparedFace) -> Self {
        let mut v = self.unrecognized_faces.unwrap_or_default();
        v.push(input);
        self.unrecognized_faces = ::std::option::Option::Some(v);
        self
    }
    /// <p>Details about each unrecognized face in the image.</p>
    pub fn set_unrecognized_faces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>>) -> Self {
        self.unrecognized_faces = input;
        self
    }
    /// <p>Details about each unrecognized face in the image.</p>
    pub fn get_unrecognized_faces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComparedFace>> {
        &self.unrecognized_faces
    }
    /// <note>
    /// <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>
    /// </note>
    /// <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>
    /// <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>
    /// </note>
    pub fn orientation_correction(mut self, input: crate::types::OrientationCorrection) -> Self {
        self.orientation_correction = ::std::option::Option::Some(input);
        self
    }
    /// <note>
    /// <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>
    /// </note>
    /// <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>
    /// <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>
    /// </note>
    pub fn set_orientation_correction(mut self, input: ::std::option::Option<crate::types::OrientationCorrection>) -> Self {
        self.orientation_correction = input;
        self
    }
    /// <note>
    /// <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>
    /// </note>
    /// <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>
    /// <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>
    /// </note>
    pub fn get_orientation_correction(&self) -> &::std::option::Option<crate::types::OrientationCorrection> {
        &self.orientation_correction
    }
    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 [`RecognizeCelebritiesOutput`](crate::operation::recognize_celebrities::RecognizeCelebritiesOutput).
    pub fn build(self) -> crate::operation::recognize_celebrities::RecognizeCelebritiesOutput {
        crate::operation::recognize_celebrities::RecognizeCelebritiesOutput {
            celebrity_faces: self.celebrity_faces,
            unrecognized_faces: self.unrecognized_faces,
            orientation_correction: self.orientation_correction,
            _request_id: self._request_id,
        }
    }
}