aws_sdk_cognitoidentity/operation/delete_identities/
_delete_identities_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Input to the <code>DeleteIdentities</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteIdentitiesInput {
7    /// <p>A list of 1-60 identities that you want to delete.</p>
8    pub identity_ids_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
9}
10impl DeleteIdentitiesInput {
11    /// <p>A list of 1-60 identities that you want to delete.</p>
12    ///
13    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.identity_ids_to_delete.is_none()`.
14    pub fn identity_ids_to_delete(&self) -> &[::std::string::String] {
15        self.identity_ids_to_delete.as_deref().unwrap_or_default()
16    }
17}
18impl DeleteIdentitiesInput {
19    /// Creates a new builder-style object to manufacture [`DeleteIdentitiesInput`](crate::operation::delete_identities::DeleteIdentitiesInput).
20    pub fn builder() -> crate::operation::delete_identities::builders::DeleteIdentitiesInputBuilder {
21        crate::operation::delete_identities::builders::DeleteIdentitiesInputBuilder::default()
22    }
23}
24
25/// A builder for [`DeleteIdentitiesInput`](crate::operation::delete_identities::DeleteIdentitiesInput).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct DeleteIdentitiesInputBuilder {
29    pub(crate) identity_ids_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30}
31impl DeleteIdentitiesInputBuilder {
32    /// Appends an item to `identity_ids_to_delete`.
33    ///
34    /// To override the contents of this collection use [`set_identity_ids_to_delete`](Self::set_identity_ids_to_delete).
35    ///
36    /// <p>A list of 1-60 identities that you want to delete.</p>
37    pub fn identity_ids_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        let mut v = self.identity_ids_to_delete.unwrap_or_default();
39        v.push(input.into());
40        self.identity_ids_to_delete = ::std::option::Option::Some(v);
41        self
42    }
43    /// <p>A list of 1-60 identities that you want to delete.</p>
44    pub fn set_identity_ids_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
45        self.identity_ids_to_delete = input;
46        self
47    }
48    /// <p>A list of 1-60 identities that you want to delete.</p>
49    pub fn get_identity_ids_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
50        &self.identity_ids_to_delete
51    }
52    /// Consumes the builder and constructs a [`DeleteIdentitiesInput`](crate::operation::delete_identities::DeleteIdentitiesInput).
53    pub fn build(
54        self,
55    ) -> ::std::result::Result<crate::operation::delete_identities::DeleteIdentitiesInput, ::aws_smithy_types::error::operation::BuildError> {
56        ::std::result::Result::Ok(crate::operation::delete_identities::DeleteIdentitiesInput {
57            identity_ids_to_delete: self.identity_ids_to_delete,
58        })
59    }
60}