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

Contains the type of server-side encryption used.

See Also:

* AWS * API Reference

*/ class AWS_S3_API Encryption { public: Encryption(); Encryption(const Aws::Utils::Xml::XmlNode& xmlNode); Encryption& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

The server-side encryption algorithm used when storing job results in Amazon * S3 (for example, AES256, aws:kms).

*/ inline const ServerSideEncryption& GetEncryptionType() const{ return m_encryptionType; } /** *

The server-side encryption algorithm used when storing job results in Amazon * S3 (for example, AES256, aws:kms).

*/ inline bool EncryptionTypeHasBeenSet() const { return m_encryptionTypeHasBeenSet; } /** *

The server-side encryption algorithm used when storing job results in Amazon * S3 (for example, AES256, aws:kms).

*/ inline void SetEncryptionType(const ServerSideEncryption& value) { m_encryptionTypeHasBeenSet = true; m_encryptionType = value; } /** *

The server-side encryption algorithm used when storing job results in Amazon * S3 (for example, AES256, aws:kms).

*/ inline void SetEncryptionType(ServerSideEncryption&& value) { m_encryptionTypeHasBeenSet = true; m_encryptionType = std::move(value); } /** *

The server-side encryption algorithm used when storing job results in Amazon * S3 (for example, AES256, aws:kms).

*/ inline Encryption& WithEncryptionType(const ServerSideEncryption& value) { SetEncryptionType(value); return *this;} /** *

The server-side encryption algorithm used when storing job results in Amazon * S3 (for example, AES256, aws:kms).

*/ inline Encryption& WithEncryptionType(ServerSideEncryption&& value) { SetEncryptionType(std::move(value)); return *this;} /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline const Aws::String& GetKMSKeyId() const{ return m_kMSKeyId; } /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline bool KMSKeyIdHasBeenSet() const { return m_kMSKeyIdHasBeenSet; } /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline void SetKMSKeyId(const Aws::String& value) { m_kMSKeyIdHasBeenSet = true; m_kMSKeyId = value; } /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline void SetKMSKeyId(Aws::String&& value) { m_kMSKeyIdHasBeenSet = true; m_kMSKeyId = std::move(value); } /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline void SetKMSKeyId(const char* value) { m_kMSKeyIdHasBeenSet = true; m_kMSKeyId.assign(value); } /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline Encryption& WithKMSKeyId(const Aws::String& value) { SetKMSKeyId(value); return *this;} /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline Encryption& WithKMSKeyId(Aws::String&& value) { SetKMSKeyId(std::move(value)); return *this;} /** *

If the encryption type is aws:kms, this optional value specifies * the ID of the symmetric customer managed key to use for encryption of job * results. Amazon S3 only supports symmetric keys. For more information, see Using * symmetric and asymmetric keys in the Amazon Web Services Key Management * Service Developer Guide.

*/ inline Encryption& WithKMSKeyId(const char* value) { SetKMSKeyId(value); return *this;} /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline const Aws::String& GetKMSContext() const{ return m_kMSContext; } /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline bool KMSContextHasBeenSet() const { return m_kMSContextHasBeenSet; } /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline void SetKMSContext(const Aws::String& value) { m_kMSContextHasBeenSet = true; m_kMSContext = value; } /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline void SetKMSContext(Aws::String&& value) { m_kMSContextHasBeenSet = true; m_kMSContext = std::move(value); } /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline void SetKMSContext(const char* value) { m_kMSContextHasBeenSet = true; m_kMSContext.assign(value); } /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline Encryption& WithKMSContext(const Aws::String& value) { SetKMSContext(value); return *this;} /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline Encryption& WithKMSContext(Aws::String&& value) { SetKMSContext(std::move(value)); return *this;} /** *

If the encryption type is aws:kms, this optional value can be * used to specify the encryption context for the restore results.

*/ inline Encryption& WithKMSContext(const char* value) { SetKMSContext(value); return *this;} private: ServerSideEncryption m_encryptionType; bool m_encryptionTypeHasBeenSet; Aws::String m_kMSKeyId; bool m_kMSKeyIdHasBeenSet; Aws::String m_kMSContext; bool m_kMSContextHasBeenSet; }; } // namespace Model } // namespace S3 } // namespace Aws