/** * 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 #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace KMS { namespace Model { class GetPublicKeyResult { public: AWS_KMS_API GetPublicKeyResult(); AWS_KMS_API GetPublicKeyResult(const Aws::AmazonWebServiceResult& result); AWS_KMS_API GetPublicKeyResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The Amazon Resource Name (key * ARN) of the asymmetric KMS key from which the public key was downloaded.

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

The Amazon Resource Name (key * ARN) of the asymmetric KMS key from which the public key was downloaded.

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

The Amazon Resource Name (key * ARN) of the asymmetric KMS key from which the public key was downloaded.

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

The Amazon Resource Name (key * ARN) of the asymmetric KMS key from which the public key was downloaded.

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

The Amazon Resource Name (key * ARN) of the asymmetric KMS key from which the public key was downloaded.

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

The Amazon Resource Name (key * ARN) of the asymmetric KMS key from which the public key was downloaded.

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

The Amazon Resource Name (key * ARN) of the asymmetric KMS key from which the public key was downloaded.

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

The exported public key.

The value is a DER-encoded X.509 public key, * also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP * API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it * is not Base64-encoded.

*/ inline const Aws::Utils::ByteBuffer& GetPublicKey() const{ return m_publicKey; } /** *

The exported public key.

The value is a DER-encoded X.509 public key, * also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP * API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it * is not Base64-encoded.

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

The exported public key.

The value is a DER-encoded X.509 public key, * also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP * API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it * is not Base64-encoded.

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

The exported public key.

The value is a DER-encoded X.509 public key, * also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP * API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it * is not Base64-encoded.

*/ inline GetPublicKeyResult& WithPublicKey(const Aws::Utils::ByteBuffer& value) { SetPublicKey(value); return *this;} /** *

The exported public key.

The value is a DER-encoded X.509 public key, * also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP * API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it * is not Base64-encoded.

*/ inline GetPublicKeyResult& WithPublicKey(Aws::Utils::ByteBuffer&& value) { SetPublicKey(std::move(value)); return *this;} /** *

The type of the of the public key that was downloaded.

*/ inline const KeySpec& GetKeySpec() const{ return m_keySpec; } /** *

The type of the of the public key that was downloaded.

*/ inline void SetKeySpec(const KeySpec& value) { m_keySpec = value; } /** *

The type of the of the public key that was downloaded.

*/ inline void SetKeySpec(KeySpec&& value) { m_keySpec = std::move(value); } /** *

The type of the of the public key that was downloaded.

*/ inline GetPublicKeyResult& WithKeySpec(const KeySpec& value) { SetKeySpec(value); return *this;} /** *

The type of the of the public key that was downloaded.

*/ inline GetPublicKeyResult& WithKeySpec(KeySpec&& value) { SetKeySpec(std::move(value)); return *this;} /** *

The permitted use of the public key. Valid values are * ENCRYPT_DECRYPT or SIGN_VERIFY.

This * information is critical. If a public key with SIGN_VERIFY key usage * encrypts data outside of KMS, the ciphertext cannot be decrypted.

*/ inline const KeyUsageType& GetKeyUsage() const{ return m_keyUsage; } /** *

The permitted use of the public key. Valid values are * ENCRYPT_DECRYPT or SIGN_VERIFY.

This * information is critical. If a public key with SIGN_VERIFY key usage * encrypts data outside of KMS, the ciphertext cannot be decrypted.

*/ inline void SetKeyUsage(const KeyUsageType& value) { m_keyUsage = value; } /** *

The permitted use of the public key. Valid values are * ENCRYPT_DECRYPT or SIGN_VERIFY.

This * information is critical. If a public key with SIGN_VERIFY key usage * encrypts data outside of KMS, the ciphertext cannot be decrypted.

*/ inline void SetKeyUsage(KeyUsageType&& value) { m_keyUsage = std::move(value); } /** *

The permitted use of the public key. Valid values are * ENCRYPT_DECRYPT or SIGN_VERIFY.

This * information is critical. If a public key with SIGN_VERIFY key usage * encrypts data outside of KMS, the ciphertext cannot be decrypted.

*/ inline GetPublicKeyResult& WithKeyUsage(const KeyUsageType& value) { SetKeyUsage(value); return *this;} /** *

The permitted use of the public key. Valid values are * ENCRYPT_DECRYPT or SIGN_VERIFY.

This * information is critical. If a public key with SIGN_VERIFY key usage * encrypts data outside of KMS, the ciphertext cannot be decrypted.

*/ inline GetPublicKeyResult& WithKeyUsage(KeyUsageType&& value) { SetKeyUsage(std::move(value)); return *this;} /** *

The encryption algorithms that KMS supports for this key.

This * information is critical. If a public key encrypts data outside of KMS by using * an unsupported encryption algorithm, the ciphertext cannot be decrypted.

*

This field appears in the response only when the KeyUsage of the * public key is ENCRYPT_DECRYPT.

*/ inline const Aws::Vector& GetEncryptionAlgorithms() const{ return m_encryptionAlgorithms; } /** *

The encryption algorithms that KMS supports for this key.

This * information is critical. If a public key encrypts data outside of KMS by using * an unsupported encryption algorithm, the ciphertext cannot be decrypted.

*

This field appears in the response only when the KeyUsage of the * public key is ENCRYPT_DECRYPT.

*/ inline void SetEncryptionAlgorithms(const Aws::Vector& value) { m_encryptionAlgorithms = value; } /** *

The encryption algorithms that KMS supports for this key.

This * information is critical. If a public key encrypts data outside of KMS by using * an unsupported encryption algorithm, the ciphertext cannot be decrypted.

*

This field appears in the response only when the KeyUsage of the * public key is ENCRYPT_DECRYPT.

*/ inline void SetEncryptionAlgorithms(Aws::Vector&& value) { m_encryptionAlgorithms = std::move(value); } /** *

The encryption algorithms that KMS supports for this key.

This * information is critical. If a public key encrypts data outside of KMS by using * an unsupported encryption algorithm, the ciphertext cannot be decrypted.

*

This field appears in the response only when the KeyUsage of the * public key is ENCRYPT_DECRYPT.

*/ inline GetPublicKeyResult& WithEncryptionAlgorithms(const Aws::Vector& value) { SetEncryptionAlgorithms(value); return *this;} /** *

The encryption algorithms that KMS supports for this key.

This * information is critical. If a public key encrypts data outside of KMS by using * an unsupported encryption algorithm, the ciphertext cannot be decrypted.

*

This field appears in the response only when the KeyUsage of the * public key is ENCRYPT_DECRYPT.

*/ inline GetPublicKeyResult& WithEncryptionAlgorithms(Aws::Vector&& value) { SetEncryptionAlgorithms(std::move(value)); return *this;} /** *

The encryption algorithms that KMS supports for this key.

This * information is critical. If a public key encrypts data outside of KMS by using * an unsupported encryption algorithm, the ciphertext cannot be decrypted.

*

This field appears in the response only when the KeyUsage of the * public key is ENCRYPT_DECRYPT.

*/ inline GetPublicKeyResult& AddEncryptionAlgorithms(const EncryptionAlgorithmSpec& value) { m_encryptionAlgorithms.push_back(value); return *this; } /** *

The encryption algorithms that KMS supports for this key.

This * information is critical. If a public key encrypts data outside of KMS by using * an unsupported encryption algorithm, the ciphertext cannot be decrypted.

*

This field appears in the response only when the KeyUsage of the * public key is ENCRYPT_DECRYPT.

*/ inline GetPublicKeyResult& AddEncryptionAlgorithms(EncryptionAlgorithmSpec&& value) { m_encryptionAlgorithms.push_back(std::move(value)); return *this; } /** *

The signing algorithms that KMS supports for this key.

This field * appears in the response only when the KeyUsage of the public key is * SIGN_VERIFY.

*/ inline const Aws::Vector& GetSigningAlgorithms() const{ return m_signingAlgorithms; } /** *

The signing algorithms that KMS supports for this key.

This field * appears in the response only when the KeyUsage of the public key is * SIGN_VERIFY.

*/ inline void SetSigningAlgorithms(const Aws::Vector& value) { m_signingAlgorithms = value; } /** *

The signing algorithms that KMS supports for this key.

This field * appears in the response only when the KeyUsage of the public key is * SIGN_VERIFY.

*/ inline void SetSigningAlgorithms(Aws::Vector&& value) { m_signingAlgorithms = std::move(value); } /** *

The signing algorithms that KMS supports for this key.

This field * appears in the response only when the KeyUsage of the public key is * SIGN_VERIFY.

*/ inline GetPublicKeyResult& WithSigningAlgorithms(const Aws::Vector& value) { SetSigningAlgorithms(value); return *this;} /** *

The signing algorithms that KMS supports for this key.

This field * appears in the response only when the KeyUsage of the public key is * SIGN_VERIFY.

*/ inline GetPublicKeyResult& WithSigningAlgorithms(Aws::Vector&& value) { SetSigningAlgorithms(std::move(value)); return *this;} /** *

The signing algorithms that KMS supports for this key.

This field * appears in the response only when the KeyUsage of the public key is * SIGN_VERIFY.

*/ inline GetPublicKeyResult& AddSigningAlgorithms(const SigningAlgorithmSpec& value) { m_signingAlgorithms.push_back(value); return *this; } /** *

The signing algorithms that KMS supports for this key.

This field * appears in the response only when the KeyUsage of the public key is * SIGN_VERIFY.

*/ inline GetPublicKeyResult& AddSigningAlgorithms(SigningAlgorithmSpec&& value) { m_signingAlgorithms.push_back(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 GetPublicKeyResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GetPublicKeyResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GetPublicKeyResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_keyId; Aws::Utils::ByteBuffer m_publicKey; KeySpec m_keySpec; KeyUsageType m_keyUsage; Aws::Vector m_encryptionAlgorithms; Aws::Vector m_signingAlgorithms; Aws::String m_requestId; }; } // namespace Model } // namespace KMS } // namespace Aws