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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateFacesOutput {
/// <p>An array of AssociatedFace objects containing FaceIDs that are successfully associated with the UserID is returned. Returned if the AssociateFaces action is successful.</p>
pub associated_faces: ::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>>,
/// <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>
pub unsuccessful_face_associations: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>>,
/// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
pub user_status: ::std::option::Option<crate::types::UserStatus>,
_request_id: Option<String>,
}
impl AssociateFacesOutput {
/// <p>An array of AssociatedFace objects containing FaceIDs that are successfully associated with the UserID is returned. Returned if the AssociateFaces action is successful.</p>
///
/// 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()`.
pub fn associated_faces(&self) -> &[crate::types::AssociatedFace] {
self.associated_faces.as_deref().unwrap_or_default()
}
/// <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>
///
/// 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()`.
pub fn unsuccessful_face_associations(&self) -> &[crate::types::UnsuccessfulFaceAssociation] {
self.unsuccessful_face_associations.as_deref().unwrap_or_default()
}
/// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
pub fn user_status(&self) -> ::std::option::Option<&crate::types::UserStatus> {
self.user_status.as_ref()
}
}
impl ::aws_types::request_id::RequestId for AssociateFacesOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl AssociateFacesOutput {
/// Creates a new builder-style object to manufacture [`AssociateFacesOutput`](crate::operation::associate_faces::AssociateFacesOutput).
pub fn builder() -> crate::operation::associate_faces::builders::AssociateFacesOutputBuilder {
crate::operation::associate_faces::builders::AssociateFacesOutputBuilder::default()
}
}
/// A builder for [`AssociateFacesOutput`](crate::operation::associate_faces::AssociateFacesOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssociateFacesOutputBuilder {
pub(crate) associated_faces: ::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>>,
pub(crate) unsuccessful_face_associations: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>>,
pub(crate) user_status: ::std::option::Option<crate::types::UserStatus>,
_request_id: Option<String>,
}
impl AssociateFacesOutputBuilder {
/// Appends an item to `associated_faces`.
///
/// To override the contents of this collection use [`set_associated_faces`](Self::set_associated_faces).
///
/// <p>An array of AssociatedFace objects containing FaceIDs that are successfully associated with the UserID is returned. Returned if the AssociateFaces action is successful.</p>
pub fn associated_faces(mut self, input: crate::types::AssociatedFace) -> Self {
let mut v = self.associated_faces.unwrap_or_default();
v.push(input);
self.associated_faces = ::std::option::Option::Some(v);
self
}
/// <p>An array of AssociatedFace objects containing FaceIDs that are successfully associated with the UserID is returned. Returned if the AssociateFaces action is successful.</p>
pub fn set_associated_faces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>>) -> Self {
self.associated_faces = input;
self
}
/// <p>An array of AssociatedFace objects containing FaceIDs that are successfully associated with the UserID is returned. Returned if the AssociateFaces action is successful.</p>
pub fn get_associated_faces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssociatedFace>> {
&self.associated_faces
}
/// Appends an item to `unsuccessful_face_associations`.
///
/// To override the contents of this collection use [`set_unsuccessful_face_associations`](Self::set_unsuccessful_face_associations).
///
/// <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>
pub fn unsuccessful_face_associations(mut self, input: crate::types::UnsuccessfulFaceAssociation) -> Self {
let mut v = self.unsuccessful_face_associations.unwrap_or_default();
v.push(input);
self.unsuccessful_face_associations = ::std::option::Option::Some(v);
self
}
/// <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>
pub fn set_unsuccessful_face_associations(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>>,
) -> Self {
self.unsuccessful_face_associations = input;
self
}
/// <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>
pub fn get_unsuccessful_face_associations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulFaceAssociation>> {
&self.unsuccessful_face_associations
}
/// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
pub fn user_status(mut self, input: crate::types::UserStatus) -> Self {
self.user_status = ::std::option::Option::Some(input);
self
}
/// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
pub fn set_user_status(mut self, input: ::std::option::Option<crate::types::UserStatus>) -> Self {
self.user_status = input;
self
}
/// <p>The status of an update made to a UserID. Reflects if the UserID has been updated for every requested change.</p>
pub fn get_user_status(&self) -> &::std::option::Option<crate::types::UserStatus> {
&self.user_status
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`AssociateFacesOutput`](crate::operation::associate_faces::AssociateFacesOutput).
pub fn build(self) -> crate::operation::associate_faces::AssociateFacesOutput {
crate::operation::associate_faces::AssociateFacesOutput {
associated_faces: self.associated_faces,
unsuccessful_face_associations: self.unsuccessful_face_associations,
user_status: self.user_status,
_request_id: self._request_id,
}
}
}