/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace PaymentCryptography { namespace Model { /** *

Metadata about an Amazon Web Services Payment Cryptography key.

See * Also:

AWS * API Reference

*/ class Key { public: AWS_PAYMENTCRYPTOGRAPHY_API Key(); AWS_PAYMENTCRYPTOGRAPHY_API Key(Aws::Utils::Json::JsonView jsonValue); AWS_PAYMENTCRYPTOGRAPHY_API Key& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_PAYMENTCRYPTOGRAPHY_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The date and time when the key was created.

*/ inline const Aws::Utils::DateTime& GetCreateTimestamp() const{ return m_createTimestamp; } /** *

The date and time when the key was created.

*/ inline bool CreateTimestampHasBeenSet() const { return m_createTimestampHasBeenSet; } /** *

The date and time when the key was created.

*/ inline void SetCreateTimestamp(const Aws::Utils::DateTime& value) { m_createTimestampHasBeenSet = true; m_createTimestamp = value; } /** *

The date and time when the key was created.

*/ inline void SetCreateTimestamp(Aws::Utils::DateTime&& value) { m_createTimestampHasBeenSet = true; m_createTimestamp = std::move(value); } /** *

The date and time when the key was created.

*/ inline Key& WithCreateTimestamp(const Aws::Utils::DateTime& value) { SetCreateTimestamp(value); return *this;} /** *

The date and time when the key was created.

*/ inline Key& WithCreateTimestamp(Aws::Utils::DateTime&& value) { SetCreateTimestamp(std::move(value)); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when KeyState is * DELETE_PENDING and the key is scheduled for deletion.

*/ inline const Aws::Utils::DateTime& GetDeletePendingTimestamp() const{ return m_deletePendingTimestamp; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when KeyState is * DELETE_PENDING and the key is scheduled for deletion.

*/ inline bool DeletePendingTimestampHasBeenSet() const { return m_deletePendingTimestampHasBeenSet; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when KeyState is * DELETE_PENDING and the key is scheduled for deletion.

*/ inline void SetDeletePendingTimestamp(const Aws::Utils::DateTime& value) { m_deletePendingTimestampHasBeenSet = true; m_deletePendingTimestamp = value; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when KeyState is * DELETE_PENDING and the key is scheduled for deletion.

*/ inline void SetDeletePendingTimestamp(Aws::Utils::DateTime&& value) { m_deletePendingTimestampHasBeenSet = true; m_deletePendingTimestamp = std::move(value); } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when KeyState is * DELETE_PENDING and the key is scheduled for deletion.

*/ inline Key& WithDeletePendingTimestamp(const Aws::Utils::DateTime& value) { SetDeletePendingTimestamp(value); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when KeyState is * DELETE_PENDING and the key is scheduled for deletion.

*/ inline Key& WithDeletePendingTimestamp(Aws::Utils::DateTime&& value) { SetDeletePendingTimestamp(std::move(value)); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when when the KeyState * is DELETE_COMPLETE and the Amazon Web Services Payment Cryptography * key is deleted.

*/ inline const Aws::Utils::DateTime& GetDeleteTimestamp() const{ return m_deleteTimestamp; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when when the KeyState * is DELETE_COMPLETE and the Amazon Web Services Payment Cryptography * key is deleted.

*/ inline bool DeleteTimestampHasBeenSet() const { return m_deleteTimestampHasBeenSet; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when when the KeyState * is DELETE_COMPLETE and the Amazon Web Services Payment Cryptography * key is deleted.

*/ inline void SetDeleteTimestamp(const Aws::Utils::DateTime& value) { m_deleteTimestampHasBeenSet = true; m_deleteTimestamp = value; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when when the KeyState * is DELETE_COMPLETE and the Amazon Web Services Payment Cryptography * key is deleted.

*/ inline void SetDeleteTimestamp(Aws::Utils::DateTime&& value) { m_deleteTimestampHasBeenSet = true; m_deleteTimestamp = std::move(value); } /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when when the KeyState * is DELETE_COMPLETE and the Amazon Web Services Payment Cryptography * key is deleted.

*/ inline Key& WithDeleteTimestamp(const Aws::Utils::DateTime& value) { SetDeleteTimestamp(value); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * delete the key. This value is present only when when the KeyState * is DELETE_COMPLETE and the Amazon Web Services Payment Cryptography * key is deleted.

*/ inline Key& WithDeleteTimestamp(Aws::Utils::DateTime&& value) { SetDeleteTimestamp(std::move(value)); return *this;} /** *

Specifies whether the key is enabled.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Specifies whether the key is enabled.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Specifies whether the key is enabled.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Specifies whether the key is enabled.

*/ inline Key& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

Specifies whether the key is exportable. This data is immutable after the key * is created.

*/ inline bool GetExportable() const{ return m_exportable; } /** *

Specifies whether the key is exportable. This data is immutable after the key * is created.

*/ inline bool ExportableHasBeenSet() const { return m_exportableHasBeenSet; } /** *

Specifies whether the key is exportable. This data is immutable after the key * is created.

*/ inline void SetExportable(bool value) { m_exportableHasBeenSet = true; m_exportable = value; } /** *

Specifies whether the key is exportable. This data is immutable after the key * is created.

*/ inline Key& WithExportable(bool value) { SetExportable(value); return *this;} /** *

The Amazon Resource Name (ARN) of the key.

*/ inline const Aws::String& GetKeyArn() const{ return m_keyArn; } /** *

The Amazon Resource Name (ARN) of the key.

*/ inline bool KeyArnHasBeenSet() const { return m_keyArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the key.

*/ inline void SetKeyArn(const Aws::String& value) { m_keyArnHasBeenSet = true; m_keyArn = value; } /** *

The Amazon Resource Name (ARN) of the key.

*/ inline void SetKeyArn(Aws::String&& value) { m_keyArnHasBeenSet = true; m_keyArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the key.

*/ inline void SetKeyArn(const char* value) { m_keyArnHasBeenSet = true; m_keyArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the key.

*/ inline Key& WithKeyArn(const Aws::String& value) { SetKeyArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the key.

*/ inline Key& WithKeyArn(Aws::String&& value) { SetKeyArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the key.

*/ inline Key& WithKeyArn(const char* value) { SetKeyArn(value); return *this;} /** *

The role of the key, the algorithm it supports, and the cryptographic * operations allowed with the key. This data is immutable after the key is * created.

*/ inline const KeyAttributes& GetKeyAttributes() const{ return m_keyAttributes; } /** *

The role of the key, the algorithm it supports, and the cryptographic * operations allowed with the key. This data is immutable after the key is * created.

*/ inline bool KeyAttributesHasBeenSet() const { return m_keyAttributesHasBeenSet; } /** *

The role of the key, the algorithm it supports, and the cryptographic * operations allowed with the key. This data is immutable after the key is * created.

*/ inline void SetKeyAttributes(const KeyAttributes& value) { m_keyAttributesHasBeenSet = true; m_keyAttributes = value; } /** *

The role of the key, the algorithm it supports, and the cryptographic * operations allowed with the key. This data is immutable after the key is * created.

*/ inline void SetKeyAttributes(KeyAttributes&& value) { m_keyAttributesHasBeenSet = true; m_keyAttributes = std::move(value); } /** *

The role of the key, the algorithm it supports, and the cryptographic * operations allowed with the key. This data is immutable after the key is * created.

*/ inline Key& WithKeyAttributes(const KeyAttributes& value) { SetKeyAttributes(value); return *this;} /** *

The role of the key, the algorithm it supports, and the cryptographic * operations allowed with the key. This data is immutable after the key is * created.

*/ inline Key& WithKeyAttributes(KeyAttributes&& value) { SetKeyAttributes(std::move(value)); return *this;} /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline const Aws::String& GetKeyCheckValue() const{ return m_keyCheckValue; } /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline bool KeyCheckValueHasBeenSet() const { return m_keyCheckValueHasBeenSet; } /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline void SetKeyCheckValue(const Aws::String& value) { m_keyCheckValueHasBeenSet = true; m_keyCheckValue = value; } /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline void SetKeyCheckValue(Aws::String&& value) { m_keyCheckValueHasBeenSet = true; m_keyCheckValue = std::move(value); } /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline void SetKeyCheckValue(const char* value) { m_keyCheckValueHasBeenSet = true; m_keyCheckValue.assign(value); } /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline Key& WithKeyCheckValue(const Aws::String& value) { SetKeyCheckValue(value); return *this;} /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline Key& WithKeyCheckValue(Aws::String&& value) { SetKeyCheckValue(std::move(value)); return *this;} /** *

The key check value (KCV) is used to check if all parties holding a given key * have the same key or to detect that a key has changed. Amazon Web Services * Payment Cryptography calculates the KCV by using standard algorithms, typically * by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to * the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ inline Key& WithKeyCheckValue(const char* value) { SetKeyCheckValue(value); return *this;} /** *

The algorithm used for calculating key check value (KCV) for DES and AES * keys. For a DES key, Amazon Web Services Payment Cryptography computes the KCV * by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For an AES key, * Amazon Web Services Payment Cryptography computes the KCV by encrypting 8 bytes, * each with value '01', with the key to be checked and retaining the 3 highest * order bytes of the encrypted result.

*/ inline const KeyCheckValueAlgorithm& GetKeyCheckValueAlgorithm() const{ return m_keyCheckValueAlgorithm; } /** *

The algorithm used for calculating key check value (KCV) for DES and AES * keys. For a DES key, Amazon Web Services Payment Cryptography computes the KCV * by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For an AES key, * Amazon Web Services Payment Cryptography computes the KCV by encrypting 8 bytes, * each with value '01', with the key to be checked and retaining the 3 highest * order bytes of the encrypted result.

*/ inline bool KeyCheckValueAlgorithmHasBeenSet() const { return m_keyCheckValueAlgorithmHasBeenSet; } /** *

The algorithm used for calculating key check value (KCV) for DES and AES * keys. For a DES key, Amazon Web Services Payment Cryptography computes the KCV * by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For an AES key, * Amazon Web Services Payment Cryptography computes the KCV by encrypting 8 bytes, * each with value '01', with the key to be checked and retaining the 3 highest * order bytes of the encrypted result.

*/ inline void SetKeyCheckValueAlgorithm(const KeyCheckValueAlgorithm& value) { m_keyCheckValueAlgorithmHasBeenSet = true; m_keyCheckValueAlgorithm = value; } /** *

The algorithm used for calculating key check value (KCV) for DES and AES * keys. For a DES key, Amazon Web Services Payment Cryptography computes the KCV * by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For an AES key, * Amazon Web Services Payment Cryptography computes the KCV by encrypting 8 bytes, * each with value '01', with the key to be checked and retaining the 3 highest * order bytes of the encrypted result.

*/ inline void SetKeyCheckValueAlgorithm(KeyCheckValueAlgorithm&& value) { m_keyCheckValueAlgorithmHasBeenSet = true; m_keyCheckValueAlgorithm = std::move(value); } /** *

The algorithm used for calculating key check value (KCV) for DES and AES * keys. For a DES key, Amazon Web Services Payment Cryptography computes the KCV * by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For an AES key, * Amazon Web Services Payment Cryptography computes the KCV by encrypting 8 bytes, * each with value '01', with the key to be checked and retaining the 3 highest * order bytes of the encrypted result.

*/ inline Key& WithKeyCheckValueAlgorithm(const KeyCheckValueAlgorithm& value) { SetKeyCheckValueAlgorithm(value); return *this;} /** *

The algorithm used for calculating key check value (KCV) for DES and AES * keys. For a DES key, Amazon Web Services Payment Cryptography computes the KCV * by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For an AES key, * Amazon Web Services Payment Cryptography computes the KCV by encrypting 8 bytes, * each with value '01', with the key to be checked and retaining the 3 highest * order bytes of the encrypted result.

*/ inline Key& WithKeyCheckValueAlgorithm(KeyCheckValueAlgorithm&& value) { SetKeyCheckValueAlgorithm(std::move(value)); return *this;} /** *

The source of the key material. For keys created within Amazon Web Services * Payment Cryptography, the value is AWS_PAYMENT_CRYPTOGRAPHY. For * keys imported into Amazon Web Services Payment Cryptography, the value is * EXTERNAL.

*/ inline const KeyOrigin& GetKeyOrigin() const{ return m_keyOrigin; } /** *

The source of the key material. For keys created within Amazon Web Services * Payment Cryptography, the value is AWS_PAYMENT_CRYPTOGRAPHY. For * keys imported into Amazon Web Services Payment Cryptography, the value is * EXTERNAL.

*/ inline bool KeyOriginHasBeenSet() const { return m_keyOriginHasBeenSet; } /** *

The source of the key material. For keys created within Amazon Web Services * Payment Cryptography, the value is AWS_PAYMENT_CRYPTOGRAPHY. For * keys imported into Amazon Web Services Payment Cryptography, the value is * EXTERNAL.

*/ inline void SetKeyOrigin(const KeyOrigin& value) { m_keyOriginHasBeenSet = true; m_keyOrigin = value; } /** *

The source of the key material. For keys created within Amazon Web Services * Payment Cryptography, the value is AWS_PAYMENT_CRYPTOGRAPHY. For * keys imported into Amazon Web Services Payment Cryptography, the value is * EXTERNAL.

*/ inline void SetKeyOrigin(KeyOrigin&& value) { m_keyOriginHasBeenSet = true; m_keyOrigin = std::move(value); } /** *

The source of the key material. For keys created within Amazon Web Services * Payment Cryptography, the value is AWS_PAYMENT_CRYPTOGRAPHY. For * keys imported into Amazon Web Services Payment Cryptography, the value is * EXTERNAL.

*/ inline Key& WithKeyOrigin(const KeyOrigin& value) { SetKeyOrigin(value); return *this;} /** *

The source of the key material. For keys created within Amazon Web Services * Payment Cryptography, the value is AWS_PAYMENT_CRYPTOGRAPHY. For * keys imported into Amazon Web Services Payment Cryptography, the value is * EXTERNAL.

*/ inline Key& WithKeyOrigin(KeyOrigin&& value) { SetKeyOrigin(std::move(value)); return *this;} /** *

The state of key that is being created or deleted.

*/ inline const KeyState& GetKeyState() const{ return m_keyState; } /** *

The state of key that is being created or deleted.

*/ inline bool KeyStateHasBeenSet() const { return m_keyStateHasBeenSet; } /** *

The state of key that is being created or deleted.

*/ inline void SetKeyState(const KeyState& value) { m_keyStateHasBeenSet = true; m_keyState = value; } /** *

The state of key that is being created or deleted.

*/ inline void SetKeyState(KeyState&& value) { m_keyStateHasBeenSet = true; m_keyState = std::move(value); } /** *

The state of key that is being created or deleted.

*/ inline Key& WithKeyState(const KeyState& value) { SetKeyState(value); return *this;} /** *

The state of key that is being created or deleted.

*/ inline Key& WithKeyState(KeyState&& value) { SetKeyState(std::move(value)); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * start using the key material for cryptographic operations.

*/ inline const Aws::Utils::DateTime& GetUsageStartTimestamp() const{ return m_usageStartTimestamp; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * start using the key material for cryptographic operations.

*/ inline bool UsageStartTimestampHasBeenSet() const { return m_usageStartTimestampHasBeenSet; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * start using the key material for cryptographic operations.

*/ inline void SetUsageStartTimestamp(const Aws::Utils::DateTime& value) { m_usageStartTimestampHasBeenSet = true; m_usageStartTimestamp = value; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * start using the key material for cryptographic operations.

*/ inline void SetUsageStartTimestamp(Aws::Utils::DateTime&& value) { m_usageStartTimestampHasBeenSet = true; m_usageStartTimestamp = std::move(value); } /** *

The date and time after which Amazon Web Services Payment Cryptography will * start using the key material for cryptographic operations.

*/ inline Key& WithUsageStartTimestamp(const Aws::Utils::DateTime& value) { SetUsageStartTimestamp(value); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * start using the key material for cryptographic operations.

*/ inline Key& WithUsageStartTimestamp(Aws::Utils::DateTime&& value) { SetUsageStartTimestamp(std::move(value)); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * stop using the key material for cryptographic operations.

*/ inline const Aws::Utils::DateTime& GetUsageStopTimestamp() const{ return m_usageStopTimestamp; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * stop using the key material for cryptographic operations.

*/ inline bool UsageStopTimestampHasBeenSet() const { return m_usageStopTimestampHasBeenSet; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * stop using the key material for cryptographic operations.

*/ inline void SetUsageStopTimestamp(const Aws::Utils::DateTime& value) { m_usageStopTimestampHasBeenSet = true; m_usageStopTimestamp = value; } /** *

The date and time after which Amazon Web Services Payment Cryptography will * stop using the key material for cryptographic operations.

*/ inline void SetUsageStopTimestamp(Aws::Utils::DateTime&& value) { m_usageStopTimestampHasBeenSet = true; m_usageStopTimestamp = std::move(value); } /** *

The date and time after which Amazon Web Services Payment Cryptography will * stop using the key material for cryptographic operations.

*/ inline Key& WithUsageStopTimestamp(const Aws::Utils::DateTime& value) { SetUsageStopTimestamp(value); return *this;} /** *

The date and time after which Amazon Web Services Payment Cryptography will * stop using the key material for cryptographic operations.

*/ inline Key& WithUsageStopTimestamp(Aws::Utils::DateTime&& value) { SetUsageStopTimestamp(std::move(value)); return *this;} private: Aws::Utils::DateTime m_createTimestamp; bool m_createTimestampHasBeenSet = false; Aws::Utils::DateTime m_deletePendingTimestamp; bool m_deletePendingTimestampHasBeenSet = false; Aws::Utils::DateTime m_deleteTimestamp; bool m_deleteTimestampHasBeenSet = false; bool m_enabled; bool m_enabledHasBeenSet = false; bool m_exportable; bool m_exportableHasBeenSet = false; Aws::String m_keyArn; bool m_keyArnHasBeenSet = false; KeyAttributes m_keyAttributes; bool m_keyAttributesHasBeenSet = false; Aws::String m_keyCheckValue; bool m_keyCheckValueHasBeenSet = false; KeyCheckValueAlgorithm m_keyCheckValueAlgorithm; bool m_keyCheckValueAlgorithmHasBeenSet = false; KeyOrigin m_keyOrigin; bool m_keyOriginHasBeenSet = false; KeyState m_keyState; bool m_keyStateHasBeenSet = false; Aws::Utils::DateTime m_usageStartTimestamp; bool m_usageStartTimestampHasBeenSet = false; Aws::Utils::DateTime m_usageStopTimestamp; bool m_usageStopTimestampHasBeenSet = false; }; } // namespace Model } // namespace PaymentCryptography } // namespace Aws