aws-sdk-elasticache 1.110.0

AWS SDK for Amazon ElastiCache
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 ModifyUserGroupOutput {
    /// <p>The ID of the user group.</p>
    pub user_group_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates user group status. Can be "creating", "active", "modifying", "deleting".</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The options are valkey or redis.</p>
    pub engine: ::std::option::Option<::std::string::String>,
    /// <p>The list of user IDs that belong to the user group.</p>
    pub user_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub minimum_engine_version: ::std::option::Option<::std::string::String>,
    /// <p>A list of updates being applied to the user group.</p>
    pub pending_changes: ::std::option::Option<crate::types::UserGroupPendingChanges>,
    /// <p>A list of replication groups that the user group can access.</p>
    pub replication_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
    pub serverless_caches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The Amazon Resource Name (ARN) of the user group.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ModifyUserGroupOutput {
    /// <p>The ID of the user group.</p>
    pub fn user_group_id(&self) -> ::std::option::Option<&str> {
        self.user_group_id.as_deref()
    }
    /// <p>Indicates user group status. Can be "creating", "active", "modifying", "deleting".</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The options are valkey or redis.</p>
    pub fn engine(&self) -> ::std::option::Option<&str> {
        self.engine.as_deref()
    }
    /// <p>The list of user IDs that belong to the user group.</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>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn minimum_engine_version(&self) -> ::std::option::Option<&str> {
        self.minimum_engine_version.as_deref()
    }
    /// <p>A list of updates being applied to the user group.</p>
    pub fn pending_changes(&self) -> ::std::option::Option<&crate::types::UserGroupPendingChanges> {
        self.pending_changes.as_ref()
    }
    /// <p>A list of replication groups that the user group can access.</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 `.replication_groups.is_none()`.
    pub fn replication_groups(&self) -> &[::std::string::String] {
        self.replication_groups.as_deref().unwrap_or_default()
    }
    /// <p>Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only.</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 `.serverless_caches.is_none()`.
    pub fn serverless_caches(&self) -> &[::std::string::String] {
        self.serverless_caches.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name (ARN) of the user group.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ModifyUserGroupOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ModifyUserGroupOutput {
    /// Creates a new builder-style object to manufacture [`ModifyUserGroupOutput`](crate::operation::modify_user_group::ModifyUserGroupOutput).
    pub fn builder() -> crate::operation::modify_user_group::builders::ModifyUserGroupOutputBuilder {
        crate::operation::modify_user_group::builders::ModifyUserGroupOutputBuilder::default()
    }
}

/// A builder for [`ModifyUserGroupOutput`](crate::operation::modify_user_group::ModifyUserGroupOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyUserGroupOutputBuilder {
    pub(crate) user_group_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) engine: ::std::option::Option<::std::string::String>,
    pub(crate) user_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) minimum_engine_version: ::std::option::Option<::std::string::String>,
    pub(crate) pending_changes: ::std::option::Option<crate::types::UserGroupPendingChanges>,
    pub(crate) replication_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) serverless_caches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ModifyUserGroupOutputBuilder {
    /// <p>The ID of the user group.</p>
    pub fn user_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_group_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the user group.</p>
    pub fn set_user_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_group_id = input;
        self
    }
    /// <p>The ID of the user group.</p>
    pub fn get_user_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_group_id
    }
    /// <p>Indicates user group status. Can be "creating", "active", "modifying", "deleting".</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates user group status. Can be "creating", "active", "modifying", "deleting".</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>Indicates user group status. Can be "creating", "active", "modifying", "deleting".</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The options are valkey or redis.</p>
    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The options are valkey or redis.</p>
    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine = input;
        self
    }
    /// <p>The options are valkey or redis.</p>
    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine
    }
    /// Appends an item to `user_ids`.
    ///
    /// To override the contents of this collection use [`set_user_ids`](Self::set_user_ids).
    ///
    /// <p>The list of user IDs that belong to the user group.</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>The list of user IDs that belong to the user group.</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>The list of user IDs that belong to the user group.</p>
    pub fn get_user_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.user_ids
    }
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn minimum_engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.minimum_engine_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn set_minimum_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.minimum_engine_version = input;
        self
    }
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn get_minimum_engine_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.minimum_engine_version
    }
    /// <p>A list of updates being applied to the user group.</p>
    pub fn pending_changes(mut self, input: crate::types::UserGroupPendingChanges) -> Self {
        self.pending_changes = ::std::option::Option::Some(input);
        self
    }
    /// <p>A list of updates being applied to the user group.</p>
    pub fn set_pending_changes(mut self, input: ::std::option::Option<crate::types::UserGroupPendingChanges>) -> Self {
        self.pending_changes = input;
        self
    }
    /// <p>A list of updates being applied to the user group.</p>
    pub fn get_pending_changes(&self) -> &::std::option::Option<crate::types::UserGroupPendingChanges> {
        &self.pending_changes
    }
    /// Appends an item to `replication_groups`.
    ///
    /// To override the contents of this collection use [`set_replication_groups`](Self::set_replication_groups).
    ///
    /// <p>A list of replication groups that the user group can access.</p>
    pub fn replication_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.replication_groups.unwrap_or_default();
        v.push(input.into());
        self.replication_groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of replication groups that the user group can access.</p>
    pub fn set_replication_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.replication_groups = input;
        self
    }
    /// <p>A list of replication groups that the user group can access.</p>
    pub fn get_replication_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.replication_groups
    }
    /// Appends an item to `serverless_caches`.
    ///
    /// To override the contents of this collection use [`set_serverless_caches`](Self::set_serverless_caches).
    ///
    /// <p>Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
    pub fn serverless_caches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.serverless_caches.unwrap_or_default();
        v.push(input.into());
        self.serverless_caches = ::std::option::Option::Some(v);
        self
    }
    /// <p>Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
    pub fn set_serverless_caches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.serverless_caches = input;
        self
    }
    /// <p>Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
    pub fn get_serverless_caches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.serverless_caches
    }
    /// <p>The Amazon Resource Name (ARN) of the user group.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the user group.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the user group.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    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 [`ModifyUserGroupOutput`](crate::operation::modify_user_group::ModifyUserGroupOutput).
    pub fn build(self) -> crate::operation::modify_user_group::ModifyUserGroupOutput {
        crate::operation::modify_user_group::ModifyUserGroupOutput {
            user_group_id: self.user_group_id,
            status: self.status,
            engine: self.engine,
            user_ids: self.user_ids,
            minimum_engine_version: self.minimum_engine_version,
            pending_changes: self.pending_changes,
            replication_groups: self.replication_groups,
            serverless_caches: self.serverless_caches,
            arn: self.arn,
            _request_id: self._request_id,
        }
    }
}