aws_sdk_rekognition/operation/associate_faces/
_associate_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 AssociateFacesOutput {
6    /// <p>An array of AssociatedFace objects containing FaceIDs that have been successfully associated with the UserID. Returned if the AssociateFaces action is successful.</p>
7    pub associated_faces: ::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>>,
8    /// <p>An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully associated along with the reasons. Returned if the AssociateFaces action is successful.</p>
9    pub unsuccessful_face_associations: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>>,
10    /// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
11    pub user_status: ::std::option::Option<crate::types::UserStatus>,
12    _request_id: Option<String>,
13}
14impl AssociateFacesOutput {
15    /// <p>An array of AssociatedFace objects containing FaceIDs that have been successfully associated with the UserID. Returned if the AssociateFaces action is successful.</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 `.associated_faces.is_none()`.
18    pub fn associated_faces(&self) -> &[crate::types::AssociatedFace] {
19        self.associated_faces.as_deref().unwrap_or_default()
20    }
21    /// <p>An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully associated along with the reasons. Returned if the AssociateFaces action is successful.</p>
22    ///
23    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.unsuccessful_face_associations.is_none()`.
24    pub fn unsuccessful_face_associations(&self) -> &[crate::types::UnsuccessfulFaceAssociation] {
25        self.unsuccessful_face_associations.as_deref().unwrap_or_default()
26    }
27    /// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
28    pub fn user_status(&self) -> ::std::option::Option<&crate::types::UserStatus> {
29        self.user_status.as_ref()
30    }
31}
32impl ::aws_types::request_id::RequestId for AssociateFacesOutput {
33    fn request_id(&self) -> Option<&str> {
34        self._request_id.as_deref()
35    }
36}
37impl AssociateFacesOutput {
38    /// Creates a new builder-style object to manufacture [`AssociateFacesOutput`](crate::operation::associate_faces::AssociateFacesOutput).
39    pub fn builder() -> crate::operation::associate_faces::builders::AssociateFacesOutputBuilder {
40        crate::operation::associate_faces::builders::AssociateFacesOutputBuilder::default()
41    }
42}
43
44/// A builder for [`AssociateFacesOutput`](crate::operation::associate_faces::AssociateFacesOutput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct AssociateFacesOutputBuilder {
48    pub(crate) associated_faces: ::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>>,
49    pub(crate) unsuccessful_face_associations: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>>,
50    pub(crate) user_status: ::std::option::Option<crate::types::UserStatus>,
51    _request_id: Option<String>,
52}
53impl AssociateFacesOutputBuilder {
54    /// Appends an item to `associated_faces`.
55    ///
56    /// To override the contents of this collection use [`set_associated_faces`](Self::set_associated_faces).
57    ///
58    /// <p>An array of AssociatedFace objects containing FaceIDs that have been successfully associated with the UserID. Returned if the AssociateFaces action is successful.</p>
59    pub fn associated_faces(mut self, input: crate::types::AssociatedFace) -> Self {
60        let mut v = self.associated_faces.unwrap_or_default();
61        v.push(input);
62        self.associated_faces = ::std::option::Option::Some(v);
63        self
64    }
65    /// <p>An array of AssociatedFace objects containing FaceIDs that have been successfully associated with the UserID. Returned if the AssociateFaces action is successful.</p>
66    pub fn set_associated_faces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>>) -> Self {
67        self.associated_faces = input;
68        self
69    }
70    /// <p>An array of AssociatedFace objects containing FaceIDs that have been successfully associated with the UserID. Returned if the AssociateFaces action is successful.</p>
71    pub fn get_associated_faces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>> {
72        &self.associated_faces
73    }
74    /// Appends an item to `unsuccessful_face_associations`.
75    ///
76    /// To override the contents of this collection use [`set_unsuccessful_face_associations`](Self::set_unsuccessful_face_associations).
77    ///
78    /// <p>An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully associated along with the reasons. Returned if the AssociateFaces action is successful.</p>
79    pub fn unsuccessful_face_associations(mut self, input: crate::types::UnsuccessfulFaceAssociation) -> Self {
80        let mut v = self.unsuccessful_face_associations.unwrap_or_default();
81        v.push(input);
82        self.unsuccessful_face_associations = ::std::option::Option::Some(v);
83        self
84    }
85    /// <p>An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully associated along with the reasons. Returned if the AssociateFaces action is successful.</p>
86    pub fn set_unsuccessful_face_associations(
87        mut self,
88        input: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>>,
89    ) -> Self {
90        self.unsuccessful_face_associations = input;
91        self
92    }
93    /// <p>An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully associated along with the reasons. Returned if the AssociateFaces action is successful.</p>
94    pub fn get_unsuccessful_face_associations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>> {
95        &self.unsuccessful_face_associations
96    }
97    /// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
98    pub fn user_status(mut self, input: crate::types::UserStatus) -> Self {
99        self.user_status = ::std::option::Option::Some(input);
100        self
101    }
102    /// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
103    pub fn set_user_status(mut self, input: ::std::option::Option<crate::types::UserStatus>) -> Self {
104        self.user_status = input;
105        self
106    }
107    /// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
108    pub fn get_user_status(&self) -> &::std::option::Option<crate::types::UserStatus> {
109        &self.user_status
110    }
111    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
112        self._request_id = Some(request_id.into());
113        self
114    }
115
116    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
117        self._request_id = request_id;
118        self
119    }
120    /// Consumes the builder and constructs a [`AssociateFacesOutput`](crate::operation::associate_faces::AssociateFacesOutput).
121    pub fn build(self) -> crate::operation::associate_faces::AssociateFacesOutput {
122        crate::operation::associate_faces::AssociateFacesOutput {
123            associated_faces: self.associated_faces,
124            unsuccessful_face_associations: self.unsuccessful_face_associations,
125            user_status: self.user_status,
126            _request_id: self._request_id,
127        }
128    }
129}