AWS SDK for C++

AWS SDK for C++ Version 1.11.816

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
112 inline KeyCheckValueAlgorithm GetKeyCheckValueAlgorithm() const { return m_keyCheckValueAlgorithm; }
113 inline bool KeyCheckValueAlgorithmHasBeenSet() const { return m_keyCheckValueAlgorithmHasBeenSet; }
115 m_keyCheckValueAlgorithmHasBeenSet = true;
116 m_keyCheckValueAlgorithm = value;
117 }
120 return *this;
121 }
123
125
128 inline bool GetEnabled() const { return m_enabled; }
129 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
130 inline void SetEnabled(bool value) {
131 m_enabledHasBeenSet = true;
132 m_enabled = value;
133 }
134 inline Key& WithEnabled(bool value) {
135 SetEnabled(value);
136 return *this;
137 }
139
141
145 inline bool GetExportable() const { return m_exportable; }
146 inline bool ExportableHasBeenSet() const { return m_exportableHasBeenSet; }
147 inline void SetExportable(bool value) {
148 m_exportableHasBeenSet = true;
149 m_exportable = value;
150 }
151 inline Key& WithExportable(bool value) {
152 SetExportable(value);
153 return *this;
154 }
156
158
161 inline KeyState GetKeyState() const { return m_keyState; }
162 inline bool KeyStateHasBeenSet() const { return m_keyStateHasBeenSet; }
163 inline void SetKeyState(KeyState value) {
164 m_keyStateHasBeenSet = true;
165 m_keyState = value;
166 }
167 inline Key& WithKeyState(KeyState value) {
168 SetKeyState(value);
169 return *this;
170 }
172
174
180 inline KeyOrigin GetKeyOrigin() const { return m_keyOrigin; }
181 inline bool KeyOriginHasBeenSet() const { return m_keyOriginHasBeenSet; }
182 inline void SetKeyOrigin(KeyOrigin value) {
183 m_keyOriginHasBeenSet = true;
184 m_keyOrigin = value;
185 }
186 inline Key& WithKeyOrigin(KeyOrigin value) {
187 SetKeyOrigin(value);
188 return *this;
189 }
191
193
196 inline const Aws::Utils::DateTime& GetCreateTimestamp() const { return m_createTimestamp; }
197 inline bool CreateTimestampHasBeenSet() const { return m_createTimestampHasBeenSet; }
198 template <typename CreateTimestampT = Aws::Utils::DateTime>
199 void SetCreateTimestamp(CreateTimestampT&& value) {
200 m_createTimestampHasBeenSet = true;
201 m_createTimestamp = std::forward<CreateTimestampT>(value);
202 }
203 template <typename CreateTimestampT = Aws::Utils::DateTime>
204 Key& WithCreateTimestamp(CreateTimestampT&& value) {
205 SetCreateTimestamp(std::forward<CreateTimestampT>(value));
206 return *this;
207 }
209
211
215 inline const Aws::Utils::DateTime& GetUsageStartTimestamp() const { return m_usageStartTimestamp; }
216 inline bool UsageStartTimestampHasBeenSet() const { return m_usageStartTimestampHasBeenSet; }
217 template <typename UsageStartTimestampT = Aws::Utils::DateTime>
218 void SetUsageStartTimestamp(UsageStartTimestampT&& value) {
219 m_usageStartTimestampHasBeenSet = true;
220 m_usageStartTimestamp = std::forward<UsageStartTimestampT>(value);
221 }
222 template <typename UsageStartTimestampT = Aws::Utils::DateTime>
223 Key& WithUsageStartTimestamp(UsageStartTimestampT&& value) {
224 SetUsageStartTimestamp(std::forward<UsageStartTimestampT>(value));
225 return *this;
226 }
228
230
234 inline const Aws::Utils::DateTime& GetUsageStopTimestamp() const { return m_usageStopTimestamp; }
235 inline bool UsageStopTimestampHasBeenSet() const { return m_usageStopTimestampHasBeenSet; }
236 template <typename UsageStopTimestampT = Aws::Utils::DateTime>
237 void SetUsageStopTimestamp(UsageStopTimestampT&& value) {
238 m_usageStopTimestampHasBeenSet = true;
239 m_usageStopTimestamp = std::forward<UsageStopTimestampT>(value);
240 }
241 template <typename UsageStopTimestampT = Aws::Utils::DateTime>
242 Key& WithUsageStopTimestamp(UsageStopTimestampT&& value) {
243 SetUsageStopTimestamp(std::forward<UsageStopTimestampT>(value));
244 return *this;
245 }
247
249
254 inline const Aws::Utils::DateTime& GetDeletePendingTimestamp() const { return m_deletePendingTimestamp; }
255 inline bool DeletePendingTimestampHasBeenSet() const { return m_deletePendingTimestampHasBeenSet; }
256 template <typename DeletePendingTimestampT = Aws::Utils::DateTime>
257 void SetDeletePendingTimestamp(DeletePendingTimestampT&& value) {
258 m_deletePendingTimestampHasBeenSet = true;
259 m_deletePendingTimestamp = std::forward<DeletePendingTimestampT>(value);
260 }
261 template <typename DeletePendingTimestampT = Aws::Utils::DateTime>
262 Key& WithDeletePendingTimestamp(DeletePendingTimestampT&& value) {
263 SetDeletePendingTimestamp(std::forward<DeletePendingTimestampT>(value));
264 return *this;
265 }
267
269
275 inline const Aws::Utils::DateTime& GetDeleteTimestamp() const { return m_deleteTimestamp; }
276 inline bool DeleteTimestampHasBeenSet() const { return m_deleteTimestampHasBeenSet; }
277 template <typename DeleteTimestampT = Aws::Utils::DateTime>
278 void SetDeleteTimestamp(DeleteTimestampT&& value) {
279 m_deleteTimestampHasBeenSet = true;
280 m_deleteTimestamp = std::forward<DeleteTimestampT>(value);
281 }
282 template <typename DeleteTimestampT = Aws::Utils::DateTime>
283 Key& WithDeleteTimestamp(DeleteTimestampT&& value) {
284 SetDeleteTimestamp(std::forward<DeleteTimestampT>(value));
285 return *this;
286 }
288
290
294 inline DeriveKeyUsage GetDeriveKeyUsage() const { return m_deriveKeyUsage; }
295 inline bool DeriveKeyUsageHasBeenSet() const { return m_deriveKeyUsageHasBeenSet; }
297 m_deriveKeyUsageHasBeenSet = true;
298 m_deriveKeyUsage = value;
299 }
301 SetDeriveKeyUsage(value);
302 return *this;
303 }
305
307
317 inline MultiRegionKeyType GetMultiRegionKeyType() const { return m_multiRegionKeyType; }
318 inline bool MultiRegionKeyTypeHasBeenSet() const { return m_multiRegionKeyTypeHasBeenSet; }
320 m_multiRegionKeyTypeHasBeenSet = true;
321 m_multiRegionKeyType = value;
322 }
325 return *this;
326 }
328
330
331 inline const Aws::String& GetPrimaryRegion() const { return m_primaryRegion; }
332 inline bool PrimaryRegionHasBeenSet() const { return m_primaryRegionHasBeenSet; }
333 template <typename PrimaryRegionT = Aws::String>
334 void SetPrimaryRegion(PrimaryRegionT&& value) {
335 m_primaryRegionHasBeenSet = true;
336 m_primaryRegion = std::forward<PrimaryRegionT>(value);
337 }
338 template <typename PrimaryRegionT = Aws::String>
339 Key& WithPrimaryRegion(PrimaryRegionT&& value) {
340 SetPrimaryRegion(std::forward<PrimaryRegionT>(value));
341 return *this;
342 }
344
346
352 inline const Aws::Map<Aws::String, ReplicationStatusType>& GetReplicationStatus() const { return m_replicationStatus; }
353 inline bool ReplicationStatusHasBeenSet() const { return m_replicationStatusHasBeenSet; }
354 template <typename ReplicationStatusT = Aws::Map<Aws::String, ReplicationStatusType>>
355 void SetReplicationStatus(ReplicationStatusT&& value) {
356 m_replicationStatusHasBeenSet = true;
357 m_replicationStatus = std::forward<ReplicationStatusT>(value);
358 }
359 template <typename ReplicationStatusT = Aws::Map<Aws::String, ReplicationStatusType>>
360 Key& WithReplicationStatus(ReplicationStatusT&& value) {
361 SetReplicationStatus(std::forward<ReplicationStatusT>(value));
362 return *this;
363 }
364 template <typename ReplicationStatusKeyT = Aws::String, typename ReplicationStatusValueT = ReplicationStatusType>
365 Key& AddReplicationStatus(ReplicationStatusKeyT&& key, ReplicationStatusValueT&& value) {
366 m_replicationStatusHasBeenSet = true;
367 m_replicationStatus.emplace(std::forward<ReplicationStatusKeyT>(key), std::forward<ReplicationStatusValueT>(value));
368 return *this;
369 }
371
373
382 inline bool GetUsingDefaultReplicationRegions() const { return m_usingDefaultReplicationRegions; }
383 inline bool UsingDefaultReplicationRegionsHasBeenSet() const { return m_usingDefaultReplicationRegionsHasBeenSet; }
384 inline void SetUsingDefaultReplicationRegions(bool value) {
385 m_usingDefaultReplicationRegionsHasBeenSet = true;
386 m_usingDefaultReplicationRegions = value;
387 }
390 return *this;
391 }
393
395
398 inline const MpaStatus& GetMpaStatus() const { return m_mpaStatus; }
399 inline bool MpaStatusHasBeenSet() const { return m_mpaStatusHasBeenSet; }
400 template <typename MpaStatusT = MpaStatus>
401 void SetMpaStatus(MpaStatusT&& value) {
402 m_mpaStatusHasBeenSet = true;
403 m_mpaStatus = std::forward<MpaStatusT>(value);
404 }
405 template <typename MpaStatusT = MpaStatus>
406 Key& WithMpaStatus(MpaStatusT&& value) {
407 SetMpaStatus(std::forward<MpaStatusT>(value));
408 return *this;
409 }
411 private:
412 Aws::String m_keyArn;
413
414 KeyAttributes m_keyAttributes;
415
416 Aws::String m_keyCheckValue;
417
419
420 bool m_enabled{false};
421
422 bool m_exportable{false};
423
424 KeyState m_keyState{KeyState::NOT_SET};
425
426 KeyOrigin m_keyOrigin{KeyOrigin::NOT_SET};
427
428 Aws::Utils::DateTime m_createTimestamp{};
429
430 Aws::Utils::DateTime m_usageStartTimestamp{};
431
432 Aws::Utils::DateTime m_usageStopTimestamp{};
433
434 Aws::Utils::DateTime m_deletePendingTimestamp{};
435
436 Aws::Utils::DateTime m_deleteTimestamp{};
437
438 DeriveKeyUsage m_deriveKeyUsage{DeriveKeyUsage::NOT_SET};
439
441
442 Aws::String m_primaryRegion;
443
445
446 bool m_usingDefaultReplicationRegions{false};
447
448 MpaStatus m_mpaStatus;
449 bool m_keyArnHasBeenSet = false;
450 bool m_keyAttributesHasBeenSet = false;
451 bool m_keyCheckValueHasBeenSet = false;
452 bool m_keyCheckValueAlgorithmHasBeenSet = false;
453 bool m_enabledHasBeenSet = false;
454 bool m_exportableHasBeenSet = false;
455 bool m_keyStateHasBeenSet = false;
456 bool m_keyOriginHasBeenSet = false;
457 bool m_createTimestampHasBeenSet = false;
458 bool m_usageStartTimestampHasBeenSet = false;
459 bool m_usageStopTimestampHasBeenSet = false;
460 bool m_deletePendingTimestampHasBeenSet = false;
461 bool m_deleteTimestampHasBeenSet = false;
462 bool m_deriveKeyUsageHasBeenSet = false;
463 bool m_multiRegionKeyTypeHasBeenSet = false;
464 bool m_primaryRegionHasBeenSet = false;
465 bool m_replicationStatusHasBeenSet = false;
466 bool m_usingDefaultReplicationRegionsHasBeenSet = false;
467 bool m_mpaStatusHasBeenSet = false;
468};
469
470} // namespace Model
471} // namespace PaymentCryptography
472} // namespace Aws
AWS_PAYMENTCRYPTOGRAPHY_API Key(Aws::Utils::Json::JsonView jsonValue)
Key & WithDeletePendingTimestamp(DeletePendingTimestampT &&value)
Definition Key.h:262
Key & WithKeyArn(KeyArnT &&value)
Definition Key.h:57
const Aws::Utils::DateTime & GetCreateTimestamp() const
Definition Key.h:196
Key & WithKeyState(KeyState value)
Definition Key.h:167
void SetKeyOrigin(KeyOrigin value)
Definition Key.h:182
void SetDeriveKeyUsage(DeriveKeyUsage value)
Definition Key.h:296
void SetEnabled(bool value)
Definition Key.h:130
const Aws::Map< Aws::String, ReplicationStatusType > & GetReplicationStatus() const
Definition Key.h:352
void SetUsageStartTimestamp(UsageStartTimestampT &&value)
Definition Key.h:218
Key & WithMultiRegionKeyType(MultiRegionKeyType value)
Definition Key.h:323
bool UsageStartTimestampHasBeenSet() const
Definition Key.h:216
void SetMultiRegionKeyType(MultiRegionKeyType value)
Definition Key.h:319
void SetDeletePendingTimestamp(DeletePendingTimestampT &&value)
Definition Key.h:257
Key & WithEnabled(bool value)
Definition Key.h:134
AWS_PAYMENTCRYPTOGRAPHY_API Key()=default
void SetUsageStopTimestamp(UsageStopTimestampT &&value)
Definition Key.h:237
void SetKeyArn(KeyArnT &&value)
Definition Key.h:52
bool DeletePendingTimestampHasBeenSet() const
Definition Key.h:255
bool CreateTimestampHasBeenSet() const
Definition Key.h:197
bool KeyCheckValueHasBeenSet() const
Definition Key.h:89
bool DeleteTimestampHasBeenSet() const
Definition Key.h:276
bool MultiRegionKeyTypeHasBeenSet() const
Definition Key.h:318
void SetPrimaryRegion(PrimaryRegionT &&value)
Definition Key.h:334
void SetKeyCheckValue(KeyCheckValueT &&value)
Definition Key.h:91
bool KeyCheckValueAlgorithmHasBeenSet() const
Definition Key.h:113
const Aws::Utils::DateTime & GetDeletePendingTimestamp() const
Definition Key.h:254
bool UsageStopTimestampHasBeenSet() const
Definition Key.h:235
const Aws::String & GetKeyArn() const
Definition Key.h:49
bool ReplicationStatusHasBeenSet() const
Definition Key.h:353
KeyState GetKeyState() const
Definition Key.h:161
AWS_PAYMENTCRYPTOGRAPHY_API Aws::Utils::Json::JsonValue Jsonize() const
Key & WithUsageStopTimestamp(UsageStopTimestampT &&value)
Definition Key.h:242
Key & WithDeleteTimestamp(DeleteTimestampT &&value)
Definition Key.h:283
Key & WithKeyCheckValue(KeyCheckValueT &&value)
Definition Key.h:96
void SetDeleteTimestamp(DeleteTimestampT &&value)
Definition Key.h:278
Key & WithKeyAttributes(KeyAttributesT &&value)
Definition Key.h:77
Key & WithMpaStatus(MpaStatusT &&value)
Definition Key.h:406
void SetKeyAttributes(KeyAttributesT &&value)
Definition Key.h:72
Key & WithReplicationStatus(ReplicationStatusT &&value)
Definition Key.h:360
Key & WithPrimaryRegion(PrimaryRegionT &&value)
Definition Key.h:339
const Aws::Utils::DateTime & GetUsageStopTimestamp() const
Definition Key.h:234
void SetKeyState(KeyState value)
Definition Key.h:163
void SetCreateTimestamp(CreateTimestampT &&value)
Definition Key.h:199
Key & WithCreateTimestamp(CreateTimestampT &&value)
Definition Key.h:204
bool PrimaryRegionHasBeenSet() const
Definition Key.h:332
bool GetUsingDefaultReplicationRegions() const
Definition Key.h:382
bool KeyAttributesHasBeenSet() const
Definition Key.h:70
Key & WithKeyOrigin(KeyOrigin value)
Definition Key.h:186
KeyOrigin GetKeyOrigin() const
Definition Key.h:180
void SetMpaStatus(MpaStatusT &&value)
Definition Key.h:401
void SetUsingDefaultReplicationRegions(bool value)
Definition Key.h:384
KeyCheckValueAlgorithm GetKeyCheckValueAlgorithm() const
Definition Key.h:112
bool UsingDefaultReplicationRegionsHasBeenSet() const
Definition Key.h:383
Key & AddReplicationStatus(ReplicationStatusKeyT &&key, ReplicationStatusValueT &&value)
Definition Key.h:365
Key & WithUsingDefaultReplicationRegions(bool value)
Definition Key.h:388
void SetKeyCheckValueAlgorithm(KeyCheckValueAlgorithm value)
Definition Key.h:114
MultiRegionKeyType GetMultiRegionKeyType() const
Definition Key.h:317
const Aws::String & GetPrimaryRegion() const
Definition Key.h:331
const MpaStatus & GetMpaStatus() const
Definition Key.h:398
void SetExportable(bool value)
Definition Key.h:147
DeriveKeyUsage GetDeriveKeyUsage() const
Definition Key.h:294
bool DeriveKeyUsageHasBeenSet() const
Definition Key.h:295
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:215
void SetReplicationStatus(ReplicationStatusT &&value)
Definition Key.h:355
Key & WithKeyCheckValueAlgorithm(KeyCheckValueAlgorithm value)
Definition Key.h:118
Key & WithUsageStartTimestamp(UsageStartTimestampT &&value)
Definition Key.h:223
AWS_PAYMENTCRYPTOGRAPHY_API Key & operator=(Aws::Utils::Json::JsonView jsonValue)
Key & WithDeriveKeyUsage(DeriveKeyUsage value)
Definition Key.h:300
Key & WithExportable(bool value)
Definition Key.h:151
const Aws::Utils::DateTime & GetDeleteTimestamp() const
Definition Key.h:275
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