aws_sdk_rekognition/operation/delete_faces/
_delete_faces_input.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 DeleteFacesInput {
6    /// <p>Collection from which to remove the specific faces.</p>
7    pub collection_id: ::std::option::Option<::std::string::String>,
8    /// <p>An array of face IDs to delete.</p>
9    pub face_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10}
11impl DeleteFacesInput {
12    /// <p>Collection from which to remove the specific faces.</p>
13    pub fn collection_id(&self) -> ::std::option::Option<&str> {
14        self.collection_id.as_deref()
15    }
16    /// <p>An array of face IDs to delete.</p>
17    ///
18    /// 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_ids.is_none()`.
19    pub fn face_ids(&self) -> &[::std::string::String] {
20        self.face_ids.as_deref().unwrap_or_default()
21    }
22}
23impl DeleteFacesInput {
24    /// Creates a new builder-style object to manufacture [`DeleteFacesInput`](crate::operation::delete_faces::DeleteFacesInput).
25    pub fn builder() -> crate::operation::delete_faces::builders::DeleteFacesInputBuilder {
26        crate::operation::delete_faces::builders::DeleteFacesInputBuilder::default()
27    }
28}
29
30/// A builder for [`DeleteFacesInput`](crate::operation::delete_faces::DeleteFacesInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DeleteFacesInputBuilder {
34    pub(crate) collection_id: ::std::option::Option<::std::string::String>,
35    pub(crate) face_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
36}
37impl DeleteFacesInputBuilder {
38    /// <p>Collection from which to remove the specific faces.</p>
39    /// This field is required.
40    pub fn collection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.collection_id = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <p>Collection from which to remove the specific faces.</p>
45    pub fn set_collection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46        self.collection_id = input;
47        self
48    }
49    /// <p>Collection from which to remove the specific faces.</p>
50    pub fn get_collection_id(&self) -> &::std::option::Option<::std::string::String> {
51        &self.collection_id
52    }
53    /// Appends an item to `face_ids`.
54    ///
55    /// To override the contents of this collection use [`set_face_ids`](Self::set_face_ids).
56    ///
57    /// <p>An array of face IDs to delete.</p>
58    pub fn face_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        let mut v = self.face_ids.unwrap_or_default();
60        v.push(input.into());
61        self.face_ids = ::std::option::Option::Some(v);
62        self
63    }
64    /// <p>An array of face IDs to delete.</p>
65    pub fn set_face_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
66        self.face_ids = input;
67        self
68    }
69    /// <p>An array of face IDs to delete.</p>
70    pub fn get_face_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
71        &self.face_ids
72    }
73    /// Consumes the builder and constructs a [`DeleteFacesInput`](crate::operation::delete_faces::DeleteFacesInput).
74    pub fn build(self) -> ::std::result::Result<crate::operation::delete_faces::DeleteFacesInput, ::aws_smithy_types::error::operation::BuildError> {
75        ::std::result::Result::Ok(crate::operation::delete_faces::DeleteFacesInput {
76            collection_id: self.collection_id,
77            face_ids: self.face_ids,
78        })
79    }
80}