AWS SDK for C++

AWS SDK for C++ Version 1.11.870

Loading...
Searching...
No Matches
ConsumedCapacity.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/dynamodb/DynamoDB_EXPORTS.h>
10#include <aws/dynamodb/model/Capacity.h>
11#include <aws/dynamodb/model/VectorCapacity.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace DynamoDB {
23namespace Model {
24
37 public:
38 AWS_DYNAMODB_API ConsumedCapacity() = default;
39 AWS_DYNAMODB_API ConsumedCapacity(Aws::Utils::Json::JsonView jsonValue);
41 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
49 inline const Aws::String& GetTableName() const { return m_tableName; }
50 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
51 template <typename TableNameT = Aws::String>
52 void SetTableName(TableNameT&& value) {
53 m_tableNameHasBeenSet = true;
54 m_tableName = std::forward<TableNameT>(value);
55 }
56 template <typename TableNameT = Aws::String>
57 ConsumedCapacity& WithTableName(TableNameT&& value) {
58 SetTableName(std::forward<TableNameT>(value));
59 return *this;
60 }
62
64
67 inline double GetCapacityUnits() const { return m_capacityUnits; }
68 inline bool CapacityUnitsHasBeenSet() const { return m_capacityUnitsHasBeenSet; }
69 inline void SetCapacityUnits(double value) {
70 m_capacityUnitsHasBeenSet = true;
71 m_capacityUnits = value;
72 }
73 inline ConsumedCapacity& WithCapacityUnits(double value) {
74 SetCapacityUnits(value);
75 return *this;
76 }
78
80
83 inline double GetReadCapacityUnits() const { return m_readCapacityUnits; }
84 inline bool ReadCapacityUnitsHasBeenSet() const { return m_readCapacityUnitsHasBeenSet; }
85 inline void SetReadCapacityUnits(double value) {
86 m_readCapacityUnitsHasBeenSet = true;
87 m_readCapacityUnits = value;
88 }
91 return *this;
92 }
94
96
99 inline double GetWriteCapacityUnits() const { return m_writeCapacityUnits; }
100 inline bool WriteCapacityUnitsHasBeenSet() const { return m_writeCapacityUnitsHasBeenSet; }
101 inline void SetWriteCapacityUnits(double value) {
102 m_writeCapacityUnitsHasBeenSet = true;
103 m_writeCapacityUnits = value;
104 }
107 return *this;
108 }
110
112
115 inline const Capacity& GetTable() const { return m_table; }
116 inline bool TableHasBeenSet() const { return m_tableHasBeenSet; }
117 template <typename TableT = Capacity>
118 void SetTable(TableT&& value) {
119 m_tableHasBeenSet = true;
120 m_table = std::forward<TableT>(value);
121 }
122 template <typename TableT = Capacity>
123 ConsumedCapacity& WithTable(TableT&& value) {
124 SetTable(std::forward<TableT>(value));
125 return *this;
126 }
128
130
134 inline const Aws::Map<Aws::String, Capacity>& GetLocalSecondaryIndexes() const { return m_localSecondaryIndexes; }
135 inline bool LocalSecondaryIndexesHasBeenSet() const { return m_localSecondaryIndexesHasBeenSet; }
136 template <typename LocalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
137 void SetLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
138 m_localSecondaryIndexesHasBeenSet = true;
139 m_localSecondaryIndexes = std::forward<LocalSecondaryIndexesT>(value);
140 }
141 template <typename LocalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
142 ConsumedCapacity& WithLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
143 SetLocalSecondaryIndexes(std::forward<LocalSecondaryIndexesT>(value));
144 return *this;
145 }
146 template <typename LocalSecondaryIndexesKeyT = Aws::String, typename LocalSecondaryIndexesValueT = Capacity>
147 ConsumedCapacity& AddLocalSecondaryIndexes(LocalSecondaryIndexesKeyT&& key, LocalSecondaryIndexesValueT&& value) {
148 m_localSecondaryIndexesHasBeenSet = true;
149 m_localSecondaryIndexes.emplace(std::forward<LocalSecondaryIndexesKeyT>(key), std::forward<LocalSecondaryIndexesValueT>(value));
150 return *this;
151 }
153
155
159 inline const Aws::Map<Aws::String, Capacity>& GetGlobalSecondaryIndexes() const { return m_globalSecondaryIndexes; }
160 inline bool GlobalSecondaryIndexesHasBeenSet() const { return m_globalSecondaryIndexesHasBeenSet; }
161 template <typename GlobalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
162 void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
163 m_globalSecondaryIndexesHasBeenSet = true;
164 m_globalSecondaryIndexes = std::forward<GlobalSecondaryIndexesT>(value);
165 }
166 template <typename GlobalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
167 ConsumedCapacity& WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
168 SetGlobalSecondaryIndexes(std::forward<GlobalSecondaryIndexesT>(value));
169 return *this;
170 }
171 template <typename GlobalSecondaryIndexesKeyT = Aws::String, typename GlobalSecondaryIndexesValueT = Capacity>
172 ConsumedCapacity& AddGlobalSecondaryIndexes(GlobalSecondaryIndexesKeyT&& key, GlobalSecondaryIndexesValueT&& value) {
173 m_globalSecondaryIndexesHasBeenSet = true;
174 m_globalSecondaryIndexes.emplace(std::forward<GlobalSecondaryIndexesKeyT>(key), std::forward<GlobalSecondaryIndexesValueT>(value));
175 return *this;
176 }
178
180
186 inline const Aws::Map<Aws::String, VectorCapacity>& GetVectorIndexes() const { return m_vectorIndexes; }
187 inline bool VectorIndexesHasBeenSet() const { return m_vectorIndexesHasBeenSet; }
188 template <typename VectorIndexesT = Aws::Map<Aws::String, VectorCapacity>>
189 void SetVectorIndexes(VectorIndexesT&& value) {
190 m_vectorIndexesHasBeenSet = true;
191 m_vectorIndexes = std::forward<VectorIndexesT>(value);
192 }
193 template <typename VectorIndexesT = Aws::Map<Aws::String, VectorCapacity>>
194 ConsumedCapacity& WithVectorIndexes(VectorIndexesT&& value) {
195 SetVectorIndexes(std::forward<VectorIndexesT>(value));
196 return *this;
197 }
198 template <typename VectorIndexesKeyT = Aws::String, typename VectorIndexesValueT = VectorCapacity>
199 ConsumedCapacity& AddVectorIndexes(VectorIndexesKeyT&& key, VectorIndexesValueT&& value) {
200 m_vectorIndexesHasBeenSet = true;
201 m_vectorIndexes.emplace(std::forward<VectorIndexesKeyT>(key), std::forward<VectorIndexesValueT>(value));
202 return *this;
203 }
205 private:
206 Aws::String m_tableName;
207
208 double m_capacityUnits{0.0};
209
210 double m_readCapacityUnits{0.0};
211
212 double m_writeCapacityUnits{0.0};
213
214 Capacity m_table;
215
216 Aws::Map<Aws::String, Capacity> m_localSecondaryIndexes;
217
218 Aws::Map<Aws::String, Capacity> m_globalSecondaryIndexes;
219
221 bool m_tableNameHasBeenSet = false;
222 bool m_capacityUnitsHasBeenSet = false;
223 bool m_readCapacityUnitsHasBeenSet = false;
224 bool m_writeCapacityUnitsHasBeenSet = false;
225 bool m_tableHasBeenSet = false;
226 bool m_localSecondaryIndexesHasBeenSet = false;
227 bool m_globalSecondaryIndexesHasBeenSet = false;
228 bool m_vectorIndexesHasBeenSet = false;
229};
230
231} // namespace Model
232} // namespace DynamoDB
233} // namespace Aws
const Aws::String & GetTableName() const
ConsumedCapacity & WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
void SetLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
ConsumedCapacity & AddLocalSecondaryIndexes(LocalSecondaryIndexesKeyT &&key, LocalSecondaryIndexesValueT &&value)
ConsumedCapacity & AddVectorIndexes(VectorIndexesKeyT &&key, VectorIndexesValueT &&value)
ConsumedCapacity & WithTableName(TableNameT &&value)
AWS_DYNAMODB_API ConsumedCapacity & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_DYNAMODB_API ConsumedCapacity(Aws::Utils::Json::JsonView jsonValue)
ConsumedCapacity & WithReadCapacityUnits(double value)
const Aws::Map< Aws::String, VectorCapacity > & GetVectorIndexes() const
ConsumedCapacity & WithCapacityUnits(double value)
ConsumedCapacity & WithTable(TableT &&value)
ConsumedCapacity & WithVectorIndexes(VectorIndexesT &&value)
ConsumedCapacity & WithLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
const Aws::Map< Aws::String, Capacity > & GetGlobalSecondaryIndexes() const
AWS_DYNAMODB_API ConsumedCapacity()=default
void SetVectorIndexes(VectorIndexesT &&value)
ConsumedCapacity & WithWriteCapacityUnits(double value)
ConsumedCapacity & AddGlobalSecondaryIndexes(GlobalSecondaryIndexesKeyT &&key, GlobalSecondaryIndexesValueT &&value)
const Aws::Map< Aws::String, Capacity > & GetLocalSecondaryIndexes() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue