aws_sdk_cognitoidentity/operation/delete_identities/
_delete_identities_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Returned in response to a successful <code>DeleteIdentities</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteIdentitiesOutput {
7    /// <p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
8    pub unprocessed_identity_ids: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedIdentityId>>,
9    _request_id: Option<String>,
10}
11impl DeleteIdentitiesOutput {
12    /// <p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
13    ///
14    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.unprocessed_identity_ids.is_none()`.
15    pub fn unprocessed_identity_ids(&self) -> &[crate::types::UnprocessedIdentityId] {
16        self.unprocessed_identity_ids.as_deref().unwrap_or_default()
17    }
18}
19impl ::aws_types::request_id::RequestId for DeleteIdentitiesOutput {
20    fn request_id(&self) -> Option<&str> {
21        self._request_id.as_deref()
22    }
23}
24impl DeleteIdentitiesOutput {
25    /// Creates a new builder-style object to manufacture [`DeleteIdentitiesOutput`](crate::operation::delete_identities::DeleteIdentitiesOutput).
26    pub fn builder() -> crate::operation::delete_identities::builders::DeleteIdentitiesOutputBuilder {
27        crate::operation::delete_identities::builders::DeleteIdentitiesOutputBuilder::default()
28    }
29}
30
31/// A builder for [`DeleteIdentitiesOutput`](crate::operation::delete_identities::DeleteIdentitiesOutput).
32#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct DeleteIdentitiesOutputBuilder {
35    pub(crate) unprocessed_identity_ids: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedIdentityId>>,
36    _request_id: Option<String>,
37}
38impl DeleteIdentitiesOutputBuilder {
39    /// Appends an item to `unprocessed_identity_ids`.
40    ///
41    /// To override the contents of this collection use [`set_unprocessed_identity_ids`](Self::set_unprocessed_identity_ids).
42    ///
43    /// <p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
44    pub fn unprocessed_identity_ids(mut self, input: crate::types::UnprocessedIdentityId) -> Self {
45        let mut v = self.unprocessed_identity_ids.unwrap_or_default();
46        v.push(input);
47        self.unprocessed_identity_ids = ::std::option::Option::Some(v);
48        self
49    }
50    /// <p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
51    pub fn set_unprocessed_identity_ids(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedIdentityId>>) -> Self {
52        self.unprocessed_identity_ids = input;
53        self
54    }
55    /// <p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
56    pub fn get_unprocessed_identity_ids(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnprocessedIdentityId>> {
57        &self.unprocessed_identity_ids
58    }
59    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
60        self._request_id = Some(request_id.into());
61        self
62    }
63
64    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
65        self._request_id = request_id;
66        self
67    }
68    /// Consumes the builder and constructs a [`DeleteIdentitiesOutput`](crate::operation::delete_identities::DeleteIdentitiesOutput).
69    pub fn build(self) -> crate::operation::delete_identities::DeleteIdentitiesOutput {
70        crate::operation::delete_identities::DeleteIdentitiesOutput {
71            unprocessed_identity_ids: self.unprocessed_identity_ids,
72            _request_id: self._request_id,
73        }
74    }
75}