/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace ElastiCache { namespace Model { /** */ class DecreaseNodeGroupsInGlobalReplicationGroupRequest : public ElastiCacheRequest { public: AWS_ELASTICACHE_API DecreaseNodeGroupsInGlobalReplicationGroupRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "DecreaseNodeGroupsInGlobalReplicationGroup"; } AWS_ELASTICACHE_API Aws::String SerializePayload() const override; protected: AWS_ELASTICACHE_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the Global datastore

*/ inline const Aws::String& GetGlobalReplicationGroupId() const{ return m_globalReplicationGroupId; } /** *

The name of the Global datastore

*/ inline bool GlobalReplicationGroupIdHasBeenSet() const { return m_globalReplicationGroupIdHasBeenSet; } /** *

The name of the Global datastore

*/ inline void SetGlobalReplicationGroupId(const Aws::String& value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId = value; } /** *

The name of the Global datastore

*/ inline void SetGlobalReplicationGroupId(Aws::String&& value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId = std::move(value); } /** *

The name of the Global datastore

*/ inline void SetGlobalReplicationGroupId(const char* value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId.assign(value); } /** *

The name of the Global datastore

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalReplicationGroupId(const Aws::String& value) { SetGlobalReplicationGroupId(value); return *this;} /** *

The name of the Global datastore

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalReplicationGroupId(Aws::String&& value) { SetGlobalReplicationGroupId(std::move(value)); return *this;} /** *

The name of the Global datastore

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalReplicationGroupId(const char* value) { SetGlobalReplicationGroupId(value); return *this;} /** *

The number of node groups (shards) that results from the modification of the * shard configuration

*/ inline int GetNodeGroupCount() const{ return m_nodeGroupCount; } /** *

The number of node groups (shards) that results from the modification of the * shard configuration

*/ inline bool NodeGroupCountHasBeenSet() const { return m_nodeGroupCountHasBeenSet; } /** *

The number of node groups (shards) that results from the modification of the * shard configuration

*/ inline void SetNodeGroupCount(int value) { m_nodeGroupCountHasBeenSet = true; m_nodeGroupCount = value; } /** *

The number of node groups (shards) that results from the modification of the * shard configuration

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithNodeGroupCount(int value) { SetNodeGroupCount(value); return *this;} /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline const Aws::Vector& GetGlobalNodeGroupsToRemove() const{ return m_globalNodeGroupsToRemove; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline bool GlobalNodeGroupsToRemoveHasBeenSet() const { return m_globalNodeGroupsToRemoveHasBeenSet; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline void SetGlobalNodeGroupsToRemove(const Aws::Vector& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove = value; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline void SetGlobalNodeGroupsToRemove(Aws::Vector&& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove = std::move(value); } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRemove(const Aws::Vector& value) { SetGlobalNodeGroupsToRemove(value); return *this;} /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRemove(Aws::Vector&& value) { SetGlobalNodeGroupsToRemove(std::move(value)); return *this;} /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRemove(const Aws::String& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove.push_back(value); return *this; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRemove(Aws::String&& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove.push_back(std::move(value)); return *this; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. * ElastiCache for Redis will attempt to remove all node groups listed by * GlobalNodeGroupsToRemove from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRemove(const char* value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove.push_back(value); return *this; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline const Aws::Vector& GetGlobalNodeGroupsToRetain() const{ return m_globalNodeGroupsToRetain; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline bool GlobalNodeGroupsToRetainHasBeenSet() const { return m_globalNodeGroupsToRetainHasBeenSet; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline void SetGlobalNodeGroupsToRetain(const Aws::Vector& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain = value; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline void SetGlobalNodeGroupsToRetain(Aws::Vector&& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain = std::move(value); } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRetain(const Aws::Vector& value) { SetGlobalNodeGroupsToRetain(value); return *this;} /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRetain(Aws::Vector&& value) { SetGlobalNodeGroupsToRetain(std::move(value)); return *this;} /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRetain(const Aws::String& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain.push_back(value); return *this; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRetain(Aws::String&& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain.push_back(std::move(value)); return *this; } /** *

If the value of NodeGroupCount is less than the current number of node groups * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. * ElastiCache for Redis will attempt to retain all node groups listed by * GlobalNodeGroupsToRetain from the cluster.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRetain(const char* value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain.push_back(value); return *this; } /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*/ inline bool GetApplyImmediately() const{ return m_applyImmediately; } /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*/ inline bool ApplyImmediatelyHasBeenSet() const { return m_applyImmediatelyHasBeenSet; } /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*/ inline void SetApplyImmediately(bool value) { m_applyImmediatelyHasBeenSet = true; m_applyImmediately = value; } /** *

Indicates that the shard reconfiguration process begins immediately. At * present, the only permitted value for this parameter is true.

*/ inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithApplyImmediately(bool value) { SetApplyImmediately(value); return *this;} private: Aws::String m_globalReplicationGroupId; bool m_globalReplicationGroupIdHasBeenSet = false; int m_nodeGroupCount; bool m_nodeGroupCountHasBeenSet = false; Aws::Vector m_globalNodeGroupsToRemove; bool m_globalNodeGroupsToRemoveHasBeenSet = false; Aws::Vector m_globalNodeGroupsToRetain; bool m_globalNodeGroupsToRetainHasBeenSet = false; bool m_applyImmediately; bool m_applyImmediatelyHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws