AWS SDK for C++

AWS SDK for C++ Version 1.11.745

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
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace DynamoDB {
22namespace Model {
23
36 public:
37 AWS_DYNAMODB_API ConsumedCapacity() = default;
38 AWS_DYNAMODB_API ConsumedCapacity(Aws::Utils::Json::JsonView jsonValue);
40 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
48 inline const Aws::String& GetTableName() const { return m_tableName; }
49 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
50 template <typename TableNameT = Aws::String>
51 void SetTableName(TableNameT&& value) {
52 m_tableNameHasBeenSet = true;
53 m_tableName = std::forward<TableNameT>(value);
54 }
55 template <typename TableNameT = Aws::String>
56 ConsumedCapacity& WithTableName(TableNameT&& value) {
57 SetTableName(std::forward<TableNameT>(value));
58 return *this;
59 }
61
63
66 inline double GetCapacityUnits() const { return m_capacityUnits; }
67 inline bool CapacityUnitsHasBeenSet() const { return m_capacityUnitsHasBeenSet; }
68 inline void SetCapacityUnits(double value) {
69 m_capacityUnitsHasBeenSet = true;
70 m_capacityUnits = value;
71 }
72 inline ConsumedCapacity& WithCapacityUnits(double value) {
73 SetCapacityUnits(value);
74 return *this;
75 }
77
79
82 inline double GetReadCapacityUnits() const { return m_readCapacityUnits; }
83 inline bool ReadCapacityUnitsHasBeenSet() const { return m_readCapacityUnitsHasBeenSet; }
84 inline void SetReadCapacityUnits(double value) {
85 m_readCapacityUnitsHasBeenSet = true;
86 m_readCapacityUnits = value;
87 }
90 return *this;
91 }
93
95
98 inline double GetWriteCapacityUnits() const { return m_writeCapacityUnits; }
99 inline bool WriteCapacityUnitsHasBeenSet() const { return m_writeCapacityUnitsHasBeenSet; }
100 inline void SetWriteCapacityUnits(double value) {
101 m_writeCapacityUnitsHasBeenSet = true;
102 m_writeCapacityUnits = value;
103 }
106 return *this;
107 }
109
111
114 inline const Capacity& GetTable() const { return m_table; }
115 inline bool TableHasBeenSet() const { return m_tableHasBeenSet; }
116 template <typename TableT = Capacity>
117 void SetTable(TableT&& value) {
118 m_tableHasBeenSet = true;
119 m_table = std::forward<TableT>(value);
120 }
121 template <typename TableT = Capacity>
122 ConsumedCapacity& WithTable(TableT&& value) {
123 SetTable(std::forward<TableT>(value));
124 return *this;
125 }
127
129
133 inline const Aws::Map<Aws::String, Capacity>& GetLocalSecondaryIndexes() const { return m_localSecondaryIndexes; }
134 inline bool LocalSecondaryIndexesHasBeenSet() const { return m_localSecondaryIndexesHasBeenSet; }
135 template <typename LocalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
136 void SetLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
137 m_localSecondaryIndexesHasBeenSet = true;
138 m_localSecondaryIndexes = std::forward<LocalSecondaryIndexesT>(value);
139 }
140 template <typename LocalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
141 ConsumedCapacity& WithLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
142 SetLocalSecondaryIndexes(std::forward<LocalSecondaryIndexesT>(value));
143 return *this;
144 }
145 template <typename LocalSecondaryIndexesKeyT = Aws::String, typename LocalSecondaryIndexesValueT = Capacity>
146 ConsumedCapacity& AddLocalSecondaryIndexes(LocalSecondaryIndexesKeyT&& key, LocalSecondaryIndexesValueT&& value) {
147 m_localSecondaryIndexesHasBeenSet = true;
148 m_localSecondaryIndexes.emplace(std::forward<LocalSecondaryIndexesKeyT>(key), std::forward<LocalSecondaryIndexesValueT>(value));
149 return *this;
150 }
152
154
158 inline const Aws::Map<Aws::String, Capacity>& GetGlobalSecondaryIndexes() const { return m_globalSecondaryIndexes; }
159 inline bool GlobalSecondaryIndexesHasBeenSet() const { return m_globalSecondaryIndexesHasBeenSet; }
160 template <typename GlobalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
161 void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
162 m_globalSecondaryIndexesHasBeenSet = true;
163 m_globalSecondaryIndexes = std::forward<GlobalSecondaryIndexesT>(value);
164 }
165 template <typename GlobalSecondaryIndexesT = Aws::Map<Aws::String, Capacity>>
166 ConsumedCapacity& WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
167 SetGlobalSecondaryIndexes(std::forward<GlobalSecondaryIndexesT>(value));
168 return *this;
169 }
170 template <typename GlobalSecondaryIndexesKeyT = Aws::String, typename GlobalSecondaryIndexesValueT = Capacity>
171 ConsumedCapacity& AddGlobalSecondaryIndexes(GlobalSecondaryIndexesKeyT&& key, GlobalSecondaryIndexesValueT&& value) {
172 m_globalSecondaryIndexesHasBeenSet = true;
173 m_globalSecondaryIndexes.emplace(std::forward<GlobalSecondaryIndexesKeyT>(key), std::forward<GlobalSecondaryIndexesValueT>(value));
174 return *this;
175 }
177 private:
178 Aws::String m_tableName;
179
180 double m_capacityUnits{0.0};
181
182 double m_readCapacityUnits{0.0};
183
184 double m_writeCapacityUnits{0.0};
185
186 Capacity m_table;
187
188 Aws::Map<Aws::String, Capacity> m_localSecondaryIndexes;
189
190 Aws::Map<Aws::String, Capacity> m_globalSecondaryIndexes;
191 bool m_tableNameHasBeenSet = false;
192 bool m_capacityUnitsHasBeenSet = false;
193 bool m_readCapacityUnitsHasBeenSet = false;
194 bool m_writeCapacityUnitsHasBeenSet = false;
195 bool m_tableHasBeenSet = false;
196 bool m_localSecondaryIndexesHasBeenSet = false;
197 bool m_globalSecondaryIndexesHasBeenSet = false;
198};
199
200} // namespace Model
201} // namespace DynamoDB
202} // 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 & 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)
ConsumedCapacity & WithCapacityUnits(double value)
ConsumedCapacity & WithTable(TableT &&value)
ConsumedCapacity & WithLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
const Aws::Map< Aws::String, Capacity > & GetGlobalSecondaryIndexes() const
AWS_DYNAMODB_API ConsumedCapacity()=default
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