/** * 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 namespace Aws { namespace PaymentCryptography { namespace Model { /** */ class CreateKeyRequest : public PaymentCryptographyRequest { public: AWS_PAYMENTCRYPTOGRAPHY_API CreateKeyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateKey"; } AWS_PAYMENTCRYPTOGRAPHY_API Aws::String SerializePayload() const override; AWS_PAYMENTCRYPTOGRAPHY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies whether to enable the key. If the key is enabled, it is activated * for use within the service. If the key not enabled, then it is created but not * activated. The default value is enabled.

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

Specifies whether to enable the key. If the key is enabled, it is activated * for use within the service. If the key not enabled, then it is created but not * activated. The default value is enabled.

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

Specifies whether to enable the key. If the key is enabled, it is activated * for use within the service. If the key not enabled, then it is created but not * activated. The default value is enabled.

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

Specifies whether to enable the key. If the key is enabled, it is activated * for use within the service. If the key not enabled, then it is created but not * activated. The default value is enabled.

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

Specifies whether the key is exportable from the service.

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

Specifies whether the key is exportable from the service.

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

Specifies whether the key is exportable from the service.

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

Specifies whether the key is exportable from the service.

*/ inline CreateKeyRequest& WithExportable(bool value) { SetExportable(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 CreateKeyRequest& 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 CreateKeyRequest& WithKeyAttributes(KeyAttributes&& value) { SetKeyAttributes(std::move(value)); return *this;} /** *

The algorithm that Amazon Web Services Payment Cryptography uses to calculate * the key check value (KCV) for DES and AES keys.

For DES key, the KCV is * computed 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 AES key, * the KCV is computed 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 that Amazon Web Services Payment Cryptography uses to calculate * the key check value (KCV) for DES and AES keys.

For DES key, the KCV is * computed 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 AES key, * the KCV is computed 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 that Amazon Web Services Payment Cryptography uses to calculate * the key check value (KCV) for DES and AES keys.

For DES key, the KCV is * computed 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 AES key, * the KCV is computed 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 that Amazon Web Services Payment Cryptography uses to calculate * the key check value (KCV) for DES and AES keys.

For DES key, the KCV is * computed 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 AES key, * the KCV is computed 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 that Amazon Web Services Payment Cryptography uses to calculate * the key check value (KCV) for DES and AES keys.

For DES key, the KCV is * computed 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 AES key, * the KCV is computed 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 CreateKeyRequest& WithKeyCheckValueAlgorithm(const KeyCheckValueAlgorithm& value) { SetKeyCheckValueAlgorithm(value); return *this;} /** *

The algorithm that Amazon Web Services Payment Cryptography uses to calculate * the key check value (KCV) for DES and AES keys.

For DES key, the KCV is * computed 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 AES key, * the KCV is computed 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 CreateKeyRequest& WithKeyCheckValueAlgorithm(KeyCheckValueAlgorithm&& value) { SetKeyCheckValueAlgorithm(std::move(value)); return *this;} /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline CreateKeyRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline CreateKeyRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline CreateKeyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tags to attach to the key. Each tag consists of a tag key and a tag * value. Both the tag key and the tag value are required, but the tag value can be * an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key.

To use this * parameter, you must have TagResource permission.

*

Don't include confidential or sensitive information in this field. This field * may be displayed in plaintext in CloudTrail logs and other output.

*

Tagging or untagging an Amazon Web Services Payment * Cryptography key can allow or deny permission to the key.

*/ inline CreateKeyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: bool m_enabled; bool m_enabledHasBeenSet = false; bool m_exportable; bool m_exportableHasBeenSet = false; KeyAttributes m_keyAttributes; bool m_keyAttributesHasBeenSet = false; KeyCheckValueAlgorithm m_keyCheckValueAlgorithm; bool m_keyCheckValueAlgorithmHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace PaymentCryptography } // namespace Aws