aws_sdk_rekognition/operation/disassociate_faces/
_disassociate_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 DisassociateFacesOutput {
6    /// <p>An array of DissociatedFace objects containing FaceIds that are successfully disassociated with the UserID is returned. Returned if the DisassociatedFaces action is successful.</p>
7    pub disassociated_faces: ::std::option::Option<::std::vec::Vec<crate::types::DisassociatedFace>>,
8    /// <p>An array of UnsuccessfulDisassociation objects containing FaceIds that are not successfully associated, along with the reasons for the failure to associate. Returned if the DisassociateFaces action is successful.</p>
9    pub unsuccessful_face_disassociations: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDisassociation>>,
10    /// <p>The status of an update made to a User. Reflects if the User 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 DisassociateFacesOutput {
15    /// <p>An array of DissociatedFace objects containing FaceIds that are successfully disassociated with the UserID is returned. Returned if the DisassociatedFaces 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 `.disassociated_faces.is_none()`.
18    pub fn disassociated_faces(&self) -> &[crate::types::DisassociatedFace] {
19        self.disassociated_faces.as_deref().unwrap_or_default()
20    }
21    /// <p>An array of UnsuccessfulDisassociation objects containing FaceIds that are not successfully associated, along with the reasons for the failure to associate. Returned if the DisassociateFaces 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_disassociations.is_none()`.
24    pub fn unsuccessful_face_disassociations(&self) -> &[crate::types::UnsuccessfulFaceDisassociation] {
25        self.unsuccessful_face_disassociations.as_deref().unwrap_or_default()
26    }
27    /// <p>The status of an update made to a User. Reflects if the User 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 DisassociateFacesOutput {
33    fn request_id(&self) -> Option<&str> {
34        self._request_id.as_deref()
35    }
36}
37impl DisassociateFacesOutput {
38    /// Creates a new builder-style object to manufacture [`DisassociateFacesOutput`](crate::operation::disassociate_faces::DisassociateFacesOutput).
39    pub fn builder() -> crate::operation::disassociate_faces::builders::DisassociateFacesOutputBuilder {
40        crate::operation::disassociate_faces::builders::DisassociateFacesOutputBuilder::default()
41    }
42}
43
44/// A builder for [`DisassociateFacesOutput`](crate::operation::disassociate_faces::DisassociateFacesOutput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct DisassociateFacesOutputBuilder {
48    pub(crate) disassociated_faces: ::std::option::Option<::std::vec::Vec<crate::types::DisassociatedFace>>,
49    pub(crate) unsuccessful_face_disassociations: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDisassociation>>,
50    pub(crate) user_status: ::std::option::Option<crate::types::UserStatus>,
51    _request_id: Option<String>,
52}
53impl DisassociateFacesOutputBuilder {
54    /// Appends an item to `disassociated_faces`.
55    ///
56    /// To override the contents of this collection use [`set_disassociated_faces`](Self::set_disassociated_faces).
57    ///
58    /// <p>An array of DissociatedFace objects containing FaceIds that are successfully disassociated with the UserID is returned. Returned if the DisassociatedFaces action is successful.</p>
59    pub fn disassociated_faces(mut self, input: crate::types::DisassociatedFace) -> Self {
60        let mut v = self.disassociated_faces.unwrap_or_default();
61        v.push(input);
62        self.disassociated_faces = ::std::option::Option::Some(v);
63        self
64    }
65    /// <p>An array of DissociatedFace objects containing FaceIds that are successfully disassociated with the UserID is returned. Returned if the DisassociatedFaces action is successful.</p>
66    pub fn set_disassociated_faces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DisassociatedFace>>) -> Self {
67        self.disassociated_faces = input;
68        self
69    }
70    /// <p>An array of DissociatedFace objects containing FaceIds that are successfully disassociated with the UserID is returned. Returned if the DisassociatedFaces action is successful.</p>
71    pub fn get_disassociated_faces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DisassociatedFace>> {
72        &self.disassociated_faces
73    }
74    /// Appends an item to `unsuccessful_face_disassociations`.
75    ///
76    /// To override the contents of this collection use [`set_unsuccessful_face_disassociations`](Self::set_unsuccessful_face_disassociations).
77    ///
78    /// <p>An array of UnsuccessfulDisassociation objects containing FaceIds that are not successfully associated, along with the reasons for the failure to associate. Returned if the DisassociateFaces action is successful.</p>
79    pub fn unsuccessful_face_disassociations(mut self, input: crate::types::UnsuccessfulFaceDisassociation) -> Self {
80        let mut v = self.unsuccessful_face_disassociations.unwrap_or_default();
81        v.push(input);
82        self.unsuccessful_face_disassociations = ::std::option::Option::Some(v);
83        self
84    }
85    /// <p>An array of UnsuccessfulDisassociation objects containing FaceIds that are not successfully associated, along with the reasons for the failure to associate. Returned if the DisassociateFaces action is successful.</p>
86    pub fn set_unsuccessful_face_disassociations(
87        mut self,
88        input: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDisassociation>>,
89    ) -> Self {
90        self.unsuccessful_face_disassociations = input;
91        self
92    }
93    /// <p>An array of UnsuccessfulDisassociation objects containing FaceIds that are not successfully associated, along with the reasons for the failure to associate. Returned if the DisassociateFaces action is successful.</p>
94    pub fn get_unsuccessful_face_disassociations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDisassociation>> {
95        &self.unsuccessful_face_disassociations
96    }
97    /// <p>The status of an update made to a User. Reflects if the User 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 User. Reflects if the User 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 User. Reflects if the User 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 [`DisassociateFacesOutput`](crate::operation::disassociate_faces::DisassociateFacesOutput).
121    pub fn build(self) -> crate::operation::disassociate_faces::DisassociateFacesOutput {
122        crate::operation::disassociate_faces::DisassociateFacesOutput {
123            disassociated_faces: self.disassociated_faces,
124            unsuccessful_face_disassociations: self.unsuccessful_face_disassociations,
125            user_status: self.user_status,
126            _request_id: self._request_id,
127        }
128    }
129}