AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Key.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/payment-cryptography/PaymentCryptography_EXPORTS.h>
11#include <aws/payment-cryptography/model/DeriveKeyUsage.h>
12#include <aws/payment-cryptography/model/KeyAttributes.h>
13#include <aws/payment-cryptography/model/KeyCheckValueAlgorithm.h>
14#include <aws/payment-cryptography/model/KeyOrigin.h>
15#include <aws/payment-cryptography/model/KeyState.h>
16#include <aws/payment-cryptography/model/MultiRegionKeyType.h>
17#include <aws/payment-cryptography/model/ReplicationStatusType.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Json {
24class JsonValue;
25class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace PaymentCryptography {
29namespace Model {
30
37class Key {
38 public:
39 AWS_PAYMENTCRYPTOGRAPHY_API Key() = default;
40 AWS_PAYMENTCRYPTOGRAPHY_API Key(Aws::Utils::Json::JsonView jsonValue);
41 AWS_PAYMENTCRYPTOGRAPHY_API Key& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_PAYMENTCRYPTOGRAPHY_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
48 inline const Aws::String& GetKeyArn() const { return m_keyArn; }
49 inline bool KeyArnHasBeenSet() const { return m_keyArnHasBeenSet; }
50 template <typename KeyArnT = Aws::String>
51 void SetKeyArn(KeyArnT&& value) {
52 m_keyArnHasBeenSet = true;
53 m_keyArn = std::forward<KeyArnT>(value);
54 }
55 template <typename KeyArnT = Aws::String>
56 Key& WithKeyArn(KeyArnT&& value) {
57 SetKeyArn(std::forward<KeyArnT>(value));
58 return *this;
59 }
61
63
68 inline const KeyAttributes& GetKeyAttributes() const { return m_keyAttributes; }
69 inline bool KeyAttributesHasBeenSet() const { return m_keyAttributesHasBeenSet; }
70 template <typename KeyAttributesT = KeyAttributes>
71 void SetKeyAttributes(KeyAttributesT&& value) {
72 m_keyAttributesHasBeenSet = true;
73 m_keyAttributes = std::forward<KeyAttributesT>(value);
74 }
75 template <typename KeyAttributesT = KeyAttributes>
76 Key& WithKeyAttributes(KeyAttributesT&& value) {
77 SetKeyAttributes(std::forward<KeyAttributesT>(value));
78 return *this;
79 }
81
83
87 inline const Aws::String& GetKeyCheckValue() const { return m_keyCheckValue; }
88 inline bool KeyCheckValueHasBeenSet() const { return m_keyCheckValueHasBeenSet; }
89 template <typename KeyCheckValueT = Aws::String>
90 void SetKeyCheckValue(KeyCheckValueT&& value) {
91 m_keyCheckValueHasBeenSet = true;
92 m_keyCheckValue = std::forward<KeyCheckValueT>(value);
93 }
94 template <typename KeyCheckValueT = Aws::String>
95 Key& WithKeyCheckValue(KeyCheckValueT&& value) {
96 SetKeyCheckValue(std::forward<KeyCheckValueT>(value));
97 return *this;
98 }
100
102
111 inline KeyCheckValueAlgorithm GetKeyCheckValueAlgorithm() const { return m_keyCheckValueAlgorithm; }
112 inline bool KeyCheckValueAlgorithmHasBeenSet() const { return m_keyCheckValueAlgorithmHasBeenSet; }
114 m_keyCheckValueAlgorithmHasBeenSet = true;
115 m_keyCheckValueAlgorithm = value;
116 }
119 return *this;
120 }
122
124
127 inline bool GetEnabled() const { return m_enabled; }
128 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
129 inline void SetEnabled(bool value) {
130 m_enabledHasBeenSet = true;
131 m_enabled = value;
132 }
133 inline Key& WithEnabled(bool value) {
134 SetEnabled(value);
135 return *this;
136 }
138
140
144 inline bool GetExportable() const { return m_exportable; }
145 inline bool ExportableHasBeenSet() const { return m_exportableHasBeenSet; }
146 inline void SetExportable(bool value) {
147 m_exportableHasBeenSet = true;
148 m_exportable = value;
149 }
150 inline Key& WithExportable(bool value) {
151 SetExportable(value);
152 return *this;
153 }
155
157
160 inline KeyState GetKeyState() const { return m_keyState; }
161 inline bool KeyStateHasBeenSet() const { return m_keyStateHasBeenSet; }
162 inline void SetKeyState(KeyState value) {
163 m_keyStateHasBeenSet = true;
164 m_keyState = value;
165 }
166 inline Key& WithKeyState(KeyState value) {
167 SetKeyState(value);
168 return *this;
169 }
171
173
179 inline KeyOrigin GetKeyOrigin() const { return m_keyOrigin; }
180 inline bool KeyOriginHasBeenSet() const { return m_keyOriginHasBeenSet; }
181 inline void SetKeyOrigin(KeyOrigin value) {
182 m_keyOriginHasBeenSet = true;
183 m_keyOrigin = value;
184 }
185 inline Key& WithKeyOrigin(KeyOrigin value) {
186 SetKeyOrigin(value);
187 return *this;
188 }
190
192
195 inline const Aws::Utils::DateTime& GetCreateTimestamp() const { return m_createTimestamp; }
196 inline bool CreateTimestampHasBeenSet() const { return m_createTimestampHasBeenSet; }
197 template <typename CreateTimestampT = Aws::Utils::DateTime>
198 void SetCreateTimestamp(CreateTimestampT&& value) {
199 m_createTimestampHasBeenSet = true;
200 m_createTimestamp = std::forward<CreateTimestampT>(value);
201 }
202 template <typename CreateTimestampT = Aws::Utils::DateTime>
203 Key& WithCreateTimestamp(CreateTimestampT&& value) {
204 SetCreateTimestamp(std::forward<CreateTimestampT>(value));
205 return *this;
206 }
208
210
214 inline const Aws::Utils::DateTime& GetUsageStartTimestamp() const { return m_usageStartTimestamp; }
215 inline bool UsageStartTimestampHasBeenSet() const { return m_usageStartTimestampHasBeenSet; }
216 template <typename UsageStartTimestampT = Aws::Utils::DateTime>
217 void SetUsageStartTimestamp(UsageStartTimestampT&& value) {
218 m_usageStartTimestampHasBeenSet = true;
219 m_usageStartTimestamp = std::forward<UsageStartTimestampT>(value);
220 }
221 template <typename UsageStartTimestampT = Aws::Utils::DateTime>
222 Key& WithUsageStartTimestamp(UsageStartTimestampT&& value) {
223 SetUsageStartTimestamp(std::forward<UsageStartTimestampT>(value));
224 return *this;
225 }
227
229
233 inline const Aws::Utils::DateTime& GetUsageStopTimestamp() const { return m_usageStopTimestamp; }
234 inline bool UsageStopTimestampHasBeenSet() const { return m_usageStopTimestampHasBeenSet; }
235 template <typename UsageStopTimestampT = Aws::Utils::DateTime>
236 void SetUsageStopTimestamp(UsageStopTimestampT&& value) {
237 m_usageStopTimestampHasBeenSet = true;
238 m_usageStopTimestamp = std::forward<UsageStopTimestampT>(value);
239 }
240 template <typename UsageStopTimestampT = Aws::Utils::DateTime>
241 Key& WithUsageStopTimestamp(UsageStopTimestampT&& value) {
242 SetUsageStopTimestamp(std::forward<UsageStopTimestampT>(value));
243 return *this;
244 }
246
248
253 inline const Aws::Utils::DateTime& GetDeletePendingTimestamp() const { return m_deletePendingTimestamp; }
254 inline bool DeletePendingTimestampHasBeenSet() const { return m_deletePendingTimestampHasBeenSet; }
255 template <typename DeletePendingTimestampT = Aws::Utils::DateTime>
256 void SetDeletePendingTimestamp(DeletePendingTimestampT&& value) {
257 m_deletePendingTimestampHasBeenSet = true;
258 m_deletePendingTimestamp = std::forward<DeletePendingTimestampT>(value);
259 }
260 template <typename DeletePendingTimestampT = Aws::Utils::DateTime>
261 Key& WithDeletePendingTimestamp(DeletePendingTimestampT&& value) {
262 SetDeletePendingTimestamp(std::forward<DeletePendingTimestampT>(value));
263 return *this;
264 }
266
268
274 inline const Aws::Utils::DateTime& GetDeleteTimestamp() const { return m_deleteTimestamp; }
275 inline bool DeleteTimestampHasBeenSet() const { return m_deleteTimestampHasBeenSet; }
276 template <typename DeleteTimestampT = Aws::Utils::DateTime>
277 void SetDeleteTimestamp(DeleteTimestampT&& value) {
278 m_deleteTimestampHasBeenSet = true;
279 m_deleteTimestamp = std::forward<DeleteTimestampT>(value);
280 }
281 template <typename DeleteTimestampT = Aws::Utils::DateTime>
282 Key& WithDeleteTimestamp(DeleteTimestampT&& value) {
283 SetDeleteTimestamp(std::forward<DeleteTimestampT>(value));
284 return *this;
285 }
287
289
293 inline DeriveKeyUsage GetDeriveKeyUsage() const { return m_deriveKeyUsage; }
294 inline bool DeriveKeyUsageHasBeenSet() const { return m_deriveKeyUsageHasBeenSet; }
296 m_deriveKeyUsageHasBeenSet = true;
297 m_deriveKeyUsage = value;
298 }
300 SetDeriveKeyUsage(value);
301 return *this;
302 }
304
306
316 inline MultiRegionKeyType GetMultiRegionKeyType() const { return m_multiRegionKeyType; }
317 inline bool MultiRegionKeyTypeHasBeenSet() const { return m_multiRegionKeyTypeHasBeenSet; }
319 m_multiRegionKeyTypeHasBeenSet = true;
320 m_multiRegionKeyType = value;
321 }
324 return *this;
325 }
327
329
330 inline const Aws::String& GetPrimaryRegion() const { return m_primaryRegion; }
331 inline bool PrimaryRegionHasBeenSet() const { return m_primaryRegionHasBeenSet; }
332 template <typename PrimaryRegionT = Aws::String>
333 void SetPrimaryRegion(PrimaryRegionT&& value) {
334 m_primaryRegionHasBeenSet = true;
335 m_primaryRegion = std::forward<PrimaryRegionT>(value);
336 }
337 template <typename PrimaryRegionT = Aws::String>
338 Key& WithPrimaryRegion(PrimaryRegionT&& value) {
339 SetPrimaryRegion(std::forward<PrimaryRegionT>(value));
340 return *this;
341 }
343
345
351 inline const Aws::Map<Aws::String, ReplicationStatusType>& GetReplicationStatus() const { return m_replicationStatus; }
352 inline bool ReplicationStatusHasBeenSet() const { return m_replicationStatusHasBeenSet; }
353 template <typename ReplicationStatusT = Aws::Map<Aws::String, ReplicationStatusType>>
354 void SetReplicationStatus(ReplicationStatusT&& value) {
355 m_replicationStatusHasBeenSet = true;
356 m_replicationStatus = std::forward<ReplicationStatusT>(value);
357 }
358 template <typename ReplicationStatusT = Aws::Map<Aws::String, ReplicationStatusType>>
359 Key& WithReplicationStatus(ReplicationStatusT&& value) {
360 SetReplicationStatus(std::forward<ReplicationStatusT>(value));
361 return *this;
362 }
363 template <typename ReplicationStatusKeyT = Aws::String, typename ReplicationStatusValueT = ReplicationStatusType>
364 Key& AddReplicationStatus(ReplicationStatusKeyT&& key, ReplicationStatusValueT&& value) {
365 m_replicationStatusHasBeenSet = true;
366 m_replicationStatus.emplace(std::forward<ReplicationStatusKeyT>(key), std::forward<ReplicationStatusValueT>(value));
367 return *this;
368 }
370
372
381 inline bool GetUsingDefaultReplicationRegions() const { return m_usingDefaultReplicationRegions; }
382 inline bool UsingDefaultReplicationRegionsHasBeenSet() const { return m_usingDefaultReplicationRegionsHasBeenSet; }
383 inline void SetUsingDefaultReplicationRegions(bool value) {
384 m_usingDefaultReplicationRegionsHasBeenSet = true;
385 m_usingDefaultReplicationRegions = value;
386 }
389 return *this;
390 }
392 private:
393 Aws::String m_keyArn;
394
395 KeyAttributes m_keyAttributes;
396
397 Aws::String m_keyCheckValue;
398
400
401 bool m_enabled{false};
402
403 bool m_exportable{false};
404
405 KeyState m_keyState{KeyState::NOT_SET};
406
407 KeyOrigin m_keyOrigin{KeyOrigin::NOT_SET};
408
409 Aws::Utils::DateTime m_createTimestamp{};
410
411 Aws::Utils::DateTime m_usageStartTimestamp{};
412
413 Aws::Utils::DateTime m_usageStopTimestamp{};
414
415 Aws::Utils::DateTime m_deletePendingTimestamp{};
416
417 Aws::Utils::DateTime m_deleteTimestamp{};
418
419 DeriveKeyUsage m_deriveKeyUsage{DeriveKeyUsage::NOT_SET};
420
422
423 Aws::String m_primaryRegion;
424
426
427 bool m_usingDefaultReplicationRegions{false};
428 bool m_keyArnHasBeenSet = false;
429 bool m_keyAttributesHasBeenSet = false;
430 bool m_keyCheckValueHasBeenSet = false;
431 bool m_keyCheckValueAlgorithmHasBeenSet = false;
432 bool m_enabledHasBeenSet = false;
433 bool m_exportableHasBeenSet = false;
434 bool m_keyStateHasBeenSet = false;
435 bool m_keyOriginHasBeenSet = false;
436 bool m_createTimestampHasBeenSet = false;
437 bool m_usageStartTimestampHasBeenSet = false;
438 bool m_usageStopTimestampHasBeenSet = false;
439 bool m_deletePendingTimestampHasBeenSet = false;
440 bool m_deleteTimestampHasBeenSet = false;
441 bool m_deriveKeyUsageHasBeenSet = false;
442 bool m_multiRegionKeyTypeHasBeenSet = false;
443 bool m_primaryRegionHasBeenSet = false;
444 bool m_replicationStatusHasBeenSet = false;
445 bool m_usingDefaultReplicationRegionsHasBeenSet = false;
446};
447
448} // namespace Model
449} // namespace PaymentCryptography
450} // namespace Aws
AWS_PAYMENTCRYPTOGRAPHY_API Key(Aws::Utils::Json::JsonView jsonValue)
Key & WithDeletePendingTimestamp(DeletePendingTimestampT &&value)
Definition Key.h:261
Key & WithKeyArn(KeyArnT &&value)
Definition Key.h:56
const Aws::Utils::DateTime & GetCreateTimestamp() const
Definition Key.h:195
Key & WithKeyState(KeyState value)
Definition Key.h:166
void SetKeyOrigin(KeyOrigin value)
Definition Key.h:181
void SetDeriveKeyUsage(DeriveKeyUsage value)
Definition Key.h:295
void SetEnabled(bool value)
Definition Key.h:129
const Aws::Map< Aws::String, ReplicationStatusType > & GetReplicationStatus() const
Definition Key.h:351
void SetUsageStartTimestamp(UsageStartTimestampT &&value)
Definition Key.h:217
Key & WithMultiRegionKeyType(MultiRegionKeyType value)
Definition Key.h:322
bool UsageStartTimestampHasBeenSet() const
Definition Key.h:215
void SetMultiRegionKeyType(MultiRegionKeyType value)
Definition Key.h:318
void SetDeletePendingTimestamp(DeletePendingTimestampT &&value)
Definition Key.h:256
Key & WithEnabled(bool value)
Definition Key.h:133
AWS_PAYMENTCRYPTOGRAPHY_API Key()=default
void SetUsageStopTimestamp(UsageStopTimestampT &&value)
Definition Key.h:236
void SetKeyArn(KeyArnT &&value)
Definition Key.h:51
bool DeletePendingTimestampHasBeenSet() const
Definition Key.h:254
bool CreateTimestampHasBeenSet() const
Definition Key.h:196
bool KeyCheckValueHasBeenSet() const
Definition Key.h:88
bool DeleteTimestampHasBeenSet() const
Definition Key.h:275
bool MultiRegionKeyTypeHasBeenSet() const
Definition Key.h:317
void SetPrimaryRegion(PrimaryRegionT &&value)
Definition Key.h:333
void SetKeyCheckValue(KeyCheckValueT &&value)
Definition Key.h:90
bool KeyCheckValueAlgorithmHasBeenSet() const
Definition Key.h:112
const Aws::Utils::DateTime & GetDeletePendingTimestamp() const
Definition Key.h:253
bool UsageStopTimestampHasBeenSet() const
Definition Key.h:234
const Aws::String & GetKeyArn() const
Definition Key.h:48
bool ReplicationStatusHasBeenSet() const
Definition Key.h:352
KeyState GetKeyState() const
Definition Key.h:160
AWS_PAYMENTCRYPTOGRAPHY_API Aws::Utils::Json::JsonValue Jsonize() const
Key & WithUsageStopTimestamp(UsageStopTimestampT &&value)
Definition Key.h:241
Key & WithDeleteTimestamp(DeleteTimestampT &&value)
Definition Key.h:282
Key & WithKeyCheckValue(KeyCheckValueT &&value)
Definition Key.h:95
void SetDeleteTimestamp(DeleteTimestampT &&value)
Definition Key.h:277
Key & WithKeyAttributes(KeyAttributesT &&value)
Definition Key.h:76
void SetKeyAttributes(KeyAttributesT &&value)
Definition Key.h:71
Key & WithReplicationStatus(ReplicationStatusT &&value)
Definition Key.h:359
Key & WithPrimaryRegion(PrimaryRegionT &&value)
Definition Key.h:338
const Aws::Utils::DateTime & GetUsageStopTimestamp() const
Definition Key.h:233
void SetKeyState(KeyState value)
Definition Key.h:162
void SetCreateTimestamp(CreateTimestampT &&value)
Definition Key.h:198
Key & WithCreateTimestamp(CreateTimestampT &&value)
Definition Key.h:203
bool PrimaryRegionHasBeenSet() const
Definition Key.h:331
bool GetUsingDefaultReplicationRegions() const
Definition Key.h:381
bool KeyAttributesHasBeenSet() const
Definition Key.h:69
Key & WithKeyOrigin(KeyOrigin value)
Definition Key.h:185
KeyOrigin GetKeyOrigin() const
Definition Key.h:179
void SetUsingDefaultReplicationRegions(bool value)
Definition Key.h:383
KeyCheckValueAlgorithm GetKeyCheckValueAlgorithm() const
Definition Key.h:111
bool UsingDefaultReplicationRegionsHasBeenSet() const
Definition Key.h:382
Key & AddReplicationStatus(ReplicationStatusKeyT &&key, ReplicationStatusValueT &&value)
Definition Key.h:364
Key & WithUsingDefaultReplicationRegions(bool value)
Definition Key.h:387
void SetKeyCheckValueAlgorithm(KeyCheckValueAlgorithm value)
Definition Key.h:113
MultiRegionKeyType GetMultiRegionKeyType() const
Definition Key.h:316
const Aws::String & GetPrimaryRegion() const
Definition Key.h:330
void SetExportable(bool value)
Definition Key.h:146
DeriveKeyUsage GetDeriveKeyUsage() const
Definition Key.h:293
bool DeriveKeyUsageHasBeenSet() const
Definition Key.h:294
const Aws::String & GetKeyCheckValue() const
Definition Key.h:87
const KeyAttributes & GetKeyAttributes() const
Definition Key.h:68
const Aws::Utils::DateTime & GetUsageStartTimestamp() const
Definition Key.h:214
void SetReplicationStatus(ReplicationStatusT &&value)
Definition Key.h:354
Key & WithKeyCheckValueAlgorithm(KeyCheckValueAlgorithm value)
Definition Key.h:117
Key & WithUsageStartTimestamp(UsageStartTimestampT &&value)
Definition Key.h:222
AWS_PAYMENTCRYPTOGRAPHY_API Key & operator=(Aws::Utils::Json::JsonView jsonValue)
Key & WithDeriveKeyUsage(DeriveKeyUsage value)
Definition Key.h:299
Key & WithExportable(bool value)
Definition Key.h:150
const Aws::Utils::DateTime & GetDeleteTimestamp() const
Definition Key.h:274
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue