AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
GlobalSecondaryIndex.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/KeySchemaElement.h>
11#include <aws/dynamodb/model/OnDemandThroughput.h>
12#include <aws/dynamodb/model/Projection.h>
13#include <aws/dynamodb/model/ProvisionedThroughput.h>
14#include <aws/dynamodb/model/WarmThroughput.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace DynamoDB {
26namespace Model {
27
35 public:
36 AWS_DYNAMODB_API GlobalSecondaryIndex() = default;
39 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
46 inline const Aws::String& GetIndexName() const { return m_indexName; }
47 inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
48 template <typename IndexNameT = Aws::String>
49 void SetIndexName(IndexNameT&& value) {
50 m_indexNameHasBeenSet = true;
51 m_indexName = std::forward<IndexNameT>(value);
52 }
53 template <typename IndexNameT = Aws::String>
54 GlobalSecondaryIndex& WithIndexName(IndexNameT&& value) {
55 SetIndexName(std::forward<IndexNameT>(value));
56 return *this;
57 }
59
61
73 inline const Aws::Vector<KeySchemaElement>& GetKeySchema() const { return m_keySchema; }
74 inline bool KeySchemaHasBeenSet() const { return m_keySchemaHasBeenSet; }
75 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
76 void SetKeySchema(KeySchemaT&& value) {
77 m_keySchemaHasBeenSet = true;
78 m_keySchema = std::forward<KeySchemaT>(value);
79 }
80 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
81 GlobalSecondaryIndex& WithKeySchema(KeySchemaT&& value) {
82 SetKeySchema(std::forward<KeySchemaT>(value));
83 return *this;
84 }
85 template <typename KeySchemaT = KeySchemaElement>
86 GlobalSecondaryIndex& AddKeySchema(KeySchemaT&& value) {
87 m_keySchemaHasBeenSet = true;
88 m_keySchema.emplace_back(std::forward<KeySchemaT>(value));
89 return *this;
90 }
92
94
99 inline const Projection& GetProjection() const { return m_projection; }
100 inline bool ProjectionHasBeenSet() const { return m_projectionHasBeenSet; }
101 template <typename ProjectionT = Projection>
102 void SetProjection(ProjectionT&& value) {
103 m_projectionHasBeenSet = true;
104 m_projection = std::forward<ProjectionT>(value);
105 }
106 template <typename ProjectionT = Projection>
107 GlobalSecondaryIndex& WithProjection(ProjectionT&& value) {
108 SetProjection(std::forward<ProjectionT>(value));
109 return *this;
110 }
112
114
122 inline const ProvisionedThroughput& GetProvisionedThroughput() const { return m_provisionedThroughput; }
123 inline bool ProvisionedThroughputHasBeenSet() const { return m_provisionedThroughputHasBeenSet; }
124 template <typename ProvisionedThroughputT = ProvisionedThroughput>
125 void SetProvisionedThroughput(ProvisionedThroughputT&& value) {
126 m_provisionedThroughputHasBeenSet = true;
127 m_provisionedThroughput = std::forward<ProvisionedThroughputT>(value);
128 }
129 template <typename ProvisionedThroughputT = ProvisionedThroughput>
130 GlobalSecondaryIndex& WithProvisionedThroughput(ProvisionedThroughputT&& value) {
131 SetProvisionedThroughput(std::forward<ProvisionedThroughputT>(value));
132 return *this;
133 }
135
137
144 inline const OnDemandThroughput& GetOnDemandThroughput() const { return m_onDemandThroughput; }
145 inline bool OnDemandThroughputHasBeenSet() const { return m_onDemandThroughputHasBeenSet; }
146 template <typename OnDemandThroughputT = OnDemandThroughput>
147 void SetOnDemandThroughput(OnDemandThroughputT&& value) {
148 m_onDemandThroughputHasBeenSet = true;
149 m_onDemandThroughput = std::forward<OnDemandThroughputT>(value);
150 }
151 template <typename OnDemandThroughputT = OnDemandThroughput>
152 GlobalSecondaryIndex& WithOnDemandThroughput(OnDemandThroughputT&& value) {
153 SetOnDemandThroughput(std::forward<OnDemandThroughputT>(value));
154 return *this;
155 }
157
159
165 inline const WarmThroughput& GetWarmThroughput() const { return m_warmThroughput; }
166 inline bool WarmThroughputHasBeenSet() const { return m_warmThroughputHasBeenSet; }
167 template <typename WarmThroughputT = WarmThroughput>
168 void SetWarmThroughput(WarmThroughputT&& value) {
169 m_warmThroughputHasBeenSet = true;
170 m_warmThroughput = std::forward<WarmThroughputT>(value);
171 }
172 template <typename WarmThroughputT = WarmThroughput>
173 GlobalSecondaryIndex& WithWarmThroughput(WarmThroughputT&& value) {
174 SetWarmThroughput(std::forward<WarmThroughputT>(value));
175 return *this;
176 }
178 private:
179 Aws::String m_indexName;
180
182
183 Projection m_projection;
184
185 ProvisionedThroughput m_provisionedThroughput;
186
187 OnDemandThroughput m_onDemandThroughput;
188
189 WarmThroughput m_warmThroughput;
190 bool m_indexNameHasBeenSet = false;
191 bool m_keySchemaHasBeenSet = false;
192 bool m_projectionHasBeenSet = false;
193 bool m_provisionedThroughputHasBeenSet = false;
194 bool m_onDemandThroughputHasBeenSet = false;
195 bool m_warmThroughputHasBeenSet = false;
196};
197
198} // namespace Model
199} // namespace DynamoDB
200} // namespace Aws
const WarmThroughput & GetWarmThroughput() const
AWS_DYNAMODB_API GlobalSecondaryIndex(Aws::Utils::Json::JsonView jsonValue)
void SetProvisionedThroughput(ProvisionedThroughputT &&value)
AWS_DYNAMODB_API GlobalSecondaryIndex & operator=(Aws::Utils::Json::JsonView jsonValue)
GlobalSecondaryIndex & WithProvisionedThroughput(ProvisionedThroughputT &&value)
void SetWarmThroughput(WarmThroughputT &&value)
GlobalSecondaryIndex & AddKeySchema(KeySchemaT &&value)
const ProvisionedThroughput & GetProvisionedThroughput() const
GlobalSecondaryIndex & WithOnDemandThroughput(OnDemandThroughputT &&value)
void SetOnDemandThroughput(OnDemandThroughputT &&value)
GlobalSecondaryIndex & WithWarmThroughput(WarmThroughputT &&value)
GlobalSecondaryIndex & WithKeySchema(KeySchemaT &&value)
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_DYNAMODB_API GlobalSecondaryIndex()=default
GlobalSecondaryIndex & WithIndexName(IndexNameT &&value)
const OnDemandThroughput & GetOnDemandThroughput() const
GlobalSecondaryIndex & WithProjection(ProjectionT &&value)
const Aws::Vector< KeySchemaElement > & GetKeySchema() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue