1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/elasticache/ElastiCache_EXPORTS.h> 8 #include <aws/elasticache/ElastiCacheRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace ElastiCache 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_ELASTICACHE_API DecreaseNodeGroupsInGlobalReplicationGroupRequest : public ElastiCacheRequest 23 { 24 public: 25 DecreaseNodeGroupsInGlobalReplicationGroupRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "DecreaseNodeGroupsInGlobalReplicationGroup"; } 32 33 Aws::String SerializePayload() const override; 34 35 protected: 36 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 37 38 public: 39 40 /** 41 * <p>The name of the Global datastore</p> 42 */ GetGlobalReplicationGroupId()43 inline const Aws::String& GetGlobalReplicationGroupId() const{ return m_globalReplicationGroupId; } 44 45 /** 46 * <p>The name of the Global datastore</p> 47 */ GlobalReplicationGroupIdHasBeenSet()48 inline bool GlobalReplicationGroupIdHasBeenSet() const { return m_globalReplicationGroupIdHasBeenSet; } 49 50 /** 51 * <p>The name of the Global datastore</p> 52 */ SetGlobalReplicationGroupId(const Aws::String & value)53 inline void SetGlobalReplicationGroupId(const Aws::String& value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId = value; } 54 55 /** 56 * <p>The name of the Global datastore</p> 57 */ SetGlobalReplicationGroupId(Aws::String && value)58 inline void SetGlobalReplicationGroupId(Aws::String&& value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId = std::move(value); } 59 60 /** 61 * <p>The name of the Global datastore</p> 62 */ SetGlobalReplicationGroupId(const char * value)63 inline void SetGlobalReplicationGroupId(const char* value) { m_globalReplicationGroupIdHasBeenSet = true; m_globalReplicationGroupId.assign(value); } 64 65 /** 66 * <p>The name of the Global datastore</p> 67 */ WithGlobalReplicationGroupId(const Aws::String & value)68 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalReplicationGroupId(const Aws::String& value) { SetGlobalReplicationGroupId(value); return *this;} 69 70 /** 71 * <p>The name of the Global datastore</p> 72 */ WithGlobalReplicationGroupId(Aws::String && value)73 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalReplicationGroupId(Aws::String&& value) { SetGlobalReplicationGroupId(std::move(value)); return *this;} 74 75 /** 76 * <p>The name of the Global datastore</p> 77 */ WithGlobalReplicationGroupId(const char * value)78 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalReplicationGroupId(const char* value) { SetGlobalReplicationGroupId(value); return *this;} 79 80 81 /** 82 * <p>The number of node groups (shards) that results from the modification of the 83 * shard configuration</p> 84 */ GetNodeGroupCount()85 inline int GetNodeGroupCount() const{ return m_nodeGroupCount; } 86 87 /** 88 * <p>The number of node groups (shards) that results from the modification of the 89 * shard configuration</p> 90 */ NodeGroupCountHasBeenSet()91 inline bool NodeGroupCountHasBeenSet() const { return m_nodeGroupCountHasBeenSet; } 92 93 /** 94 * <p>The number of node groups (shards) that results from the modification of the 95 * shard configuration</p> 96 */ SetNodeGroupCount(int value)97 inline void SetNodeGroupCount(int value) { m_nodeGroupCountHasBeenSet = true; m_nodeGroupCount = value; } 98 99 /** 100 * <p>The number of node groups (shards) that results from the modification of the 101 * shard configuration</p> 102 */ WithNodeGroupCount(int value)103 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithNodeGroupCount(int value) { SetNodeGroupCount(value); return *this;} 104 105 106 /** 107 * <p>If the value of NodeGroupCount is less than the current number of node groups 108 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 109 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 110 * ElastiCache for Redis will attempt to remove all node groups listed by 111 * GlobalNodeGroupsToRemove from the cluster. </p> 112 */ GetGlobalNodeGroupsToRemove()113 inline const Aws::Vector<Aws::String>& GetGlobalNodeGroupsToRemove() const{ return m_globalNodeGroupsToRemove; } 114 115 /** 116 * <p>If the value of NodeGroupCount is less than the current number of node groups 117 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 118 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 119 * ElastiCache for Redis will attempt to remove all node groups listed by 120 * GlobalNodeGroupsToRemove from the cluster. </p> 121 */ GlobalNodeGroupsToRemoveHasBeenSet()122 inline bool GlobalNodeGroupsToRemoveHasBeenSet() const { return m_globalNodeGroupsToRemoveHasBeenSet; } 123 124 /** 125 * <p>If the value of NodeGroupCount is less than the current number of node groups 126 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 127 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 128 * ElastiCache for Redis will attempt to remove all node groups listed by 129 * GlobalNodeGroupsToRemove from the cluster. </p> 130 */ SetGlobalNodeGroupsToRemove(const Aws::Vector<Aws::String> & value)131 inline void SetGlobalNodeGroupsToRemove(const Aws::Vector<Aws::String>& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove = value; } 132 133 /** 134 * <p>If the value of NodeGroupCount is less than the current number of node groups 135 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 136 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 137 * ElastiCache for Redis will attempt to remove all node groups listed by 138 * GlobalNodeGroupsToRemove from the cluster. </p> 139 */ SetGlobalNodeGroupsToRemove(Aws::Vector<Aws::String> && value)140 inline void SetGlobalNodeGroupsToRemove(Aws::Vector<Aws::String>&& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove = std::move(value); } 141 142 /** 143 * <p>If the value of NodeGroupCount is less than the current number of node groups 144 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 145 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 146 * ElastiCache for Redis will attempt to remove all node groups listed by 147 * GlobalNodeGroupsToRemove from the cluster. </p> 148 */ WithGlobalNodeGroupsToRemove(const Aws::Vector<Aws::String> & value)149 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRemove(const Aws::Vector<Aws::String>& value) { SetGlobalNodeGroupsToRemove(value); return *this;} 150 151 /** 152 * <p>If the value of NodeGroupCount is less than the current number of node groups 153 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 154 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 155 * ElastiCache for Redis will attempt to remove all node groups listed by 156 * GlobalNodeGroupsToRemove from the cluster. </p> 157 */ WithGlobalNodeGroupsToRemove(Aws::Vector<Aws::String> && value)158 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRemove(Aws::Vector<Aws::String>&& value) { SetGlobalNodeGroupsToRemove(std::move(value)); return *this;} 159 160 /** 161 * <p>If the value of NodeGroupCount is less than the current number of node groups 162 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 163 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 164 * ElastiCache for Redis will attempt to remove all node groups listed by 165 * GlobalNodeGroupsToRemove from the cluster. </p> 166 */ AddGlobalNodeGroupsToRemove(const Aws::String & value)167 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRemove(const Aws::String& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove.push_back(value); return *this; } 168 169 /** 170 * <p>If the value of NodeGroupCount is less than the current number of node groups 171 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 172 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 173 * ElastiCache for Redis will attempt to remove all node groups listed by 174 * GlobalNodeGroupsToRemove from the cluster. </p> 175 */ AddGlobalNodeGroupsToRemove(Aws::String && value)176 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRemove(Aws::String&& value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove.push_back(std::move(value)); return *this; } 177 178 /** 179 * <p>If the value of NodeGroupCount is less than the current number of node groups 180 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 181 * GlobalNodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. 182 * ElastiCache for Redis will attempt to remove all node groups listed by 183 * GlobalNodeGroupsToRemove from the cluster. </p> 184 */ AddGlobalNodeGroupsToRemove(const char * value)185 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRemove(const char* value) { m_globalNodeGroupsToRemoveHasBeenSet = true; m_globalNodeGroupsToRemove.push_back(value); return *this; } 186 187 188 /** 189 * <p>If the value of NodeGroupCount is less than the current number of node groups 190 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 191 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 192 * ElastiCache for Redis will attempt to retain all node groups listed by 193 * GlobalNodeGroupsToRetain from the cluster. </p> 194 */ GetGlobalNodeGroupsToRetain()195 inline const Aws::Vector<Aws::String>& GetGlobalNodeGroupsToRetain() const{ return m_globalNodeGroupsToRetain; } 196 197 /** 198 * <p>If the value of NodeGroupCount is less than the current number of node groups 199 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 200 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 201 * ElastiCache for Redis will attempt to retain all node groups listed by 202 * GlobalNodeGroupsToRetain from the cluster. </p> 203 */ GlobalNodeGroupsToRetainHasBeenSet()204 inline bool GlobalNodeGroupsToRetainHasBeenSet() const { return m_globalNodeGroupsToRetainHasBeenSet; } 205 206 /** 207 * <p>If the value of NodeGroupCount is less than the current number of node groups 208 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 209 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 210 * ElastiCache for Redis will attempt to retain all node groups listed by 211 * GlobalNodeGroupsToRetain from the cluster. </p> 212 */ SetGlobalNodeGroupsToRetain(const Aws::Vector<Aws::String> & value)213 inline void SetGlobalNodeGroupsToRetain(const Aws::Vector<Aws::String>& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain = value; } 214 215 /** 216 * <p>If the value of NodeGroupCount is less than the current number of node groups 217 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 218 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 219 * ElastiCache for Redis will attempt to retain all node groups listed by 220 * GlobalNodeGroupsToRetain from the cluster. </p> 221 */ SetGlobalNodeGroupsToRetain(Aws::Vector<Aws::String> && value)222 inline void SetGlobalNodeGroupsToRetain(Aws::Vector<Aws::String>&& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain = std::move(value); } 223 224 /** 225 * <p>If the value of NodeGroupCount is less than the current number of node groups 226 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 227 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 228 * ElastiCache for Redis will attempt to retain all node groups listed by 229 * GlobalNodeGroupsToRetain from the cluster. </p> 230 */ WithGlobalNodeGroupsToRetain(const Aws::Vector<Aws::String> & value)231 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRetain(const Aws::Vector<Aws::String>& value) { SetGlobalNodeGroupsToRetain(value); return *this;} 232 233 /** 234 * <p>If the value of NodeGroupCount is less than the current number of node groups 235 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 236 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 237 * ElastiCache for Redis will attempt to retain all node groups listed by 238 * GlobalNodeGroupsToRetain from the cluster. </p> 239 */ WithGlobalNodeGroupsToRetain(Aws::Vector<Aws::String> && value)240 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithGlobalNodeGroupsToRetain(Aws::Vector<Aws::String>&& value) { SetGlobalNodeGroupsToRetain(std::move(value)); return *this;} 241 242 /** 243 * <p>If the value of NodeGroupCount is less than the current number of node groups 244 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 245 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 246 * ElastiCache for Redis will attempt to retain all node groups listed by 247 * GlobalNodeGroupsToRetain from the cluster. </p> 248 */ AddGlobalNodeGroupsToRetain(const Aws::String & value)249 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRetain(const Aws::String& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain.push_back(value); return *this; } 250 251 /** 252 * <p>If the value of NodeGroupCount is less than the current number of node groups 253 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 254 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 255 * ElastiCache for Redis will attempt to retain all node groups listed by 256 * GlobalNodeGroupsToRetain from the cluster. </p> 257 */ AddGlobalNodeGroupsToRetain(Aws::String && value)258 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRetain(Aws::String&& value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain.push_back(std::move(value)); return *this; } 259 260 /** 261 * <p>If the value of NodeGroupCount is less than the current number of node groups 262 * (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. 263 * GlobalNodeGroupsToRetain is a list of NodeGroupIds to retain from the cluster. 264 * ElastiCache for Redis will attempt to retain all node groups listed by 265 * GlobalNodeGroupsToRetain from the cluster. </p> 266 */ AddGlobalNodeGroupsToRetain(const char * value)267 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& AddGlobalNodeGroupsToRetain(const char* value) { m_globalNodeGroupsToRetainHasBeenSet = true; m_globalNodeGroupsToRetain.push_back(value); return *this; } 268 269 270 /** 271 * <p>Indicates that the shard reconfiguration process begins immediately. At 272 * present, the only permitted value for this parameter is true. </p> 273 */ GetApplyImmediately()274 inline bool GetApplyImmediately() const{ return m_applyImmediately; } 275 276 /** 277 * <p>Indicates that the shard reconfiguration process begins immediately. At 278 * present, the only permitted value for this parameter is true. </p> 279 */ ApplyImmediatelyHasBeenSet()280 inline bool ApplyImmediatelyHasBeenSet() const { return m_applyImmediatelyHasBeenSet; } 281 282 /** 283 * <p>Indicates that the shard reconfiguration process begins immediately. At 284 * present, the only permitted value for this parameter is true. </p> 285 */ SetApplyImmediately(bool value)286 inline void SetApplyImmediately(bool value) { m_applyImmediatelyHasBeenSet = true; m_applyImmediately = value; } 287 288 /** 289 * <p>Indicates that the shard reconfiguration process begins immediately. At 290 * present, the only permitted value for this parameter is true. </p> 291 */ WithApplyImmediately(bool value)292 inline DecreaseNodeGroupsInGlobalReplicationGroupRequest& WithApplyImmediately(bool value) { SetApplyImmediately(value); return *this;} 293 294 private: 295 296 Aws::String m_globalReplicationGroupId; 297 bool m_globalReplicationGroupIdHasBeenSet; 298 299 int m_nodeGroupCount; 300 bool m_nodeGroupCountHasBeenSet; 301 302 Aws::Vector<Aws::String> m_globalNodeGroupsToRemove; 303 bool m_globalNodeGroupsToRemoveHasBeenSet; 304 305 Aws::Vector<Aws::String> m_globalNodeGroupsToRetain; 306 bool m_globalNodeGroupsToRetainHasBeenSet; 307 308 bool m_applyImmediately; 309 bool m_applyImmediatelyHasBeenSet; 310 }; 311 312 } // namespace Model 313 } // namespace ElastiCache 314 } // namespace Aws 315