aws_sdk_rekognition/operation/detect_faces/_detect_faces_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 DetectFacesOutput {
6 /// <p>Details of each face found in the image.</p>
7 pub face_details: ::std::option::Option<::std::vec::Vec<crate::types::FaceDetail>>,
8 /// <p>The value of <code>OrientationCorrection</code> is always null.</p>
9 /// <p>If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
10 /// <p>Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.</p>
11 pub orientation_correction: ::std::option::Option<crate::types::OrientationCorrection>,
12 _request_id: Option<String>,
13}
14impl DetectFacesOutput {
15 /// <p>Details of each face found in the image.</p>
16 ///
17 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.face_details.is_none()`.
18 pub fn face_details(&self) -> &[crate::types::FaceDetail] {
19 self.face_details.as_deref().unwrap_or_default()
20 }
21 /// <p>The value of <code>OrientationCorrection</code> is always null.</p>
22 /// <p>If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
23 /// <p>Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.</p>
24 pub fn orientation_correction(&self) -> ::std::option::Option<&crate::types::OrientationCorrection> {
25 self.orientation_correction.as_ref()
26 }
27}
28impl ::aws_types::request_id::RequestId for DetectFacesOutput {
29 fn request_id(&self) -> Option<&str> {
30 self._request_id.as_deref()
31 }
32}
33impl DetectFacesOutput {
34 /// Creates a new builder-style object to manufacture [`DetectFacesOutput`](crate::operation::detect_faces::DetectFacesOutput).
35 pub fn builder() -> crate::operation::detect_faces::builders::DetectFacesOutputBuilder {
36 crate::operation::detect_faces::builders::DetectFacesOutputBuilder::default()
37 }
38}
39
40/// A builder for [`DetectFacesOutput`](crate::operation::detect_faces::DetectFacesOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DetectFacesOutputBuilder {
44 pub(crate) face_details: ::std::option::Option<::std::vec::Vec<crate::types::FaceDetail>>,
45 pub(crate) orientation_correction: ::std::option::Option<crate::types::OrientationCorrection>,
46 _request_id: Option<String>,
47}
48impl DetectFacesOutputBuilder {
49 /// Appends an item to `face_details`.
50 ///
51 /// To override the contents of this collection use [`set_face_details`](Self::set_face_details).
52 ///
53 /// <p>Details of each face found in the image.</p>
54 pub fn face_details(mut self, input: crate::types::FaceDetail) -> Self {
55 let mut v = self.face_details.unwrap_or_default();
56 v.push(input);
57 self.face_details = ::std::option::Option::Some(v);
58 self
59 }
60 /// <p>Details of each face found in the image.</p>
61 pub fn set_face_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FaceDetail>>) -> Self {
62 self.face_details = input;
63 self
64 }
65 /// <p>Details of each face found in the image.</p>
66 pub fn get_face_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FaceDetail>> {
67 &self.face_details
68 }
69 /// <p>The value of <code>OrientationCorrection</code> is always null.</p>
70 /// <p>If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
71 /// <p>Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.</p>
72 pub fn orientation_correction(mut self, input: crate::types::OrientationCorrection) -> Self {
73 self.orientation_correction = ::std::option::Option::Some(input);
74 self
75 }
76 /// <p>The value of <code>OrientationCorrection</code> is always null.</p>
77 /// <p>If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
78 /// <p>Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.</p>
79 pub fn set_orientation_correction(mut self, input: ::std::option::Option<crate::types::OrientationCorrection>) -> Self {
80 self.orientation_correction = input;
81 self
82 }
83 /// <p>The value of <code>OrientationCorrection</code> is always null.</p>
84 /// <p>If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.</p>
85 /// <p>Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.</p>
86 pub fn get_orientation_correction(&self) -> &::std::option::Option<crate::types::OrientationCorrection> {
87 &self.orientation_correction
88 }
89 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
90 self._request_id = Some(request_id.into());
91 self
92 }
93
94 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
95 self._request_id = request_id;
96 self
97 }
98 /// Consumes the builder and constructs a [`DetectFacesOutput`](crate::operation::detect_faces::DetectFacesOutput).
99 pub fn build(self) -> crate::operation::detect_faces::DetectFacesOutput {
100 crate::operation::detect_faces::DetectFacesOutput {
101 face_details: self.face_details,
102 orientation_correction: self.orientation_correction,
103 _request_id: self._request_id,
104 }
105 }
106}