/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace KMS { namespace Model { class DecryptResult { public: AWS_KMS_API DecryptResult(); AWS_KMS_API DecryptResult(const Aws::AmazonWebServiceResult& result); AWS_KMS_API DecryptResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The Amazon Resource Name (key * ARN) of the KMS key that was used to decrypt the ciphertext.

*/ inline const Aws::String& GetKeyId() const{ return m_keyId; } /** *

The Amazon Resource Name (key * ARN) of the KMS key that was used to decrypt the ciphertext.

*/ inline void SetKeyId(const Aws::String& value) { m_keyId = value; } /** *

The Amazon Resource Name (key * ARN) of the KMS key that was used to decrypt the ciphertext.

*/ inline void SetKeyId(Aws::String&& value) { m_keyId = std::move(value); } /** *

The Amazon Resource Name (key * ARN) of the KMS key that was used to decrypt the ciphertext.

*/ inline void SetKeyId(const char* value) { m_keyId.assign(value); } /** *

The Amazon Resource Name (key * ARN) of the KMS key that was used to decrypt the ciphertext.

*/ inline DecryptResult& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;} /** *

The Amazon Resource Name (key * ARN) of the KMS key that was used to decrypt the ciphertext.

*/ inline DecryptResult& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;} /** *

The Amazon Resource Name (key * ARN) of the KMS key that was used to decrypt the ciphertext.

*/ inline DecryptResult& WithKeyId(const char* value) { SetKeyId(value); return *this;} /** *

Decrypted plaintext data. When you use the HTTP API or the Amazon Web * Services CLI, the value is Base64-encoded. Otherwise, it is not * Base64-encoded.

If the response includes the * CiphertextForRecipient field, the Plaintext field is * null or empty.

*/ inline const Aws::Utils::CryptoBuffer& GetPlaintext() const{ return m_plaintext; } /** *

Decrypted plaintext data. When you use the HTTP API or the Amazon Web * Services CLI, the value is Base64-encoded. Otherwise, it is not * Base64-encoded.

If the response includes the * CiphertextForRecipient field, the Plaintext field is * null or empty.

*/ inline void SetPlaintext(const Aws::Utils::CryptoBuffer& value) { m_plaintext = value; } /** *

Decrypted plaintext data. When you use the HTTP API or the Amazon Web * Services CLI, the value is Base64-encoded. Otherwise, it is not * Base64-encoded.

If the response includes the * CiphertextForRecipient field, the Plaintext field is * null or empty.

*/ inline void SetPlaintext(Aws::Utils::CryptoBuffer&& value) { m_plaintext = std::move(value); } /** *

Decrypted plaintext data. When you use the HTTP API or the Amazon Web * Services CLI, the value is Base64-encoded. Otherwise, it is not * Base64-encoded.

If the response includes the * CiphertextForRecipient field, the Plaintext field is * null or empty.

*/ inline DecryptResult& WithPlaintext(const Aws::Utils::CryptoBuffer& value) { SetPlaintext(value); return *this;} /** *

Decrypted plaintext data. When you use the HTTP API or the Amazon Web * Services CLI, the value is Base64-encoded. Otherwise, it is not * Base64-encoded.

If the response includes the * CiphertextForRecipient field, the Plaintext field is * null or empty.

*/ inline DecryptResult& WithPlaintext(Aws::Utils::CryptoBuffer&& value) { SetPlaintext(std::move(value)); return *this;} /** *

The encryption algorithm that was used to decrypt the ciphertext.

*/ inline const EncryptionAlgorithmSpec& GetEncryptionAlgorithm() const{ return m_encryptionAlgorithm; } /** *

The encryption algorithm that was used to decrypt the ciphertext.

*/ inline void SetEncryptionAlgorithm(const EncryptionAlgorithmSpec& value) { m_encryptionAlgorithm = value; } /** *

The encryption algorithm that was used to decrypt the ciphertext.

*/ inline void SetEncryptionAlgorithm(EncryptionAlgorithmSpec&& value) { m_encryptionAlgorithm = std::move(value); } /** *

The encryption algorithm that was used to decrypt the ciphertext.

*/ inline DecryptResult& WithEncryptionAlgorithm(const EncryptionAlgorithmSpec& value) { SetEncryptionAlgorithm(value); return *this;} /** *

The encryption algorithm that was used to decrypt the ciphertext.

*/ inline DecryptResult& WithEncryptionAlgorithm(EncryptionAlgorithmSpec&& value) { SetEncryptionAlgorithm(std::move(value)); return *this;} /** *

The plaintext data encrypted with the public key in the attestation document. *

This field is included in the response only when the * Recipient parameter in the request includes a valid attestation * document from an Amazon Web Services Nitro enclave. For information about the * interaction between KMS and Amazon Web Services Nitro Enclaves, see How * Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service * Developer Guide.

*/ inline const Aws::Utils::ByteBuffer& GetCiphertextForRecipient() const{ return m_ciphertextForRecipient; } /** *

The plaintext data encrypted with the public key in the attestation document. *

This field is included in the response only when the * Recipient parameter in the request includes a valid attestation * document from an Amazon Web Services Nitro enclave. For information about the * interaction between KMS and Amazon Web Services Nitro Enclaves, see How * Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service * Developer Guide.

*/ inline void SetCiphertextForRecipient(const Aws::Utils::ByteBuffer& value) { m_ciphertextForRecipient = value; } /** *

The plaintext data encrypted with the public key in the attestation document. *

This field is included in the response only when the * Recipient parameter in the request includes a valid attestation * document from an Amazon Web Services Nitro enclave. For information about the * interaction between KMS and Amazon Web Services Nitro Enclaves, see How * Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service * Developer Guide.

*/ inline void SetCiphertextForRecipient(Aws::Utils::ByteBuffer&& value) { m_ciphertextForRecipient = std::move(value); } /** *

The plaintext data encrypted with the public key in the attestation document. *

This field is included in the response only when the * Recipient parameter in the request includes a valid attestation * document from an Amazon Web Services Nitro enclave. For information about the * interaction between KMS and Amazon Web Services Nitro Enclaves, see How * Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service * Developer Guide.

*/ inline DecryptResult& WithCiphertextForRecipient(const Aws::Utils::ByteBuffer& value) { SetCiphertextForRecipient(value); return *this;} /** *

The plaintext data encrypted with the public key in the attestation document. *

This field is included in the response only when the * Recipient parameter in the request includes a valid attestation * document from an Amazon Web Services Nitro enclave. For information about the * interaction between KMS and Amazon Web Services Nitro Enclaves, see How * Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service * Developer Guide.

*/ inline DecryptResult& WithCiphertextForRecipient(Aws::Utils::ByteBuffer&& value) { SetCiphertextForRecipient(std::move(value)); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline DecryptResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline DecryptResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline DecryptResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_keyId; Aws::Utils::CryptoBuffer m_plaintext; EncryptionAlgorithmSpec m_encryptionAlgorithm; Aws::Utils::ByteBuffer m_ciphertextForRecipient; Aws::String m_requestId; }; } // namespace Model } // namespace KMS } // namespace Aws