/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace MemoryDB { namespace Model { /** *

Represents a collection of nodes in a cluster. 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 Shard { public: AWS_MEMORYDB_API Shard(); AWS_MEMORYDB_API Shard(Aws::Utils::Json::JsonView jsonValue); AWS_MEMORYDB_API Shard& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_MEMORYDB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the shard

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the shard

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the shard

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the shard

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the shard

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the shard

*/ inline Shard& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the shard

*/ inline Shard& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the shard

*/ inline Shard& WithName(const char* value) { SetName(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 Shard& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

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

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

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

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

The keyspace for this shard.

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

The keyspace for this shard.

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

The keyspace for this shard.

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

The keyspace for this shard.

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

The keyspace for this shard.

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

The keyspace for this shard.

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

The keyspace for this shard.

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

The keyspace for this shard.

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

A list containing information about individual nodes within the shard

*/ inline const Aws::Vector& GetNodes() const{ return m_nodes; } /** *

A list containing information about individual nodes within the shard

*/ inline bool NodesHasBeenSet() const { return m_nodesHasBeenSet; } /** *

A list containing information about individual nodes within the shard

*/ inline void SetNodes(const Aws::Vector& value) { m_nodesHasBeenSet = true; m_nodes = value; } /** *

A list containing information about individual nodes within the shard

*/ inline void SetNodes(Aws::Vector&& value) { m_nodesHasBeenSet = true; m_nodes = std::move(value); } /** *

A list containing information about individual nodes within the shard

*/ inline Shard& WithNodes(const Aws::Vector& value) { SetNodes(value); return *this;} /** *

A list containing information about individual nodes within the shard

*/ inline Shard& WithNodes(Aws::Vector&& value) { SetNodes(std::move(value)); return *this;} /** *

A list containing information about individual nodes within the shard

*/ inline Shard& AddNodes(const Node& value) { m_nodesHasBeenSet = true; m_nodes.push_back(value); return *this; } /** *

A list containing information about individual nodes within the shard

*/ inline Shard& AddNodes(Node&& value) { m_nodesHasBeenSet = true; m_nodes.push_back(std::move(value)); return *this; } /** *

The number of nodes in the shard

*/ inline int GetNumberOfNodes() const{ return m_numberOfNodes; } /** *

The number of nodes in the shard

*/ inline bool NumberOfNodesHasBeenSet() const { return m_numberOfNodesHasBeenSet; } /** *

The number of nodes in the shard

*/ inline void SetNumberOfNodes(int value) { m_numberOfNodesHasBeenSet = true; m_numberOfNodes = value; } /** *

The number of nodes in the shard

*/ inline Shard& WithNumberOfNodes(int value) { SetNumberOfNodes(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::String m_slots; bool m_slotsHasBeenSet = false; Aws::Vector m_nodes; bool m_nodesHasBeenSet = false; int m_numberOfNodes; bool m_numberOfNodesHasBeenSet = false; }; } // namespace Model } // namespace MemoryDB } // namespace Aws