AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
TableCreationParameters.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/dynamodb/DynamoDB_EXPORTS.h>
10#include <aws/dynamodb/model/AttributeDefinition.h>
11#include <aws/dynamodb/model/BillingMode.h>
12#include <aws/dynamodb/model/GlobalSecondaryIndex.h>
13#include <aws/dynamodb/model/KeySchemaElement.h>
14#include <aws/dynamodb/model/OnDemandThroughput.h>
15#include <aws/dynamodb/model/ProvisionedThroughput.h>
16#include <aws/dynamodb/model/SSESpecification.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace DynamoDB {
28namespace Model {
29
37 public:
38 AWS_DYNAMODB_API TableCreationParameters() = default;
41 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::String& GetTableName() const { return m_tableName; }
48 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
49 template <typename TableNameT = Aws::String>
50 void SetTableName(TableNameT&& value) {
51 m_tableNameHasBeenSet = true;
52 m_tableName = std::forward<TableNameT>(value);
53 }
54 template <typename TableNameT = Aws::String>
56 SetTableName(std::forward<TableNameT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::Vector<AttributeDefinition>& GetAttributeDefinitions() const { return m_attributeDefinitions; }
66 inline bool AttributeDefinitionsHasBeenSet() const { return m_attributeDefinitionsHasBeenSet; }
67 template <typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
68 void SetAttributeDefinitions(AttributeDefinitionsT&& value) {
69 m_attributeDefinitionsHasBeenSet = true;
70 m_attributeDefinitions = std::forward<AttributeDefinitionsT>(value);
71 }
72 template <typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
73 TableCreationParameters& WithAttributeDefinitions(AttributeDefinitionsT&& value) {
74 SetAttributeDefinitions(std::forward<AttributeDefinitionsT>(value));
75 return *this;
76 }
77 template <typename AttributeDefinitionsT = AttributeDefinition>
78 TableCreationParameters& AddAttributeDefinitions(AttributeDefinitionsT&& value) {
79 m_attributeDefinitionsHasBeenSet = true;
80 m_attributeDefinitions.emplace_back(std::forward<AttributeDefinitionsT>(value));
81 return *this;
82 }
84
86
90 inline const Aws::Vector<KeySchemaElement>& GetKeySchema() const { return m_keySchema; }
91 inline bool KeySchemaHasBeenSet() const { return m_keySchemaHasBeenSet; }
92 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
93 void SetKeySchema(KeySchemaT&& value) {
94 m_keySchemaHasBeenSet = true;
95 m_keySchema = std::forward<KeySchemaT>(value);
96 }
97 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
99 SetKeySchema(std::forward<KeySchemaT>(value));
100 return *this;
101 }
102 template <typename KeySchemaT = KeySchemaElement>
104 m_keySchemaHasBeenSet = true;
105 m_keySchema.emplace_back(std::forward<KeySchemaT>(value));
106 return *this;
107 }
109
111
115 inline BillingMode GetBillingMode() const { return m_billingMode; }
116 inline bool BillingModeHasBeenSet() const { return m_billingModeHasBeenSet; }
117 inline void SetBillingMode(BillingMode value) {
118 m_billingModeHasBeenSet = true;
119 m_billingMode = value;
120 }
122 SetBillingMode(value);
123 return *this;
124 }
126
128
129 inline const ProvisionedThroughput& GetProvisionedThroughput() const { return m_provisionedThroughput; }
130 inline bool ProvisionedThroughputHasBeenSet() const { return m_provisionedThroughputHasBeenSet; }
131 template <typename ProvisionedThroughputT = ProvisionedThroughput>
132 void SetProvisionedThroughput(ProvisionedThroughputT&& value) {
133 m_provisionedThroughputHasBeenSet = true;
134 m_provisionedThroughput = std::forward<ProvisionedThroughputT>(value);
135 }
136 template <typename ProvisionedThroughputT = ProvisionedThroughput>
137 TableCreationParameters& WithProvisionedThroughput(ProvisionedThroughputT&& value) {
138 SetProvisionedThroughput(std::forward<ProvisionedThroughputT>(value));
139 return *this;
140 }
142
144
145 inline const OnDemandThroughput& GetOnDemandThroughput() const { return m_onDemandThroughput; }
146 inline bool OnDemandThroughputHasBeenSet() const { return m_onDemandThroughputHasBeenSet; }
147 template <typename OnDemandThroughputT = OnDemandThroughput>
148 void SetOnDemandThroughput(OnDemandThroughputT&& value) {
149 m_onDemandThroughputHasBeenSet = true;
150 m_onDemandThroughput = std::forward<OnDemandThroughputT>(value);
151 }
152 template <typename OnDemandThroughputT = OnDemandThroughput>
153 TableCreationParameters& WithOnDemandThroughput(OnDemandThroughputT&& value) {
154 SetOnDemandThroughput(std::forward<OnDemandThroughputT>(value));
155 return *this;
156 }
158
160
161 inline const SSESpecification& GetSSESpecification() const { return m_sSESpecification; }
162 inline bool SSESpecificationHasBeenSet() const { return m_sSESpecificationHasBeenSet; }
163 template <typename SSESpecificationT = SSESpecification>
164 void SetSSESpecification(SSESpecificationT&& value) {
165 m_sSESpecificationHasBeenSet = true;
166 m_sSESpecification = std::forward<SSESpecificationT>(value);
167 }
168 template <typename SSESpecificationT = SSESpecification>
169 TableCreationParameters& WithSSESpecification(SSESpecificationT&& value) {
170 SetSSESpecification(std::forward<SSESpecificationT>(value));
171 return *this;
172 }
174
176
180 inline const Aws::Vector<GlobalSecondaryIndex>& GetGlobalSecondaryIndexes() const { return m_globalSecondaryIndexes; }
181 inline bool GlobalSecondaryIndexesHasBeenSet() const { return m_globalSecondaryIndexesHasBeenSet; }
182 template <typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
183 void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
184 m_globalSecondaryIndexesHasBeenSet = true;
185 m_globalSecondaryIndexes = std::forward<GlobalSecondaryIndexesT>(value);
186 }
187 template <typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
188 TableCreationParameters& WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
189 SetGlobalSecondaryIndexes(std::forward<GlobalSecondaryIndexesT>(value));
190 return *this;
191 }
192 template <typename GlobalSecondaryIndexesT = GlobalSecondaryIndex>
193 TableCreationParameters& AddGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
194 m_globalSecondaryIndexesHasBeenSet = true;
195 m_globalSecondaryIndexes.emplace_back(std::forward<GlobalSecondaryIndexesT>(value));
196 return *this;
197 }
199 private:
200 Aws::String m_tableName;
201
202 Aws::Vector<AttributeDefinition> m_attributeDefinitions;
203
205
206 BillingMode m_billingMode{BillingMode::NOT_SET};
207
208 ProvisionedThroughput m_provisionedThroughput;
209
210 OnDemandThroughput m_onDemandThroughput;
211
212 SSESpecification m_sSESpecification;
213
214 Aws::Vector<GlobalSecondaryIndex> m_globalSecondaryIndexes;
215 bool m_tableNameHasBeenSet = false;
216 bool m_attributeDefinitionsHasBeenSet = false;
217 bool m_keySchemaHasBeenSet = false;
218 bool m_billingModeHasBeenSet = false;
219 bool m_provisionedThroughputHasBeenSet = false;
220 bool m_onDemandThroughputHasBeenSet = false;
221 bool m_sSESpecificationHasBeenSet = false;
222 bool m_globalSecondaryIndexesHasBeenSet = false;
223};
224
225} // namespace Model
226} // namespace DynamoDB
227} // namespace Aws
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_DYNAMODB_API TableCreationParameters(Aws::Utils::Json::JsonView jsonValue)
TableCreationParameters & AddAttributeDefinitions(AttributeDefinitionsT &&value)
AWS_DYNAMODB_API TableCreationParameters()=default
void SetProvisionedThroughput(ProvisionedThroughputT &&value)
TableCreationParameters & WithAttributeDefinitions(AttributeDefinitionsT &&value)
TableCreationParameters & WithSSESpecification(SSESpecificationT &&value)
void SetAttributeDefinitions(AttributeDefinitionsT &&value)
const ProvisionedThroughput & GetProvisionedThroughput() const
const Aws::Vector< GlobalSecondaryIndex > & GetGlobalSecondaryIndexes() const
void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
TableCreationParameters & WithOnDemandThroughput(OnDemandThroughputT &&value)
TableCreationParameters & AddKeySchema(KeySchemaT &&value)
TableCreationParameters & AddGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
const Aws::Vector< KeySchemaElement > & GetKeySchema() const
TableCreationParameters & WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
AWS_DYNAMODB_API TableCreationParameters & operator=(Aws::Utils::Json::JsonView jsonValue)
TableCreationParameters & WithBillingMode(BillingMode value)
TableCreationParameters & WithProvisionedThroughput(ProvisionedThroughputT &&value)
const OnDemandThroughput & GetOnDemandThroughput() const
void SetOnDemandThroughput(OnDemandThroughputT &&value)
const Aws::Vector< AttributeDefinition > & GetAttributeDefinitions() const
TableCreationParameters & WithKeySchema(KeySchemaT &&value)
TableCreationParameters & WithTableName(TableNameT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue