AWS SDK for C++  0.12.9
AWS SDK for C++
CreateTableRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
26 
27 namespace Aws
28 {
29 namespace DynamoDB
30 {
31 namespace Model
32 {
33 
38  {
39  public:
41  Aws::String SerializePayload() const override;
42 
43  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
44 
49  inline const Aws::Vector<AttributeDefinition>& GetAttributeDefinitions() const{ return m_attributeDefinitions; }
50 
55  inline void SetAttributeDefinitions(const Aws::Vector<AttributeDefinition>& value) { m_attributeDefinitionsHasBeenSet = true; m_attributeDefinitions = value; }
56 
61  inline void SetAttributeDefinitions(Aws::Vector<AttributeDefinition>&& value) { m_attributeDefinitionsHasBeenSet = true; m_attributeDefinitions = value; }
62 
67  inline CreateTableRequest& WithAttributeDefinitions(const Aws::Vector<AttributeDefinition>& value) { SetAttributeDefinitions(value); return *this;}
68 
73  inline CreateTableRequest& WithAttributeDefinitions(Aws::Vector<AttributeDefinition>&& value) { SetAttributeDefinitions(value); return *this;}
74 
79  inline CreateTableRequest& AddAttributeDefinitions(const AttributeDefinition& value) { m_attributeDefinitionsHasBeenSet = true; m_attributeDefinitions.push_back(value); return *this; }
80 
85  inline CreateTableRequest& AddAttributeDefinitions(AttributeDefinition&& value) { m_attributeDefinitionsHasBeenSet = true; m_attributeDefinitions.push_back(value); return *this; }
86 
90  inline const Aws::String& GetTableName() const{ return m_tableName; }
91 
95  inline void SetTableName(const Aws::String& value) { m_tableNameHasBeenSet = true; m_tableName = value; }
96 
100  inline void SetTableName(Aws::String&& value) { m_tableNameHasBeenSet = true; m_tableName = value; }
101 
105  inline void SetTableName(const char* value) { m_tableNameHasBeenSet = true; m_tableName.assign(value); }
106 
110  inline CreateTableRequest& WithTableName(const Aws::String& value) { SetTableName(value); return *this;}
111 
115  inline CreateTableRequest& WithTableName(Aws::String&& value) { SetTableName(value); return *this;}
116 
120  inline CreateTableRequest& WithTableName(const char* value) { SetTableName(value); return *this;}
121 
148  inline const Aws::Vector<KeySchemaElement>& GetKeySchema() const{ return m_keySchema; }
149 
176  inline void SetKeySchema(const Aws::Vector<KeySchemaElement>& value) { m_keySchemaHasBeenSet = true; m_keySchema = value; }
177 
204  inline void SetKeySchema(Aws::Vector<KeySchemaElement>&& value) { m_keySchemaHasBeenSet = true; m_keySchema = value; }
205 
232  inline CreateTableRequest& WithKeySchema(const Aws::Vector<KeySchemaElement>& value) { SetKeySchema(value); return *this;}
233 
260  inline CreateTableRequest& WithKeySchema(Aws::Vector<KeySchemaElement>&& value) { SetKeySchema(value); return *this;}
261 
288  inline CreateTableRequest& AddKeySchema(const KeySchemaElement& value) { m_keySchemaHasBeenSet = true; m_keySchema.push_back(value); return *this; }
289 
316  inline CreateTableRequest& AddKeySchema(KeySchemaElement&& value) { m_keySchemaHasBeenSet = true; m_keySchema.push_back(value); return *this; }
317 
343  inline const Aws::Vector<LocalSecondaryIndex>& GetLocalSecondaryIndexes() const{ return m_localSecondaryIndexes; }
344 
370  inline void SetLocalSecondaryIndexes(const Aws::Vector<LocalSecondaryIndex>& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes = value; }
371 
397  inline void SetLocalSecondaryIndexes(Aws::Vector<LocalSecondaryIndex>&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes = value; }
398 
424  inline CreateTableRequest& WithLocalSecondaryIndexes(const Aws::Vector<LocalSecondaryIndex>& value) { SetLocalSecondaryIndexes(value); return *this;}
425 
451  inline CreateTableRequest& WithLocalSecondaryIndexes(Aws::Vector<LocalSecondaryIndex>&& value) { SetLocalSecondaryIndexes(value); return *this;}
452 
478  inline CreateTableRequest& AddLocalSecondaryIndexes(const LocalSecondaryIndex& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.push_back(value); return *this; }
479 
505  inline CreateTableRequest& AddLocalSecondaryIndexes(LocalSecondaryIndex&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.push_back(value); return *this; }
506 
532  inline const Aws::Vector<GlobalSecondaryIndex>& GetGlobalSecondaryIndexes() const{ return m_globalSecondaryIndexes; }
533 
559  inline void SetGlobalSecondaryIndexes(const Aws::Vector<GlobalSecondaryIndex>& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes = value; }
560 
586  inline void SetGlobalSecondaryIndexes(Aws::Vector<GlobalSecondaryIndex>&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes = value; }
587 
613  inline CreateTableRequest& WithGlobalSecondaryIndexes(const Aws::Vector<GlobalSecondaryIndex>& value) { SetGlobalSecondaryIndexes(value); return *this;}
614 
640  inline CreateTableRequest& WithGlobalSecondaryIndexes(Aws::Vector<GlobalSecondaryIndex>&& value) { SetGlobalSecondaryIndexes(value); return *this;}
641 
667  inline CreateTableRequest& AddGlobalSecondaryIndexes(const GlobalSecondaryIndex& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.push_back(value); return *this; }
668 
694  inline CreateTableRequest& AddGlobalSecondaryIndexes(GlobalSecondaryIndex&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.push_back(value); return *this; }
695 
696 
697  inline const ProvisionedThroughput& GetProvisionedThroughput() const{ return m_provisionedThroughput; }
698 
699 
700  inline void SetProvisionedThroughput(const ProvisionedThroughput& value) { m_provisionedThroughputHasBeenSet = true; m_provisionedThroughput = value; }
701 
702 
703  inline void SetProvisionedThroughput(ProvisionedThroughput&& value) { m_provisionedThroughputHasBeenSet = true; m_provisionedThroughput = value; }
704 
705 
706  inline CreateTableRequest& WithProvisionedThroughput(const ProvisionedThroughput& value) { SetProvisionedThroughput(value); return *this;}
707 
708 
709  inline CreateTableRequest& WithProvisionedThroughput(ProvisionedThroughput&& value) { SetProvisionedThroughput(value); return *this;}
710 
725  inline const StreamSpecification& GetStreamSpecification() const{ return m_streamSpecification; }
726 
741  inline void SetStreamSpecification(const StreamSpecification& value) { m_streamSpecificationHasBeenSet = true; m_streamSpecification = value; }
742 
757  inline void SetStreamSpecification(StreamSpecification&& value) { m_streamSpecificationHasBeenSet = true; m_streamSpecification = value; }
758 
773  inline CreateTableRequest& WithStreamSpecification(const StreamSpecification& value) { SetStreamSpecification(value); return *this;}
774 
789  inline CreateTableRequest& WithStreamSpecification(StreamSpecification&& value) { SetStreamSpecification(value); return *this;}
790 
791  private:
792  Aws::Vector<AttributeDefinition> m_attributeDefinitions;
793  bool m_attributeDefinitionsHasBeenSet;
794  Aws::String m_tableName;
795  bool m_tableNameHasBeenSet;
796  Aws::Vector<KeySchemaElement> m_keySchema;
797  bool m_keySchemaHasBeenSet;
798  Aws::Vector<LocalSecondaryIndex> m_localSecondaryIndexes;
799  bool m_localSecondaryIndexesHasBeenSet;
800  Aws::Vector<GlobalSecondaryIndex> m_globalSecondaryIndexes;
801  bool m_globalSecondaryIndexesHasBeenSet;
802  ProvisionedThroughput m_provisionedThroughput;
803  bool m_provisionedThroughputHasBeenSet;
804  StreamSpecification m_streamSpecification;
805  bool m_streamSpecificationHasBeenSet;
806  };
807 
808 } // namespace Model
809 } // namespace DynamoDB
810 } // namespace Aws
const Aws::Vector< KeySchemaElement > & GetKeySchema() const
void SetKeySchema(Aws::Vector< KeySchemaElement > &&value)
CreateTableRequest & WithLocalSecondaryIndexes(const Aws::Vector< LocalSecondaryIndex > &value)
CreateTableRequest & WithLocalSecondaryIndexes(Aws::Vector< LocalSecondaryIndex > &&value)
CreateTableRequest & AddKeySchema(const KeySchemaElement &value)
CreateTableRequest & WithGlobalSecondaryIndexes(const Aws::Vector< GlobalSecondaryIndex > &value)
CreateTableRequest & AddLocalSecondaryIndexes(LocalSecondaryIndex &&value)
CreateTableRequest & WithStreamSpecification(StreamSpecification &&value)
void SetTableName(const Aws::String &value)
CreateTableRequest & WithStreamSpecification(const StreamSpecification &value)
CreateTableRequest & WithAttributeDefinitions(Aws::Vector< AttributeDefinition > &&value)
void SetStreamSpecification(const StreamSpecification &value)
CreateTableRequest & WithProvisionedThroughput(const ProvisionedThroughput &value)
CreateTableRequest & WithKeySchema(Aws::Vector< KeySchemaElement > &&value)
void SetKeySchema(const Aws::Vector< KeySchemaElement > &value)
void SetGlobalSecondaryIndexes(const Aws::Vector< GlobalSecondaryIndex > &value)
CreateTableRequest & AddAttributeDefinitions(AttributeDefinition &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
CreateTableRequest & WithTableName(Aws::String &&value)
const Aws::Vector< LocalSecondaryIndex > & GetLocalSecondaryIndexes() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
CreateTableRequest & WithAttributeDefinitions(const Aws::Vector< AttributeDefinition > &value)
CreateTableRequest & WithKeySchema(const Aws::Vector< KeySchemaElement > &value)
#define AWS_DYNAMODB_API
const ProvisionedThroughput & GetProvisionedThroughput() const
CreateTableRequest & WithGlobalSecondaryIndexes(Aws::Vector< GlobalSecondaryIndex > &&value)
CreateTableRequest & WithTableName(const Aws::String &value)
CreateTableRequest & AddLocalSecondaryIndexes(const LocalSecondaryIndex &value)
CreateTableRequest & WithTableName(const char *value)
CreateTableRequest & WithProvisionedThroughput(ProvisionedThroughput &&value)
CreateTableRequest & AddKeySchema(KeySchemaElement &&value)
CreateTableRequest & AddGlobalSecondaryIndexes(GlobalSecondaryIndex &&value)
void SetLocalSecondaryIndexes(Aws::Vector< LocalSecondaryIndex > &&value)
void SetProvisionedThroughput(ProvisionedThroughput &&value)
const Aws::String & GetTableName() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetGlobalSecondaryIndexes(Aws::Vector< GlobalSecondaryIndex > &&value)
void SetAttributeDefinitions(Aws::Vector< AttributeDefinition > &&value)
const StreamSpecification & GetStreamSpecification() const
void SetLocalSecondaryIndexes(const Aws::Vector< LocalSecondaryIndex > &value)
CreateTableRequest & AddAttributeDefinitions(const AttributeDefinition &value)
const Aws::Vector< AttributeDefinition > & GetAttributeDefinitions() const
void SetAttributeDefinitions(const Aws::Vector< AttributeDefinition > &value)
void SetStreamSpecification(StreamSpecification &&value)
const Aws::Vector< GlobalSecondaryIndex > & GetGlobalSecondaryIndexes() const
JSON (JavaScript Object Notation).
CreateTableRequest & AddGlobalSecondaryIndexes(const GlobalSecondaryIndex &value)
void SetProvisionedThroughput(const ProvisionedThroughput &value)