/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace ElastiCache { namespace Model { /** *

Represents a collection of cache nodes in a replication group. One node in * the node group is the read/write primary node. All the other nodes are read-only * Replica nodes.

See Also:

AWS * API Reference

*/ class NodeGroup { public: AWS_ELASTICACHE_API NodeGroup(); AWS_ELASTICACHE_API NodeGroup(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICACHE_API NodeGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline const Aws::String& GetNodeGroupId() const{ return m_nodeGroupId; } /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline bool NodeGroupIdHasBeenSet() const { return m_nodeGroupIdHasBeenSet; } /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline void SetNodeGroupId(const Aws::String& value) { m_nodeGroupIdHasBeenSet = true; m_nodeGroupId = value; } /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline void SetNodeGroupId(Aws::String&& value) { m_nodeGroupIdHasBeenSet = true; m_nodeGroupId = std::move(value); } /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline void SetNodeGroupId(const char* value) { m_nodeGroupIdHasBeenSet = true; m_nodeGroupId.assign(value); } /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline NodeGroup& WithNodeGroupId(const Aws::String& value) { SetNodeGroupId(value); return *this;} /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline NodeGroup& WithNodeGroupId(Aws::String&& value) { SetNodeGroupId(std::move(value)); return *this;} /** *

The identifier for the node group (shard). A Redis (cluster mode disabled) * replication group contains only 1 node group; therefore, the node group ID is * 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node * groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group.

*/ inline NodeGroup& WithNodeGroupId(const char* value) { SetNodeGroupId(value); return *this;} /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline NodeGroup& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline NodeGroup& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The current state of this replication group - creating, * available, modifying, deleting.

*/ inline NodeGroup& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The endpoint of the primary node in this node group (shard).

*/ inline const Endpoint& GetPrimaryEndpoint() const{ return m_primaryEndpoint; } /** *

The endpoint of the primary node in this node group (shard).

*/ inline bool PrimaryEndpointHasBeenSet() const { return m_primaryEndpointHasBeenSet; } /** *

The endpoint of the primary node in this node group (shard).

*/ inline void SetPrimaryEndpoint(const Endpoint& value) { m_primaryEndpointHasBeenSet = true; m_primaryEndpoint = value; } /** *

The endpoint of the primary node in this node group (shard).

*/ inline void SetPrimaryEndpoint(Endpoint&& value) { m_primaryEndpointHasBeenSet = true; m_primaryEndpoint = std::move(value); } /** *

The endpoint of the primary node in this node group (shard).

*/ inline NodeGroup& WithPrimaryEndpoint(const Endpoint& value) { SetPrimaryEndpoint(value); return *this;} /** *

The endpoint of the primary node in this node group (shard).

*/ inline NodeGroup& WithPrimaryEndpoint(Endpoint&& value) { SetPrimaryEndpoint(std::move(value)); return *this;} /** *

The endpoint of the replica nodes in this node group (shard).

*/ inline const Endpoint& GetReaderEndpoint() const{ return m_readerEndpoint; } /** *

The endpoint of the replica nodes in this node group (shard).

*/ inline bool ReaderEndpointHasBeenSet() const { return m_readerEndpointHasBeenSet; } /** *

The endpoint of the replica nodes in this node group (shard).

*/ inline void SetReaderEndpoint(const Endpoint& value) { m_readerEndpointHasBeenSet = true; m_readerEndpoint = value; } /** *

The endpoint of the replica nodes in this node group (shard).

*/ inline void SetReaderEndpoint(Endpoint&& value) { m_readerEndpointHasBeenSet = true; m_readerEndpoint = std::move(value); } /** *

The endpoint of the replica nodes in this node group (shard).

*/ inline NodeGroup& WithReaderEndpoint(const Endpoint& value) { SetReaderEndpoint(value); return *this;} /** *

The endpoint of the replica nodes in this node group (shard).

*/ inline NodeGroup& WithReaderEndpoint(Endpoint&& value) { SetReaderEndpoint(std::move(value)); return *this;} /** *

The keyspace for this node group (shard).

*/ inline const Aws::String& GetSlots() const{ return m_slots; } /** *

The keyspace for this node group (shard).

*/ inline bool SlotsHasBeenSet() const { return m_slotsHasBeenSet; } /** *

The keyspace for this node group (shard).

*/ inline void SetSlots(const Aws::String& value) { m_slotsHasBeenSet = true; m_slots = value; } /** *

The keyspace for this node group (shard).

*/ inline void SetSlots(Aws::String&& value) { m_slotsHasBeenSet = true; m_slots = std::move(value); } /** *

The keyspace for this node group (shard).

*/ inline void SetSlots(const char* value) { m_slotsHasBeenSet = true; m_slots.assign(value); } /** *

The keyspace for this node group (shard).

*/ inline NodeGroup& WithSlots(const Aws::String& value) { SetSlots(value); return *this;} /** *

The keyspace for this node group (shard).

*/ inline NodeGroup& WithSlots(Aws::String&& value) { SetSlots(std::move(value)); return *this;} /** *

The keyspace for this node group (shard).

*/ inline NodeGroup& WithSlots(const char* value) { SetSlots(value); return *this;} /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline const Aws::Vector& GetNodeGroupMembers() const{ return m_nodeGroupMembers; } /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline bool NodeGroupMembersHasBeenSet() const { return m_nodeGroupMembersHasBeenSet; } /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline void SetNodeGroupMembers(const Aws::Vector& value) { m_nodeGroupMembersHasBeenSet = true; m_nodeGroupMembers = value; } /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline void SetNodeGroupMembers(Aws::Vector&& value) { m_nodeGroupMembersHasBeenSet = true; m_nodeGroupMembers = std::move(value); } /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline NodeGroup& WithNodeGroupMembers(const Aws::Vector& value) { SetNodeGroupMembers(value); return *this;} /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline NodeGroup& WithNodeGroupMembers(Aws::Vector&& value) { SetNodeGroupMembers(std::move(value)); return *this;} /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline NodeGroup& AddNodeGroupMembers(const NodeGroupMember& value) { m_nodeGroupMembersHasBeenSet = true; m_nodeGroupMembers.push_back(value); return *this; } /** *

A list containing information about individual nodes within the node group * (shard).

*/ inline NodeGroup& AddNodeGroupMembers(NodeGroupMember&& value) { m_nodeGroupMembersHasBeenSet = true; m_nodeGroupMembers.push_back(std::move(value)); return *this; } private: Aws::String m_nodeGroupId; bool m_nodeGroupIdHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Endpoint m_primaryEndpoint; bool m_primaryEndpointHasBeenSet = false; Endpoint m_readerEndpoint; bool m_readerEndpointHasBeenSet = false; Aws::String m_slots; bool m_slotsHasBeenSet = false; Aws::Vector m_nodeGroupMembers; bool m_nodeGroupMembersHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws