1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/dynamodb/DynamoDB_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/dynamodb/model/IndexStatus.h>
10 #include <aws/dynamodb/model/AutoScalingSettingsDescription.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace DynamoDB
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>Represents the properties of a global secondary index.</p><p><h3>See
30    * Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ReplicaGlobalSecondaryIndexSettingsDescription">AWS
32    * API Reference</a></p>
33    */
34   class AWS_DYNAMODB_API ReplicaGlobalSecondaryIndexSettingsDescription
35   {
36   public:
37     ReplicaGlobalSecondaryIndexSettingsDescription();
38     ReplicaGlobalSecondaryIndexSettingsDescription(Aws::Utils::Json::JsonView jsonValue);
39     ReplicaGlobalSecondaryIndexSettingsDescription& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The name of the global secondary index. The name must be unique among all
45      * other indexes on this table.</p>
46      */
GetIndexName()47     inline const Aws::String& GetIndexName() const{ return m_indexName; }
48 
49     /**
50      * <p>The name of the global secondary index. The name must be unique among all
51      * other indexes on this table.</p>
52      */
IndexNameHasBeenSet()53     inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
54 
55     /**
56      * <p>The name of the global secondary index. The name must be unique among all
57      * other indexes on this table.</p>
58      */
SetIndexName(const Aws::String & value)59     inline void SetIndexName(const Aws::String& value) { m_indexNameHasBeenSet = true; m_indexName = value; }
60 
61     /**
62      * <p>The name of the global secondary index. The name must be unique among all
63      * other indexes on this table.</p>
64      */
SetIndexName(Aws::String && value)65     inline void SetIndexName(Aws::String&& value) { m_indexNameHasBeenSet = true; m_indexName = std::move(value); }
66 
67     /**
68      * <p>The name of the global secondary index. The name must be unique among all
69      * other indexes on this table.</p>
70      */
SetIndexName(const char * value)71     inline void SetIndexName(const char* value) { m_indexNameHasBeenSet = true; m_indexName.assign(value); }
72 
73     /**
74      * <p>The name of the global secondary index. The name must be unique among all
75      * other indexes on this table.</p>
76      */
WithIndexName(const Aws::String & value)77     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithIndexName(const Aws::String& value) { SetIndexName(value); return *this;}
78 
79     /**
80      * <p>The name of the global secondary index. The name must be unique among all
81      * other indexes on this table.</p>
82      */
WithIndexName(Aws::String && value)83     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithIndexName(Aws::String&& value) { SetIndexName(std::move(value)); return *this;}
84 
85     /**
86      * <p>The name of the global secondary index. The name must be unique among all
87      * other indexes on this table.</p>
88      */
WithIndexName(const char * value)89     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithIndexName(const char* value) { SetIndexName(value); return *this;}
90 
91 
92     /**
93      * <p> The current status of the global secondary index:</p> <ul> <li> <p>
94      * <code>CREATING</code> - The global secondary index is being created.</p> </li>
95      * <li> <p> <code>UPDATING</code> - The global secondary index is being
96      * updated.</p> </li> <li> <p> <code>DELETING</code> - The global secondary index
97      * is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global secondary
98      * index is ready for use.</p> </li> </ul>
99      */
GetIndexStatus()100     inline const IndexStatus& GetIndexStatus() const{ return m_indexStatus; }
101 
102     /**
103      * <p> The current status of the global secondary index:</p> <ul> <li> <p>
104      * <code>CREATING</code> - The global secondary index is being created.</p> </li>
105      * <li> <p> <code>UPDATING</code> - The global secondary index is being
106      * updated.</p> </li> <li> <p> <code>DELETING</code> - The global secondary index
107      * is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global secondary
108      * index is ready for use.</p> </li> </ul>
109      */
IndexStatusHasBeenSet()110     inline bool IndexStatusHasBeenSet() const { return m_indexStatusHasBeenSet; }
111 
112     /**
113      * <p> The current status of the global secondary index:</p> <ul> <li> <p>
114      * <code>CREATING</code> - The global secondary index is being created.</p> </li>
115      * <li> <p> <code>UPDATING</code> - The global secondary index is being
116      * updated.</p> </li> <li> <p> <code>DELETING</code> - The global secondary index
117      * is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global secondary
118      * index is ready for use.</p> </li> </ul>
119      */
SetIndexStatus(const IndexStatus & value)120     inline void SetIndexStatus(const IndexStatus& value) { m_indexStatusHasBeenSet = true; m_indexStatus = value; }
121 
122     /**
123      * <p> The current status of the global secondary index:</p> <ul> <li> <p>
124      * <code>CREATING</code> - The global secondary index is being created.</p> </li>
125      * <li> <p> <code>UPDATING</code> - The global secondary index is being
126      * updated.</p> </li> <li> <p> <code>DELETING</code> - The global secondary index
127      * is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global secondary
128      * index is ready for use.</p> </li> </ul>
129      */
SetIndexStatus(IndexStatus && value)130     inline void SetIndexStatus(IndexStatus&& value) { m_indexStatusHasBeenSet = true; m_indexStatus = std::move(value); }
131 
132     /**
133      * <p> The current status of the global secondary index:</p> <ul> <li> <p>
134      * <code>CREATING</code> - The global secondary index is being created.</p> </li>
135      * <li> <p> <code>UPDATING</code> - The global secondary index is being
136      * updated.</p> </li> <li> <p> <code>DELETING</code> - The global secondary index
137      * is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global secondary
138      * index is ready for use.</p> </li> </ul>
139      */
WithIndexStatus(const IndexStatus & value)140     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithIndexStatus(const IndexStatus& value) { SetIndexStatus(value); return *this;}
141 
142     /**
143      * <p> The current status of the global secondary index:</p> <ul> <li> <p>
144      * <code>CREATING</code> - The global secondary index is being created.</p> </li>
145      * <li> <p> <code>UPDATING</code> - The global secondary index is being
146      * updated.</p> </li> <li> <p> <code>DELETING</code> - The global secondary index
147      * is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global secondary
148      * index is ready for use.</p> </li> </ul>
149      */
WithIndexStatus(IndexStatus && value)150     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithIndexStatus(IndexStatus&& value) { SetIndexStatus(std::move(value)); return *this;}
151 
152 
153     /**
154      * <p>The maximum number of strongly consistent reads consumed per second before
155      * DynamoDB returns a <code>ThrottlingException</code>.</p>
156      */
GetProvisionedReadCapacityUnits()157     inline long long GetProvisionedReadCapacityUnits() const{ return m_provisionedReadCapacityUnits; }
158 
159     /**
160      * <p>The maximum number of strongly consistent reads consumed per second before
161      * DynamoDB returns a <code>ThrottlingException</code>.</p>
162      */
ProvisionedReadCapacityUnitsHasBeenSet()163     inline bool ProvisionedReadCapacityUnitsHasBeenSet() const { return m_provisionedReadCapacityUnitsHasBeenSet; }
164 
165     /**
166      * <p>The maximum number of strongly consistent reads consumed per second before
167      * DynamoDB returns a <code>ThrottlingException</code>.</p>
168      */
SetProvisionedReadCapacityUnits(long long value)169     inline void SetProvisionedReadCapacityUnits(long long value) { m_provisionedReadCapacityUnitsHasBeenSet = true; m_provisionedReadCapacityUnits = value; }
170 
171     /**
172      * <p>The maximum number of strongly consistent reads consumed per second before
173      * DynamoDB returns a <code>ThrottlingException</code>.</p>
174      */
WithProvisionedReadCapacityUnits(long long value)175     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithProvisionedReadCapacityUnits(long long value) { SetProvisionedReadCapacityUnits(value); return *this;}
176 
177 
178     /**
179      * <p>Auto scaling settings for a global secondary index replica's read capacity
180      * units.</p>
181      */
GetProvisionedReadCapacityAutoScalingSettings()182     inline const AutoScalingSettingsDescription& GetProvisionedReadCapacityAutoScalingSettings() const{ return m_provisionedReadCapacityAutoScalingSettings; }
183 
184     /**
185      * <p>Auto scaling settings for a global secondary index replica's read capacity
186      * units.</p>
187      */
ProvisionedReadCapacityAutoScalingSettingsHasBeenSet()188     inline bool ProvisionedReadCapacityAutoScalingSettingsHasBeenSet() const { return m_provisionedReadCapacityAutoScalingSettingsHasBeenSet; }
189 
190     /**
191      * <p>Auto scaling settings for a global secondary index replica's read capacity
192      * units.</p>
193      */
SetProvisionedReadCapacityAutoScalingSettings(const AutoScalingSettingsDescription & value)194     inline void SetProvisionedReadCapacityAutoScalingSettings(const AutoScalingSettingsDescription& value) { m_provisionedReadCapacityAutoScalingSettingsHasBeenSet = true; m_provisionedReadCapacityAutoScalingSettings = value; }
195 
196     /**
197      * <p>Auto scaling settings for a global secondary index replica's read capacity
198      * units.</p>
199      */
SetProvisionedReadCapacityAutoScalingSettings(AutoScalingSettingsDescription && value)200     inline void SetProvisionedReadCapacityAutoScalingSettings(AutoScalingSettingsDescription&& value) { m_provisionedReadCapacityAutoScalingSettingsHasBeenSet = true; m_provisionedReadCapacityAutoScalingSettings = std::move(value); }
201 
202     /**
203      * <p>Auto scaling settings for a global secondary index replica's read capacity
204      * units.</p>
205      */
WithProvisionedReadCapacityAutoScalingSettings(const AutoScalingSettingsDescription & value)206     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithProvisionedReadCapacityAutoScalingSettings(const AutoScalingSettingsDescription& value) { SetProvisionedReadCapacityAutoScalingSettings(value); return *this;}
207 
208     /**
209      * <p>Auto scaling settings for a global secondary index replica's read capacity
210      * units.</p>
211      */
WithProvisionedReadCapacityAutoScalingSettings(AutoScalingSettingsDescription && value)212     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithProvisionedReadCapacityAutoScalingSettings(AutoScalingSettingsDescription&& value) { SetProvisionedReadCapacityAutoScalingSettings(std::move(value)); return *this;}
213 
214 
215     /**
216      * <p>The maximum number of writes consumed per second before DynamoDB returns a
217      * <code>ThrottlingException</code>.</p>
218      */
GetProvisionedWriteCapacityUnits()219     inline long long GetProvisionedWriteCapacityUnits() const{ return m_provisionedWriteCapacityUnits; }
220 
221     /**
222      * <p>The maximum number of writes consumed per second before DynamoDB returns a
223      * <code>ThrottlingException</code>.</p>
224      */
ProvisionedWriteCapacityUnitsHasBeenSet()225     inline bool ProvisionedWriteCapacityUnitsHasBeenSet() const { return m_provisionedWriteCapacityUnitsHasBeenSet; }
226 
227     /**
228      * <p>The maximum number of writes consumed per second before DynamoDB returns a
229      * <code>ThrottlingException</code>.</p>
230      */
SetProvisionedWriteCapacityUnits(long long value)231     inline void SetProvisionedWriteCapacityUnits(long long value) { m_provisionedWriteCapacityUnitsHasBeenSet = true; m_provisionedWriteCapacityUnits = value; }
232 
233     /**
234      * <p>The maximum number of writes consumed per second before DynamoDB returns a
235      * <code>ThrottlingException</code>.</p>
236      */
WithProvisionedWriteCapacityUnits(long long value)237     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithProvisionedWriteCapacityUnits(long long value) { SetProvisionedWriteCapacityUnits(value); return *this;}
238 
239 
240     /**
241      * <p>Auto scaling settings for a global secondary index replica's write capacity
242      * units.</p>
243      */
GetProvisionedWriteCapacityAutoScalingSettings()244     inline const AutoScalingSettingsDescription& GetProvisionedWriteCapacityAutoScalingSettings() const{ return m_provisionedWriteCapacityAutoScalingSettings; }
245 
246     /**
247      * <p>Auto scaling settings for a global secondary index replica's write capacity
248      * units.</p>
249      */
ProvisionedWriteCapacityAutoScalingSettingsHasBeenSet()250     inline bool ProvisionedWriteCapacityAutoScalingSettingsHasBeenSet() const { return m_provisionedWriteCapacityAutoScalingSettingsHasBeenSet; }
251 
252     /**
253      * <p>Auto scaling settings for a global secondary index replica's write capacity
254      * units.</p>
255      */
SetProvisionedWriteCapacityAutoScalingSettings(const AutoScalingSettingsDescription & value)256     inline void SetProvisionedWriteCapacityAutoScalingSettings(const AutoScalingSettingsDescription& value) { m_provisionedWriteCapacityAutoScalingSettingsHasBeenSet = true; m_provisionedWriteCapacityAutoScalingSettings = value; }
257 
258     /**
259      * <p>Auto scaling settings for a global secondary index replica's write capacity
260      * units.</p>
261      */
SetProvisionedWriteCapacityAutoScalingSettings(AutoScalingSettingsDescription && value)262     inline void SetProvisionedWriteCapacityAutoScalingSettings(AutoScalingSettingsDescription&& value) { m_provisionedWriteCapacityAutoScalingSettingsHasBeenSet = true; m_provisionedWriteCapacityAutoScalingSettings = std::move(value); }
263 
264     /**
265      * <p>Auto scaling settings for a global secondary index replica's write capacity
266      * units.</p>
267      */
WithProvisionedWriteCapacityAutoScalingSettings(const AutoScalingSettingsDescription & value)268     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithProvisionedWriteCapacityAutoScalingSettings(const AutoScalingSettingsDescription& value) { SetProvisionedWriteCapacityAutoScalingSettings(value); return *this;}
269 
270     /**
271      * <p>Auto scaling settings for a global secondary index replica's write capacity
272      * units.</p>
273      */
WithProvisionedWriteCapacityAutoScalingSettings(AutoScalingSettingsDescription && value)274     inline ReplicaGlobalSecondaryIndexSettingsDescription& WithProvisionedWriteCapacityAutoScalingSettings(AutoScalingSettingsDescription&& value) { SetProvisionedWriteCapacityAutoScalingSettings(std::move(value)); return *this;}
275 
276   private:
277 
278     Aws::String m_indexName;
279     bool m_indexNameHasBeenSet;
280 
281     IndexStatus m_indexStatus;
282     bool m_indexStatusHasBeenSet;
283 
284     long long m_provisionedReadCapacityUnits;
285     bool m_provisionedReadCapacityUnitsHasBeenSet;
286 
287     AutoScalingSettingsDescription m_provisionedReadCapacityAutoScalingSettings;
288     bool m_provisionedReadCapacityAutoScalingSettingsHasBeenSet;
289 
290     long long m_provisionedWriteCapacityUnits;
291     bool m_provisionedWriteCapacityUnitsHasBeenSet;
292 
293     AutoScalingSettingsDescription m_provisionedWriteCapacityAutoScalingSettings;
294     bool m_provisionedWriteCapacityAutoScalingSettingsHasBeenSet;
295   };
296 
297 } // namespace Model
298 } // namespace DynamoDB
299 } // namespace Aws
300