aws-sdk-wickr 1.8.0

AWS SDK for AWS Wickr Admin API
Documentation
// 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 BatchDeleteUserInput {
    /// <p>The ID of the Wickr network from which users will be deleted.</p>
    pub network_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of user IDs identifying the users to be deleted from the network. Maximum 50 users per batch request.</p>
    pub user_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A unique identifier for this request to ensure idempotency. If you retry a request with the same client token, the service will return the same response without attempting to delete users again.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl BatchDeleteUserInput {
    /// <p>The ID of the Wickr network from which users will be deleted.</p>
    pub fn network_id(&self) -> ::std::option::Option<&str> {
        self.network_id.as_deref()
    }
    /// <p>A list of user IDs identifying the users to be deleted from the network. Maximum 50 users per batch request.</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 `.user_ids.is_none()`.
    pub fn user_ids(&self) -> &[::std::string::String] {
        self.user_ids.as_deref().unwrap_or_default()
    }
    /// <p>A unique identifier for this request to ensure idempotency. If you retry a request with the same client token, the service will return the same response without attempting to delete users again.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl BatchDeleteUserInput {
    /// Creates a new builder-style object to manufacture [`BatchDeleteUserInput`](crate::operation::batch_delete_user::BatchDeleteUserInput).
    pub fn builder() -> crate::operation::batch_delete_user::builders::BatchDeleteUserInputBuilder {
        crate::operation::batch_delete_user::builders::BatchDeleteUserInputBuilder::default()
    }
}

/// A builder for [`BatchDeleteUserInput`](crate::operation::batch_delete_user::BatchDeleteUserInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchDeleteUserInputBuilder {
    pub(crate) network_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl BatchDeleteUserInputBuilder {
    /// <p>The ID of the Wickr network from which users will be deleted.</p>
    /// This field is required.
    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Wickr network from which users will be deleted.</p>
    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_id = input;
        self
    }
    /// <p>The ID of the Wickr network from which users will be deleted.</p>
    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_id
    }
    /// Appends an item to `user_ids`.
    ///
    /// To override the contents of this collection use [`set_user_ids`](Self::set_user_ids).
    ///
    /// <p>A list of user IDs identifying the users to be deleted from the network. Maximum 50 users per batch request.</p>
    pub fn user_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.user_ids.unwrap_or_default();
        v.push(input.into());
        self.user_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of user IDs identifying the users to be deleted from the network. Maximum 50 users per batch request.</p>
    pub fn set_user_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.user_ids = input;
        self
    }
    /// <p>A list of user IDs identifying the users to be deleted from the network. Maximum 50 users per batch request.</p>
    pub fn get_user_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.user_ids
    }
    /// <p>A unique identifier for this request to ensure idempotency. If you retry a request with the same client token, the service will return the same response without attempting to delete users again.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for this request to ensure idempotency. If you retry a request with the same client token, the service will return the same response without attempting to delete users again.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique identifier for this request to ensure idempotency. If you retry a request with the same client token, the service will return the same response without attempting to delete users again.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`BatchDeleteUserInput`](crate::operation::batch_delete_user::BatchDeleteUserInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_delete_user::BatchDeleteUserInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_delete_user::BatchDeleteUserInput {
            network_id: self.network_id,
            user_ids: self.user_ids,
            client_token: self.client_token,
        })
    }
}