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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the face properties such as the bounding box, face ID, image ID of the input image, and external image ID that you assigned. </p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Face {
    /// <p>Unique identifier that Amazon Rekognition assigns to the face.</p>
    pub face_id: ::std::option::Option<::std::string::String>,
    /// <p>Bounding box of the face.</p>
    pub bounding_box: ::std::option::Option<crate::types::BoundingBox>,
    /// <p>Unique identifier that Amazon Rekognition assigns to the input image.</p>
    pub image_id: ::std::option::Option<::std::string::String>,
    /// <p>Identifier that you assign to all the faces in the input image.</p>
    pub external_image_id: ::std::option::Option<::std::string::String>,
    /// <p>Confidence level that the bounding box contains a face (and not a different object such as a tree).</p>
    pub confidence: ::std::option::Option<f32>,
    /// <p> The version of the face detect and storage model that was used when indexing the face vector. </p>
    pub index_faces_model_version: ::std::option::Option<::std::string::String>,
    /// <p>Unique identifier assigned to the user.</p>
    pub user_id: ::std::option::Option<::std::string::String>,
}
impl Face {
    /// <p>Unique identifier that Amazon Rekognition assigns to the face.</p>
    pub fn face_id(&self) -> ::std::option::Option<&str> {
        self.face_id.as_deref()
    }
    /// <p>Bounding box of the face.</p>
    pub fn bounding_box(&self) -> ::std::option::Option<&crate::types::BoundingBox> {
        self.bounding_box.as_ref()
    }
    /// <p>Unique identifier that Amazon Rekognition assigns to the input image.</p>
    pub fn image_id(&self) -> ::std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>Identifier that you assign to all the faces in the input image.</p>
    pub fn external_image_id(&self) -> ::std::option::Option<&str> {
        self.external_image_id.as_deref()
    }
    /// <p>Confidence level that the bounding box contains a face (and not a different object such as a tree).</p>
    pub fn confidence(&self) -> ::std::option::Option<f32> {
        self.confidence
    }
    /// <p> The version of the face detect and storage model that was used when indexing the face vector. </p>
    pub fn index_faces_model_version(&self) -> ::std::option::Option<&str> {
        self.index_faces_model_version.as_deref()
    }
    /// <p>Unique identifier assigned to the user.</p>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
impl Face {
    /// Creates a new builder-style object to manufacture [`Face`](crate::types::Face).
    pub fn builder() -> crate::types::builders::FaceBuilder {
        crate::types::builders::FaceBuilder::default()
    }
}

/// A builder for [`Face`](crate::types::Face).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct FaceBuilder {
    pub(crate) face_id: ::std::option::Option<::std::string::String>,
    pub(crate) bounding_box: ::std::option::Option<crate::types::BoundingBox>,
    pub(crate) image_id: ::std::option::Option<::std::string::String>,
    pub(crate) external_image_id: ::std::option::Option<::std::string::String>,
    pub(crate) confidence: ::std::option::Option<f32>,
    pub(crate) index_faces_model_version: ::std::option::Option<::std::string::String>,
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
}
impl FaceBuilder {
    /// <p>Unique identifier that Amazon Rekognition assigns to the face.</p>
    pub fn face_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.face_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique identifier that Amazon Rekognition assigns to the face.</p>
    pub fn set_face_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.face_id = input;
        self
    }
    /// <p>Unique identifier that Amazon Rekognition assigns to the face.</p>
    pub fn get_face_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.face_id
    }
    /// <p>Bounding box of the face.</p>
    pub fn bounding_box(mut self, input: crate::types::BoundingBox) -> Self {
        self.bounding_box = ::std::option::Option::Some(input);
        self
    }
    /// <p>Bounding box of the face.</p>
    pub fn set_bounding_box(mut self, input: ::std::option::Option<crate::types::BoundingBox>) -> Self {
        self.bounding_box = input;
        self
    }
    /// <p>Bounding box of the face.</p>
    pub fn get_bounding_box(&self) -> &::std::option::Option<crate::types::BoundingBox> {
        &self.bounding_box
    }
    /// <p>Unique identifier that Amazon Rekognition assigns to the input image.</p>
    pub fn image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.image_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique identifier that Amazon Rekognition assigns to the input image.</p>
    pub fn set_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.image_id = input;
        self
    }
    /// <p>Unique identifier that Amazon Rekognition assigns to the input image.</p>
    pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.image_id
    }
    /// <p>Identifier that you assign to all the faces in the input image.</p>
    pub fn external_image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.external_image_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Identifier that you assign to all the faces in the input image.</p>
    pub fn set_external_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.external_image_id = input;
        self
    }
    /// <p>Identifier that you assign to all the faces in the input image.</p>
    pub fn get_external_image_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.external_image_id
    }
    /// <p>Confidence level that the bounding box contains a face (and not a different object such as a tree).</p>
    pub fn confidence(mut self, input: f32) -> Self {
        self.confidence = ::std::option::Option::Some(input);
        self
    }
    /// <p>Confidence level that the bounding box contains a face (and not a different object such as a tree).</p>
    pub fn set_confidence(mut self, input: ::std::option::Option<f32>) -> Self {
        self.confidence = input;
        self
    }
    /// <p>Confidence level that the bounding box contains a face (and not a different object such as a tree).</p>
    pub fn get_confidence(&self) -> &::std::option::Option<f32> {
        &self.confidence
    }
    /// <p> The version of the face detect and storage model that was used when indexing the face vector. </p>
    pub fn index_faces_model_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.index_faces_model_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p> The version of the face detect and storage model that was used when indexing the face vector. </p>
    pub fn set_index_faces_model_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.index_faces_model_version = input;
        self
    }
    /// <p> The version of the face detect and storage model that was used when indexing the face vector. </p>
    pub fn get_index_faces_model_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.index_faces_model_version
    }
    /// <p>Unique identifier assigned to the user.</p>
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique identifier assigned to the user.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>Unique identifier assigned to the user.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// Consumes the builder and constructs a [`Face`](crate::types::Face).
    pub fn build(self) -> crate::types::Face {
        crate::types::Face {
            face_id: self.face_id,
            bounding_box: self.bounding_box,
            image_id: self.image_id,
            external_image_id: self.external_image_id,
            confidence: self.confidence,
            index_faces_model_version: self.index_faces_model_version,
            user_id: self.user_id,
        }
    }
}