aws_sdk_rekognition/operation/delete_faces/
_delete_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 DeleteFacesOutput {
6    /// <p>An array of strings (face IDs) of the faces that were deleted.</p>
7    pub deleted_faces: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>An array of any faces that weren't deleted.</p>
9    pub unsuccessful_face_deletions: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDeletion>>,
10    _request_id: Option<String>,
11}
12impl DeleteFacesOutput {
13    /// <p>An array of strings (face IDs) of the faces that were deleted.</p>
14    ///
15    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.deleted_faces.is_none()`.
16    pub fn deleted_faces(&self) -> &[::std::string::String] {
17        self.deleted_faces.as_deref().unwrap_or_default()
18    }
19    /// <p>An array of any faces that weren't deleted.</p>
20    ///
21    /// 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_deletions.is_none()`.
22    pub fn unsuccessful_face_deletions(&self) -> &[crate::types::UnsuccessfulFaceDeletion] {
23        self.unsuccessful_face_deletions.as_deref().unwrap_or_default()
24    }
25}
26impl ::aws_types::request_id::RequestId for DeleteFacesOutput {
27    fn request_id(&self) -> Option<&str> {
28        self._request_id.as_deref()
29    }
30}
31impl DeleteFacesOutput {
32    /// Creates a new builder-style object to manufacture [`DeleteFacesOutput`](crate::operation::delete_faces::DeleteFacesOutput).
33    pub fn builder() -> crate::operation::delete_faces::builders::DeleteFacesOutputBuilder {
34        crate::operation::delete_faces::builders::DeleteFacesOutputBuilder::default()
35    }
36}
37
38/// A builder for [`DeleteFacesOutput`](crate::operation::delete_faces::DeleteFacesOutput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DeleteFacesOutputBuilder {
42    pub(crate) deleted_faces: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43    pub(crate) unsuccessful_face_deletions: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDeletion>>,
44    _request_id: Option<String>,
45}
46impl DeleteFacesOutputBuilder {
47    /// Appends an item to `deleted_faces`.
48    ///
49    /// To override the contents of this collection use [`set_deleted_faces`](Self::set_deleted_faces).
50    ///
51    /// <p>An array of strings (face IDs) of the faces that were deleted.</p>
52    pub fn deleted_faces(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        let mut v = self.deleted_faces.unwrap_or_default();
54        v.push(input.into());
55        self.deleted_faces = ::std::option::Option::Some(v);
56        self
57    }
58    /// <p>An array of strings (face IDs) of the faces that were deleted.</p>
59    pub fn set_deleted_faces(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
60        self.deleted_faces = input;
61        self
62    }
63    /// <p>An array of strings (face IDs) of the faces that were deleted.</p>
64    pub fn get_deleted_faces(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
65        &self.deleted_faces
66    }
67    /// Appends an item to `unsuccessful_face_deletions`.
68    ///
69    /// To override the contents of this collection use [`set_unsuccessful_face_deletions`](Self::set_unsuccessful_face_deletions).
70    ///
71    /// <p>An array of any faces that weren't deleted.</p>
72    pub fn unsuccessful_face_deletions(mut self, input: crate::types::UnsuccessfulFaceDeletion) -> Self {
73        let mut v = self.unsuccessful_face_deletions.unwrap_or_default();
74        v.push(input);
75        self.unsuccessful_face_deletions = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>An array of any faces that weren't deleted.</p>
79    pub fn set_unsuccessful_face_deletions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDeletion>>) -> Self {
80        self.unsuccessful_face_deletions = input;
81        self
82    }
83    /// <p>An array of any faces that weren't deleted.</p>
84    pub fn get_unsuccessful_face_deletions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceDeletion>> {
85        &self.unsuccessful_face_deletions
86    }
87    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
88        self._request_id = Some(request_id.into());
89        self
90    }
91
92    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
93        self._request_id = request_id;
94        self
95    }
96    /// Consumes the builder and constructs a [`DeleteFacesOutput`](crate::operation::delete_faces::DeleteFacesOutput).
97    pub fn build(self) -> crate::operation::delete_faces::DeleteFacesOutput {
98        crate::operation::delete_faces::DeleteFacesOutput {
99            deleted_faces: self.deleted_faces,
100            unsuccessful_face_deletions: self.unsuccessful_face_deletions,
101            _request_id: self._request_id,
102        }
103    }
104}