AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
Shard.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/crt/cbor/Cbor.h>
10#include <aws/memorydb/MemoryDB_EXPORTS.h>
11#include <aws/memorydb/model/Node.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Cbor {
18class CborValue;
19} // namespace Cbor
20} // namespace Utils
21namespace MemoryDB {
22namespace Model {
23
31class Shard {
32 public:
33 AWS_MEMORYDB_API Shard() = default;
34 AWS_MEMORYDB_API Shard(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_MEMORYDB_API Shard& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_MEMORYDB_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
37
39
42 inline const Aws::String& GetName() const { return m_name; }
43 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
44 template <typename NameT = Aws::String>
45 void SetName(NameT&& value) {
46 m_nameHasBeenSet = true;
47 m_name = std::forward<NameT>(value);
48 }
49 template <typename NameT = Aws::String>
50 Shard& WithName(NameT&& value) {
51 SetName(std::forward<NameT>(value));
52 return *this;
53 }
55
57
61 inline const Aws::String& GetStatus() const { return m_status; }
62 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
63 template <typename StatusT = Aws::String>
64 void SetStatus(StatusT&& value) {
65 m_statusHasBeenSet = true;
66 m_status = std::forward<StatusT>(value);
67 }
68 template <typename StatusT = Aws::String>
69 Shard& WithStatus(StatusT&& value) {
70 SetStatus(std::forward<StatusT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetSlots() const { return m_slots; }
80 inline bool SlotsHasBeenSet() const { return m_slotsHasBeenSet; }
81 template <typename SlotsT = Aws::String>
82 void SetSlots(SlotsT&& value) {
83 m_slotsHasBeenSet = true;
84 m_slots = std::forward<SlotsT>(value);
85 }
86 template <typename SlotsT = Aws::String>
87 Shard& WithSlots(SlotsT&& value) {
88 SetSlots(std::forward<SlotsT>(value));
89 return *this;
90 }
92
94
97 inline const Aws::Vector<Node>& GetNodes() const { return m_nodes; }
98 inline bool NodesHasBeenSet() const { return m_nodesHasBeenSet; }
99 template <typename NodesT = Aws::Vector<Node>>
100 void SetNodes(NodesT&& value) {
101 m_nodesHasBeenSet = true;
102 m_nodes = std::forward<NodesT>(value);
103 }
104 template <typename NodesT = Aws::Vector<Node>>
105 Shard& WithNodes(NodesT&& value) {
106 SetNodes(std::forward<NodesT>(value));
107 return *this;
108 }
109 template <typename NodesT = Node>
110 Shard& AddNodes(NodesT&& value) {
111 m_nodesHasBeenSet = true;
112 m_nodes.emplace_back(std::forward<NodesT>(value));
113 return *this;
114 }
116
118
121 inline int64_t GetNumberOfNodes() const { return m_numberOfNodes; }
122 inline bool NumberOfNodesHasBeenSet() const { return m_numberOfNodesHasBeenSet; }
123 inline void SetNumberOfNodes(int64_t value) {
124 m_numberOfNodesHasBeenSet = true;
125 m_numberOfNodes = value;
126 }
127 inline Shard& WithNumberOfNodes(int64_t value) {
128 SetNumberOfNodes(value);
129 return *this;
130 }
132 private:
133 Aws::String m_name;
134
135 Aws::String m_status;
136
137 Aws::String m_slots;
138
139 Aws::Vector<Node> m_nodes;
140
141 int64_t m_numberOfNodes{0};
142 bool m_nameHasBeenSet = false;
143 bool m_statusHasBeenSet = false;
144 bool m_slotsHasBeenSet = false;
145 bool m_nodesHasBeenSet = false;
146 bool m_numberOfNodesHasBeenSet = false;
147};
148
149} // namespace Model
150} // namespace MemoryDB
151} // namespace Aws
AWS_MEMORYDB_API Shard & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::String & GetSlots() const
Definition Shard.h:79
void SetNumberOfNodes(int64_t value)
Definition Shard.h:123
Shard & WithNumberOfNodes(int64_t value)
Definition Shard.h:127
AWS_MEMORYDB_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::String & GetStatus() const
Definition Shard.h:61
bool NumberOfNodesHasBeenSet() const
Definition Shard.h:122
bool NameHasBeenSet() const
Definition Shard.h:43
Shard & WithNodes(NodesT &&value)
Definition Shard.h:105
Shard & WithName(NameT &&value)
Definition Shard.h:50
Shard & WithStatus(StatusT &&value)
Definition Shard.h:69
void SetSlots(SlotsT &&value)
Definition Shard.h:82
AWS_MEMORYDB_API Shard(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetNodes(NodesT &&value)
Definition Shard.h:100
bool SlotsHasBeenSet() const
Definition Shard.h:80
const Aws::Vector< Node > & GetNodes() const
Definition Shard.h:97
void SetStatus(StatusT &&value)
Definition Shard.h:64
int64_t GetNumberOfNodes() const
Definition Shard.h:121
Shard & AddNodes(NodesT &&value)
Definition Shard.h:110
bool NodesHasBeenSet() const
Definition Shard.h:98
const Aws::String & GetName() const
Definition Shard.h:42
AWS_MEMORYDB_API Shard()=default
void SetName(NameT &&value)
Definition Shard.h:45
bool StatusHasBeenSet() const
Definition Shard.h:62
Shard & WithSlots(SlotsT &&value)
Definition Shard.h:87
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector