AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateTableRequest.h
1
6#pragma once
7#include <aws/dynamodb/DynamoDB_EXPORTS.h>
8#include <aws/dynamodb/DynamoDBRequest.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/dynamodb/model/BillingMode.h>
12#include <aws/dynamodb/model/ProvisionedThroughput.h>
13#include <aws/dynamodb/model/StreamSpecification.h>
14#include <aws/dynamodb/model/SSESpecification.h>
15#include <aws/dynamodb/model/TableClass.h>
16#include <aws/dynamodb/model/WarmThroughput.h>
17#include <aws/dynamodb/model/OnDemandThroughput.h>
18#include <aws/dynamodb/model/AttributeDefinition.h>
19#include <aws/dynamodb/model/KeySchemaElement.h>
20#include <aws/dynamodb/model/LocalSecondaryIndex.h>
21#include <aws/dynamodb/model/GlobalSecondaryIndex.h>
22#include <aws/dynamodb/model/Tag.h>
23#include <utility>
24
25namespace Aws
26{
27namespace DynamoDB
28{
29namespace Model
30{
31
39 {
40 public:
41 AWS_DYNAMODB_API CreateTableRequest() = default;
42
43 // Service request name is the Operation name which will send this request out,
44 // each operation should has unique request name, so that we can get operation's name from this request.
45 // Note: this is not true for response, multiple operations may have the same response name,
46 // so we can not get operation's name from response.
47 inline virtual const char* GetServiceRequestName() const override { return "CreateTable"; }
48
49 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
50
52
56 AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override;
57
59
63 inline const Aws::Vector<AttributeDefinition>& GetAttributeDefinitions() const { return m_attributeDefinitions; }
64 inline bool AttributeDefinitionsHasBeenSet() const { return m_attributeDefinitionsHasBeenSet; }
65 template<typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
66 void SetAttributeDefinitions(AttributeDefinitionsT&& value) { m_attributeDefinitionsHasBeenSet = true; m_attributeDefinitions = std::forward<AttributeDefinitionsT>(value); }
67 template<typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
68 CreateTableRequest& WithAttributeDefinitions(AttributeDefinitionsT&& value) { SetAttributeDefinitions(std::forward<AttributeDefinitionsT>(value)); return *this;}
69 template<typename AttributeDefinitionsT = AttributeDefinition>
70 CreateTableRequest& AddAttributeDefinitions(AttributeDefinitionsT&& value) { m_attributeDefinitionsHasBeenSet = true; m_attributeDefinitions.emplace_back(std::forward<AttributeDefinitionsT>(value)); return *this; }
72
74
78 inline const Aws::String& GetTableName() const { return m_tableName; }
79 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
80 template<typename TableNameT = Aws::String>
81 void SetTableName(TableNameT&& value) { m_tableNameHasBeenSet = true; m_tableName = std::forward<TableNameT>(value); }
82 template<typename TableNameT = Aws::String>
83 CreateTableRequest& WithTableName(TableNameT&& value) { SetTableName(std::forward<TableNameT>(value)); return *this;}
85
87
113 inline const Aws::Vector<KeySchemaElement>& GetKeySchema() const { return m_keySchema; }
114 inline bool KeySchemaHasBeenSet() const { return m_keySchemaHasBeenSet; }
115 template<typename KeySchemaT = Aws::Vector<KeySchemaElement>>
116 void SetKeySchema(KeySchemaT&& value) { m_keySchemaHasBeenSet = true; m_keySchema = std::forward<KeySchemaT>(value); }
117 template<typename KeySchemaT = Aws::Vector<KeySchemaElement>>
118 CreateTableRequest& WithKeySchema(KeySchemaT&& value) { SetKeySchema(std::forward<KeySchemaT>(value)); return *this;}
119 template<typename KeySchemaT = KeySchemaElement>
120 CreateTableRequest& AddKeySchema(KeySchemaT&& value) { m_keySchemaHasBeenSet = true; m_keySchema.emplace_back(std::forward<KeySchemaT>(value)); return *this; }
122
124
153 inline const Aws::Vector<LocalSecondaryIndex>& GetLocalSecondaryIndexes() const { return m_localSecondaryIndexes; }
154 inline bool LocalSecondaryIndexesHasBeenSet() const { return m_localSecondaryIndexesHasBeenSet; }
155 template<typename LocalSecondaryIndexesT = Aws::Vector<LocalSecondaryIndex>>
156 void SetLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes = std::forward<LocalSecondaryIndexesT>(value); }
157 template<typename LocalSecondaryIndexesT = Aws::Vector<LocalSecondaryIndex>>
158 CreateTableRequest& WithLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) { SetLocalSecondaryIndexes(std::forward<LocalSecondaryIndexesT>(value)); return *this;}
159 template<typename LocalSecondaryIndexesT = LocalSecondaryIndex>
160 CreateTableRequest& AddLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.emplace_back(std::forward<LocalSecondaryIndexesT>(value)); return *this; }
162
164
193 inline const Aws::Vector<GlobalSecondaryIndex>& GetGlobalSecondaryIndexes() const { return m_globalSecondaryIndexes; }
194 inline bool GlobalSecondaryIndexesHasBeenSet() const { return m_globalSecondaryIndexesHasBeenSet; }
195 template<typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
196 void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes = std::forward<GlobalSecondaryIndexesT>(value); }
197 template<typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
198 CreateTableRequest& WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) { SetGlobalSecondaryIndexes(std::forward<GlobalSecondaryIndexesT>(value)); return *this;}
199 template<typename GlobalSecondaryIndexesT = GlobalSecondaryIndex>
200 CreateTableRequest& AddGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.emplace_back(std::forward<GlobalSecondaryIndexesT>(value)); return *this; }
202
204
218 inline BillingMode GetBillingMode() const { return m_billingMode; }
219 inline bool BillingModeHasBeenSet() const { return m_billingModeHasBeenSet; }
220 inline void SetBillingMode(BillingMode value) { m_billingModeHasBeenSet = true; m_billingMode = value; }
221 inline CreateTableRequest& WithBillingMode(BillingMode value) { SetBillingMode(value); return *this;}
223
225
235 inline const ProvisionedThroughput& GetProvisionedThroughput() const { return m_provisionedThroughput; }
236 inline bool ProvisionedThroughputHasBeenSet() const { return m_provisionedThroughputHasBeenSet; }
237 template<typename ProvisionedThroughputT = ProvisionedThroughput>
238 void SetProvisionedThroughput(ProvisionedThroughputT&& value) { m_provisionedThroughputHasBeenSet = true; m_provisionedThroughput = std::forward<ProvisionedThroughputT>(value); }
239 template<typename ProvisionedThroughputT = ProvisionedThroughput>
240 CreateTableRequest& WithProvisionedThroughput(ProvisionedThroughputT&& value) { SetProvisionedThroughput(std::forward<ProvisionedThroughputT>(value)); return *this;}
242
244
259 inline const StreamSpecification& GetStreamSpecification() const { return m_streamSpecification; }
260 inline bool StreamSpecificationHasBeenSet() const { return m_streamSpecificationHasBeenSet; }
261 template<typename StreamSpecificationT = StreamSpecification>
262 void SetStreamSpecification(StreamSpecificationT&& value) { m_streamSpecificationHasBeenSet = true; m_streamSpecification = std::forward<StreamSpecificationT>(value); }
263 template<typename StreamSpecificationT = StreamSpecification>
264 CreateTableRequest& WithStreamSpecification(StreamSpecificationT&& value) { SetStreamSpecification(std::forward<StreamSpecificationT>(value)); return *this;}
266
268
271 inline const SSESpecification& GetSSESpecification() const { return m_sSESpecification; }
272 inline bool SSESpecificationHasBeenSet() const { return m_sSESpecificationHasBeenSet; }
273 template<typename SSESpecificationT = SSESpecification>
274 void SetSSESpecification(SSESpecificationT&& value) { m_sSESpecificationHasBeenSet = true; m_sSESpecification = std::forward<SSESpecificationT>(value); }
275 template<typename SSESpecificationT = SSESpecification>
276 CreateTableRequest& WithSSESpecification(SSESpecificationT&& value) { SetSSESpecification(std::forward<SSESpecificationT>(value)); return *this;}
278
280
285 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
286 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
287 template<typename TagsT = Aws::Vector<Tag>>
288 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
289 template<typename TagsT = Aws::Vector<Tag>>
290 CreateTableRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
291 template<typename TagsT = Tag>
292 CreateTableRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
294
296
300 inline TableClass GetTableClass() const { return m_tableClass; }
301 inline bool TableClassHasBeenSet() const { return m_tableClassHasBeenSet; }
302 inline void SetTableClass(TableClass value) { m_tableClassHasBeenSet = true; m_tableClass = value; }
303 inline CreateTableRequest& WithTableClass(TableClass value) { SetTableClass(value); return *this;}
305
307
311 inline bool GetDeletionProtectionEnabled() const { return m_deletionProtectionEnabled; }
312 inline bool DeletionProtectionEnabledHasBeenSet() const { return m_deletionProtectionEnabledHasBeenSet; }
313 inline void SetDeletionProtectionEnabled(bool value) { m_deletionProtectionEnabledHasBeenSet = true; m_deletionProtectionEnabled = value; }
316
318
322 inline const WarmThroughput& GetWarmThroughput() const { return m_warmThroughput; }
323 inline bool WarmThroughputHasBeenSet() const { return m_warmThroughputHasBeenSet; }
324 template<typename WarmThroughputT = WarmThroughput>
325 void SetWarmThroughput(WarmThroughputT&& value) { m_warmThroughputHasBeenSet = true; m_warmThroughput = std::forward<WarmThroughputT>(value); }
326 template<typename WarmThroughputT = WarmThroughput>
327 CreateTableRequest& WithWarmThroughput(WarmThroughputT&& value) { SetWarmThroughput(std::forward<WarmThroughputT>(value)); return *this;}
329
331
344 inline const Aws::String& GetResourcePolicy() const { return m_resourcePolicy; }
345 inline bool ResourcePolicyHasBeenSet() const { return m_resourcePolicyHasBeenSet; }
346 template<typename ResourcePolicyT = Aws::String>
347 void SetResourcePolicy(ResourcePolicyT&& value) { m_resourcePolicyHasBeenSet = true; m_resourcePolicy = std::forward<ResourcePolicyT>(value); }
348 template<typename ResourcePolicyT = Aws::String>
349 CreateTableRequest& WithResourcePolicy(ResourcePolicyT&& value) { SetResourcePolicy(std::forward<ResourcePolicyT>(value)); return *this;}
351
353
359 inline const OnDemandThroughput& GetOnDemandThroughput() const { return m_onDemandThroughput; }
360 inline bool OnDemandThroughputHasBeenSet() const { return m_onDemandThroughputHasBeenSet; }
361 template<typename OnDemandThroughputT = OnDemandThroughput>
362 void SetOnDemandThroughput(OnDemandThroughputT&& value) { m_onDemandThroughputHasBeenSet = true; m_onDemandThroughput = std::forward<OnDemandThroughputT>(value); }
363 template<typename OnDemandThroughputT = OnDemandThroughput>
364 CreateTableRequest& WithOnDemandThroughput(OnDemandThroughputT&& value) { SetOnDemandThroughput(std::forward<OnDemandThroughputT>(value)); return *this;}
366 private:
367
368 Aws::Vector<AttributeDefinition> m_attributeDefinitions;
369 bool m_attributeDefinitionsHasBeenSet = false;
370
371 Aws::String m_tableName;
372 bool m_tableNameHasBeenSet = false;
373
375 bool m_keySchemaHasBeenSet = false;
376
377 Aws::Vector<LocalSecondaryIndex> m_localSecondaryIndexes;
378 bool m_localSecondaryIndexesHasBeenSet = false;
379
380 Aws::Vector<GlobalSecondaryIndex> m_globalSecondaryIndexes;
381 bool m_globalSecondaryIndexesHasBeenSet = false;
382
383 BillingMode m_billingMode{BillingMode::NOT_SET};
384 bool m_billingModeHasBeenSet = false;
385
386 ProvisionedThroughput m_provisionedThroughput;
387 bool m_provisionedThroughputHasBeenSet = false;
388
389 StreamSpecification m_streamSpecification;
390 bool m_streamSpecificationHasBeenSet = false;
391
392 SSESpecification m_sSESpecification;
393 bool m_sSESpecificationHasBeenSet = false;
394
395 Aws::Vector<Tag> m_tags;
396 bool m_tagsHasBeenSet = false;
397
398 TableClass m_tableClass{TableClass::NOT_SET};
399 bool m_tableClassHasBeenSet = false;
400
401 bool m_deletionProtectionEnabled{false};
402 bool m_deletionProtectionEnabledHasBeenSet = false;
403
404 WarmThroughput m_warmThroughput;
405 bool m_warmThroughputHasBeenSet = false;
406
407 Aws::String m_resourcePolicy;
408 bool m_resourcePolicyHasBeenSet = false;
409
410 OnDemandThroughput m_onDemandThroughput;
411 bool m_onDemandThroughputHasBeenSet = false;
412 };
413
414} // namespace Model
415} // namespace DynamoDB
416} // namespace Aws
Aws::Endpoint::EndpointParameters EndpointParameters
const Aws::Vector< GlobalSecondaryIndex > & GetGlobalSecondaryIndexes() const
CreateTableRequest & WithProvisionedThroughput(ProvisionedThroughputT &&value)
void SetOnDemandThroughput(OnDemandThroughputT &&value)
CreateTableRequest & WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
CreateTableRequest & WithBillingMode(BillingMode value)
void SetProvisionedThroughput(ProvisionedThroughputT &&value)
void SetWarmThroughput(WarmThroughputT &&value)
void SetResourcePolicy(ResourcePolicyT &&value)
void SetAttributeDefinitions(AttributeDefinitionsT &&value)
CreateTableRequest & WithTags(TagsT &&value)
const WarmThroughput & GetWarmThroughput() const
CreateTableRequest & WithDeletionProtectionEnabled(bool value)
CreateTableRequest & AddLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
void SetSSESpecification(SSESpecificationT &&value)
AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override
const Aws::Vector< AttributeDefinition > & GetAttributeDefinitions() const
const Aws::Vector< Tag > & GetTags() const
virtual const char * GetServiceRequestName() const override
CreateTableRequest & AddGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
CreateTableRequest & WithLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
const SSESpecification & GetSSESpecification() const
CreateTableRequest & WithSSESpecification(SSESpecificationT &&value)
const Aws::String & GetResourcePolicy() const
CreateTableRequest & WithResourcePolicy(ResourcePolicyT &&value)
void SetLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
CreateTableRequest & AddKeySchema(KeySchemaT &&value)
CreateTableRequest & WithTableName(TableNameT &&value)
CreateTableRequest & AddTags(TagsT &&value)
CreateTableRequest & WithOnDemandThroughput(OnDemandThroughputT &&value)
CreateTableRequest & WithAttributeDefinitions(AttributeDefinitionsT &&value)
CreateTableRequest & WithStreamSpecification(StreamSpecificationT &&value)
AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateTableRequest & WithTableClass(TableClass value)
const Aws::Vector< KeySchemaElement > & GetKeySchema() const
const OnDemandThroughput & GetOnDemandThroughput() const
const StreamSpecification & GetStreamSpecification() const
AWS_DYNAMODB_API Aws::String SerializePayload() const override
CreateTableRequest & AddAttributeDefinitions(AttributeDefinitionsT &&value)
AWS_DYNAMODB_API CreateTableRequest()=default
CreateTableRequest & WithWarmThroughput(WarmThroughputT &&value)
const Aws::Vector< LocalSecondaryIndex > & GetLocalSecondaryIndexes() const
void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
CreateTableRequest & WithKeySchema(KeySchemaT &&value)
void SetStreamSpecification(StreamSpecificationT &&value)
const ProvisionedThroughput & GetProvisionedThroughput() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector