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

The random byte string. 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; } /** *

The random byte string. 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; } /** *

The random byte string. 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); } /** *

The random byte string. 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 GenerateRandomResult& WithPlaintext(const Aws::Utils::CryptoBuffer& value) { SetPlaintext(value); return *this;} /** *

The random byte string. 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 GenerateRandomResult& WithPlaintext(Aws::Utils::CryptoBuffer&& value) { SetPlaintext(std::move(value)); return *this;} /** *

The plaintext random bytes encrypted with the public key from the Nitro * enclave. This ciphertext can be decrypted only by using a private key in the * Nitro enclave.

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 random bytes encrypted with the public key from the Nitro * enclave. This ciphertext can be decrypted only by using a private key in the * Nitro enclave.

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 random bytes encrypted with the public key from the Nitro * enclave. This ciphertext can be decrypted only by using a private key in the * Nitro enclave.

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 random bytes encrypted with the public key from the Nitro * enclave. This ciphertext can be decrypted only by using a private key in the * Nitro enclave.

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 GenerateRandomResult& WithCiphertextForRecipient(const Aws::Utils::ByteBuffer& value) { SetCiphertextForRecipient(value); return *this;} /** *

The plaintext random bytes encrypted with the public key from the Nitro * enclave. This ciphertext can be decrypted only by using a private key in the * Nitro enclave.

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 GenerateRandomResult& 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 GenerateRandomResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GenerateRandomResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GenerateRandomResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Utils::CryptoBuffer m_plaintext; Aws::Utils::ByteBuffer m_ciphertextForRecipient; Aws::String m_requestId; }; } // namespace Model } // namespace KMS } // namespace Aws