AWS SDK for C++

AWS SDK for C++ Version 1.11.827

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/MpaStatus.h>
17#include <aws/payment-cryptography/model/MultiRegionKeyType.h>
18#include <aws/payment-cryptography/model/ReplicationStatusType.h>
19
20#include <utility>
21
22namespace Aws {
23namespace Utils {
24namespace Json {
25class JsonValue;
26class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace PaymentCryptography {
30namespace Model {
31
38class Key {
39 public:
40 AWS_PAYMENTCRYPTOGRAPHY_API Key() = default;
41 AWS_PAYMENTCRYPTOGRAPHY_API Key(Aws::Utils::Json::JsonView jsonValue);
42 AWS_PAYMENTCRYPTOGRAPHY_API Key& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_PAYMENTCRYPTOGRAPHY_API Aws::Utils::Json::JsonValue Jsonize() const;
44
46
49 inline const Aws::String& GetKeyArn() const { return m_keyArn; }
50 inline bool KeyArnHasBeenSet() const { return m_keyArnHasBeenSet; }
51 template <typename KeyArnT = Aws::String>
52 void SetKeyArn(KeyArnT&& value) {
53 m_keyArnHasBeenSet = true;
54 m_keyArn = std::forward<KeyArnT>(value);
55 }
56 template <typename KeyArnT = Aws::String>
57 Key& WithKeyArn(KeyArnT&& value) {
58 SetKeyArn(std::forward<KeyArnT>(value));
59 return *this;
60 }
62
64
69 inline const KeyAttributes& GetKeyAttributes() const { return m_keyAttributes; }
70 inline bool KeyAttributesHasBeenSet() const { return m_keyAttributesHasBeenSet; }
71 template <typename KeyAttributesT = KeyAttributes>
72 void SetKeyAttributes(KeyAttributesT&& value) {
73 m_keyAttributesHasBeenSet = true;
74 m_keyAttributes = std::forward<KeyAttributesT>(value);
75 }
76 template <typename KeyAttributesT = KeyAttributes>
77 Key& WithKeyAttributes(KeyAttributesT&& value) {
78 SetKeyAttributes(std::forward<KeyAttributesT>(value));
79 return *this;
80 }
82
84
88 inline const Aws::String& GetKeyCheckValue() const { return m_keyCheckValue; }
89 inline bool KeyCheckValueHasBeenSet() const { return m_keyCheckValueHasBeenSet; }
90 template <typename KeyCheckValueT = Aws::String>
91 void SetKeyCheckValue(KeyCheckValueT&& value) {
92 m_keyCheckValueHasBeenSet = true;
93 m_keyCheckValue = std::forward<KeyCheckValueT>(value);
94 }
95 template <typename KeyCheckValueT = Aws::String>
96 Key& WithKeyCheckValue(KeyCheckValueT&& value) {
97 SetKeyCheckValue(std::forward<KeyCheckValueT>(value));
98 return *this;
99 }
101
103
113 inline KeyCheckValueAlgorithm GetKeyCheckValueAlgorithm() const { return m_keyCheckValueAlgorithm; }
114 inline bool KeyCheckValueAlgorithmHasBeenSet() const { return m_keyCheckValueAlgorithmHasBeenSet; }
116 m_keyCheckValueAlgorithmHasBeenSet = true;
117 m_keyCheckValueAlgorithm = value;
118 }
121 return *this;
122 }
124
126
129 inline bool GetEnabled() const { return m_enabled; }
130 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
131 inline void SetEnabled(bool value) {
132 m_enabledHasBeenSet = true;
133 m_enabled = value;
134 }
135 inline Key& WithEnabled(bool value) {
136 SetEnabled(value);
137 return *this;
138 }
140
142
146 inline bool GetExportable() const { return m_exportable; }
147 inline bool ExportableHasBeenSet() const { return m_exportableHasBeenSet; }
148 inline void SetExportable(bool value) {
149 m_exportableHasBeenSet = true;
150 m_exportable = value;
151 }
152 inline Key& WithExportable(bool value) {
153 SetExportable(value);
154 return *this;
155 }
157
159
162 inline KeyState GetKeyState() const { return m_keyState; }
163 inline bool KeyStateHasBeenSet() const { return m_keyStateHasBeenSet; }
164 inline void SetKeyState(KeyState value) {
165 m_keyStateHasBeenSet = true;
166 m_keyState = value;
167 }
168 inline Key& WithKeyState(KeyState value) {
169 SetKeyState(value);
170 return *this;
171 }
173
175
181 inline KeyOrigin GetKeyOrigin() const { return m_keyOrigin; }
182 inline bool KeyOriginHasBeenSet() const { return m_keyOriginHasBeenSet; }
183 inline void SetKeyOrigin(KeyOrigin value) {
184 m_keyOriginHasBeenSet = true;
185 m_keyOrigin = value;
186 }
187 inline Key& WithKeyOrigin(KeyOrigin value) {
188 SetKeyOrigin(value);
189 return *this;
190 }
192
194
197 inline const Aws::Utils::DateTime& GetCreateTimestamp() const { return m_createTimestamp; }
198 inline bool CreateTimestampHasBeenSet() const { return m_createTimestampHasBeenSet; }
199 template <typename CreateTimestampT = Aws::Utils::DateTime>
200 void SetCreateTimestamp(CreateTimestampT&& value) {
201 m_createTimestampHasBeenSet = true;
202 m_createTimestamp = std::forward<CreateTimestampT>(value);
203 }
204 template <typename CreateTimestampT = Aws::Utils::DateTime>
205 Key& WithCreateTimestamp(CreateTimestampT&& value) {
206 SetCreateTimestamp(std::forward<CreateTimestampT>(value));
207 return *this;
208 }
210
212
216 inline const Aws::Utils::DateTime& GetUsageStartTimestamp() const { return m_usageStartTimestamp; }
217 inline bool UsageStartTimestampHasBeenSet() const { return m_usageStartTimestampHasBeenSet; }
218 template <typename UsageStartTimestampT = Aws::Utils::DateTime>
219 void SetUsageStartTimestamp(UsageStartTimestampT&& value) {
220 m_usageStartTimestampHasBeenSet = true;
221 m_usageStartTimestamp = std::forward<UsageStartTimestampT>(value);
222 }
223 template <typename UsageStartTimestampT = Aws::Utils::DateTime>
224 Key& WithUsageStartTimestamp(UsageStartTimestampT&& value) {
225 SetUsageStartTimestamp(std::forward<UsageStartTimestampT>(value));
226 return *this;
227 }
229
231
235 inline const Aws::Utils::DateTime& GetUsageStopTimestamp() const { return m_usageStopTimestamp; }
236 inline bool UsageStopTimestampHasBeenSet() const { return m_usageStopTimestampHasBeenSet; }
237 template <typename UsageStopTimestampT = Aws::Utils::DateTime>
238 void SetUsageStopTimestamp(UsageStopTimestampT&& value) {
239 m_usageStopTimestampHasBeenSet = true;
240 m_usageStopTimestamp = std::forward<UsageStopTimestampT>(value);
241 }
242 template <typename UsageStopTimestampT = Aws::Utils::DateTime>
243 Key& WithUsageStopTimestamp(UsageStopTimestampT&& value) {
244 SetUsageStopTimestamp(std::forward<UsageStopTimestampT>(value));
245 return *this;
246 }
248
250
255 inline const Aws::Utils::DateTime& GetDeletePendingTimestamp() const { return m_deletePendingTimestamp; }
256 inline bool DeletePendingTimestampHasBeenSet() const { return m_deletePendingTimestampHasBeenSet; }
257 template <typename DeletePendingTimestampT = Aws::Utils::DateTime>
258 void SetDeletePendingTimestamp(DeletePendingTimestampT&& value) {
259 m_deletePendingTimestampHasBeenSet = true;
260 m_deletePendingTimestamp = std::forward<DeletePendingTimestampT>(value);
261 }
262 template <typename DeletePendingTimestampT = Aws::Utils::DateTime>
263 Key& WithDeletePendingTimestamp(DeletePendingTimestampT&& value) {
264 SetDeletePendingTimestamp(std::forward<DeletePendingTimestampT>(value));
265 return *this;
266 }
268
270
276 inline const Aws::Utils::DateTime& GetDeleteTimestamp() const { return m_deleteTimestamp; }
277 inline bool DeleteTimestampHasBeenSet() const { return m_deleteTimestampHasBeenSet; }
278 template <typename DeleteTimestampT = Aws::Utils::DateTime>
279 void SetDeleteTimestamp(DeleteTimestampT&& value) {
280 m_deleteTimestampHasBeenSet = true;
281 m_deleteTimestamp = std::forward<DeleteTimestampT>(value);
282 }
283 template <typename DeleteTimestampT = Aws::Utils::DateTime>
284 Key& WithDeleteTimestamp(DeleteTimestampT&& value) {
285 SetDeleteTimestamp(std::forward<DeleteTimestampT>(value));
286 return *this;
287 }
289
291
295 inline DeriveKeyUsage GetDeriveKeyUsage() const { return m_deriveKeyUsage; }
296 inline bool DeriveKeyUsageHasBeenSet() const { return m_deriveKeyUsageHasBeenSet; }
298 m_deriveKeyUsageHasBeenSet = true;
299 m_deriveKeyUsage = value;
300 }
302 SetDeriveKeyUsage(value);
303 return *this;
304 }
306
308
318 inline MultiRegionKeyType GetMultiRegionKeyType() const { return m_multiRegionKeyType; }
319 inline bool MultiRegionKeyTypeHasBeenSet() const { return m_multiRegionKeyTypeHasBeenSet; }
321 m_multiRegionKeyTypeHasBeenSet = true;
322 m_multiRegionKeyType = value;
323 }
326 return *this;
327 }
329
331
332 inline const Aws::String& GetPrimaryRegion() const { return m_primaryRegion; }
333 inline bool PrimaryRegionHasBeenSet() const { return m_primaryRegionHasBeenSet; }
334 template <typename PrimaryRegionT = Aws::String>
335 void SetPrimaryRegion(PrimaryRegionT&& value) {
336 m_primaryRegionHasBeenSet = true;
337 m_primaryRegion = std::forward<PrimaryRegionT>(value);
338 }
339 template <typename PrimaryRegionT = Aws::String>
340 Key& WithPrimaryRegion(PrimaryRegionT&& value) {
341 SetPrimaryRegion(std::forward<PrimaryRegionT>(value));
342 return *this;
343 }
345
347
353 inline const Aws::Map<Aws::String, ReplicationStatusType>& GetReplicationStatus() const { return m_replicationStatus; }
354 inline bool ReplicationStatusHasBeenSet() const { return m_replicationStatusHasBeenSet; }
355 template <typename ReplicationStatusT = Aws::Map<Aws::String, ReplicationStatusType>>
356 void SetReplicationStatus(ReplicationStatusT&& value) {
357 m_replicationStatusHasBeenSet = true;
358 m_replicationStatus = std::forward<ReplicationStatusT>(value);
359 }
360 template <typename ReplicationStatusT = Aws::Map<Aws::String, ReplicationStatusType>>
361 Key& WithReplicationStatus(ReplicationStatusT&& value) {
362 SetReplicationStatus(std::forward<ReplicationStatusT>(value));
363 return *this;
364 }
365 template <typename ReplicationStatusKeyT = Aws::String, typename ReplicationStatusValueT = ReplicationStatusType>
366 Key& AddReplicationStatus(ReplicationStatusKeyT&& key, ReplicationStatusValueT&& value) {
367 m_replicationStatusHasBeenSet = true;
368 m_replicationStatus.emplace(std::forward<ReplicationStatusKeyT>(key), std::forward<ReplicationStatusValueT>(value));
369 return *this;
370 }
372
374
383 inline bool GetUsingDefaultReplicationRegions() const { return m_usingDefaultReplicationRegions; }
384 inline bool UsingDefaultReplicationRegionsHasBeenSet() const { return m_usingDefaultReplicationRegionsHasBeenSet; }
385 inline void SetUsingDefaultReplicationRegions(bool value) {
386 m_usingDefaultReplicationRegionsHasBeenSet = true;
387 m_usingDefaultReplicationRegions = value;
388 }
391 return *this;
392 }
394
396
399 inline const MpaStatus& GetMpaStatus() const { return m_mpaStatus; }
400 inline bool MpaStatusHasBeenSet() const { return m_mpaStatusHasBeenSet; }
401 template <typename MpaStatusT = MpaStatus>
402 void SetMpaStatus(MpaStatusT&& value) {
403 m_mpaStatusHasBeenSet = true;
404 m_mpaStatus = std::forward<MpaStatusT>(value);
405 }
406 template <typename MpaStatusT = MpaStatus>
407 Key& WithMpaStatus(MpaStatusT&& value) {
408 SetMpaStatus(std::forward<MpaStatusT>(value));
409 return *this;
410 }
412 private:
413 Aws::String m_keyArn;
414
415 KeyAttributes m_keyAttributes;
416
417 Aws::String m_keyCheckValue;
418
420
421 bool m_enabled{false};
422
423 bool m_exportable{false};
424
425 KeyState m_keyState{KeyState::NOT_SET};
426
427 KeyOrigin m_keyOrigin{KeyOrigin::NOT_SET};
428
429 Aws::Utils::DateTime m_createTimestamp{};
430
431 Aws::Utils::DateTime m_usageStartTimestamp{};
432
433 Aws::Utils::DateTime m_usageStopTimestamp{};
434
435 Aws::Utils::DateTime m_deletePendingTimestamp{};
436
437 Aws::Utils::DateTime m_deleteTimestamp{};
438
439 DeriveKeyUsage m_deriveKeyUsage{DeriveKeyUsage::NOT_SET};
440
442
443 Aws::String m_primaryRegion;
444
446
447 bool m_usingDefaultReplicationRegions{false};
448
449 MpaStatus m_mpaStatus;
450 bool m_keyArnHasBeenSet = false;
451 bool m_keyAttributesHasBeenSet = false;
452 bool m_keyCheckValueHasBeenSet = false;
453 bool m_keyCheckValueAlgorithmHasBeenSet = false;
454 bool m_enabledHasBeenSet = false;
455 bool m_exportableHasBeenSet = false;
456 bool m_keyStateHasBeenSet = false;
457 bool m_keyOriginHasBeenSet = false;
458 bool m_createTimestampHasBeenSet = false;
459 bool m_usageStartTimestampHasBeenSet = false;
460 bool m_usageStopTimestampHasBeenSet = false;
461 bool m_deletePendingTimestampHasBeenSet = false;
462 bool m_deleteTimestampHasBeenSet = false;
463 bool m_deriveKeyUsageHasBeenSet = false;
464 bool m_multiRegionKeyTypeHasBeenSet = false;
465 bool m_primaryRegionHasBeenSet = false;
466 bool m_replicationStatusHasBeenSet = false;
467 bool m_usingDefaultReplicationRegionsHasBeenSet = false;
468 bool m_mpaStatusHasBeenSet = false;
469};
470
471} // namespace Model
472} // namespace PaymentCryptography
473} // namespace Aws
AWS_PAYMENTCRYPTOGRAPHY_API Key(Aws::Utils::Json::JsonView jsonValue)
Key & WithDeletePendingTimestamp(DeletePendingTimestampT &&value)
Definition Key.h:263
Key & WithKeyArn(KeyArnT &&value)
Definition Key.h:57
const Aws::Utils::DateTime & GetCreateTimestamp() const
Definition Key.h:197
Key & WithKeyState(KeyState value)
Definition Key.h:168
void SetKeyOrigin(KeyOrigin value)
Definition Key.h:183
void SetDeriveKeyUsage(DeriveKeyUsage value)
Definition Key.h:297
void SetEnabled(bool value)
Definition Key.h:131
const Aws::Map< Aws::String, ReplicationStatusType > & GetReplicationStatus() const
Definition Key.h:353
void SetUsageStartTimestamp(UsageStartTimestampT &&value)
Definition Key.h:219
Key & WithMultiRegionKeyType(MultiRegionKeyType value)
Definition Key.h:324
bool UsageStartTimestampHasBeenSet() const
Definition Key.h:217
void SetMultiRegionKeyType(MultiRegionKeyType value)
Definition Key.h:320
void SetDeletePendingTimestamp(DeletePendingTimestampT &&value)
Definition Key.h:258
Key & WithEnabled(bool value)
Definition Key.h:135
AWS_PAYMENTCRYPTOGRAPHY_API Key()=default
void SetUsageStopTimestamp(UsageStopTimestampT &&value)
Definition Key.h:238
void SetKeyArn(KeyArnT &&value)
Definition Key.h:52
bool DeletePendingTimestampHasBeenSet() const
Definition Key.h:256
bool CreateTimestampHasBeenSet() const
Definition Key.h:198
bool KeyCheckValueHasBeenSet() const
Definition Key.h:89
bool DeleteTimestampHasBeenSet() const
Definition Key.h:277
bool MultiRegionKeyTypeHasBeenSet() const
Definition Key.h:319
void SetPrimaryRegion(PrimaryRegionT &&value)
Definition Key.h:335
void SetKeyCheckValue(KeyCheckValueT &&value)
Definition Key.h:91
bool KeyCheckValueAlgorithmHasBeenSet() const
Definition Key.h:114
const Aws::Utils::DateTime & GetDeletePendingTimestamp() const
Definition Key.h:255
bool UsageStopTimestampHasBeenSet() const
Definition Key.h:236
const Aws::String & GetKeyArn() const
Definition Key.h:49
bool ReplicationStatusHasBeenSet() const
Definition Key.h:354
KeyState GetKeyState() const
Definition Key.h:162
AWS_PAYMENTCRYPTOGRAPHY_API Aws::Utils::Json::JsonValue Jsonize() const
Key & WithUsageStopTimestamp(UsageStopTimestampT &&value)
Definition Key.h:243
Key & WithDeleteTimestamp(DeleteTimestampT &&value)
Definition Key.h:284
Key & WithKeyCheckValue(KeyCheckValueT &&value)
Definition Key.h:96
void SetDeleteTimestamp(DeleteTimestampT &&value)
Definition Key.h:279
Key & WithKeyAttributes(KeyAttributesT &&value)
Definition Key.h:77
Key & WithMpaStatus(MpaStatusT &&value)
Definition Key.h:407
void SetKeyAttributes(KeyAttributesT &&value)
Definition Key.h:72
Key & WithReplicationStatus(ReplicationStatusT &&value)
Definition Key.h:361
Key & WithPrimaryRegion(PrimaryRegionT &&value)
Definition Key.h:340
const Aws::Utils::DateTime & GetUsageStopTimestamp() const
Definition Key.h:235
void SetKeyState(KeyState value)
Definition Key.h:164
void SetCreateTimestamp(CreateTimestampT &&value)
Definition Key.h:200
Key & WithCreateTimestamp(CreateTimestampT &&value)
Definition Key.h:205
bool PrimaryRegionHasBeenSet() const
Definition Key.h:333
bool GetUsingDefaultReplicationRegions() const
Definition Key.h:383
bool KeyAttributesHasBeenSet() const
Definition Key.h:70
Key & WithKeyOrigin(KeyOrigin value)
Definition Key.h:187
KeyOrigin GetKeyOrigin() const
Definition Key.h:181
void SetMpaStatus(MpaStatusT &&value)
Definition Key.h:402
void SetUsingDefaultReplicationRegions(bool value)
Definition Key.h:385
KeyCheckValueAlgorithm GetKeyCheckValueAlgorithm() const
Definition Key.h:113
bool UsingDefaultReplicationRegionsHasBeenSet() const
Definition Key.h:384
Key & AddReplicationStatus(ReplicationStatusKeyT &&key, ReplicationStatusValueT &&value)
Definition Key.h:366
Key & WithUsingDefaultReplicationRegions(bool value)
Definition Key.h:389
void SetKeyCheckValueAlgorithm(KeyCheckValueAlgorithm value)
Definition Key.h:115
MultiRegionKeyType GetMultiRegionKeyType() const
Definition Key.h:318
const Aws::String & GetPrimaryRegion() const
Definition Key.h:332
const MpaStatus & GetMpaStatus() const
Definition Key.h:399
void SetExportable(bool value)
Definition Key.h:148
DeriveKeyUsage GetDeriveKeyUsage() const
Definition Key.h:295
bool DeriveKeyUsageHasBeenSet() const
Definition Key.h:296
const Aws::String & GetKeyCheckValue() const
Definition Key.h:88
const KeyAttributes & GetKeyAttributes() const
Definition Key.h:69
const Aws::Utils::DateTime & GetUsageStartTimestamp() const
Definition Key.h:216
void SetReplicationStatus(ReplicationStatusT &&value)
Definition Key.h:356
Key & WithKeyCheckValueAlgorithm(KeyCheckValueAlgorithm value)
Definition Key.h:119
Key & WithUsageStartTimestamp(UsageStartTimestampT &&value)
Definition Key.h:224
AWS_PAYMENTCRYPTOGRAPHY_API Key & operator=(Aws::Utils::Json::JsonView jsonValue)
Key & WithDeriveKeyUsage(DeriveKeyUsage value)
Definition Key.h:301
Key & WithExportable(bool value)
Definition Key.h:152
const Aws::Utils::DateTime & GetDeleteTimestamp() const
Definition Key.h:276
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