/** * 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 #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Macie2 { namespace Model { /** *

Provides information about the S3 bucket that a finding applies * to.

See Also:

AWS API * Reference

*/ class S3Bucket { public: AWS_MACIE2_API S3Bucket(); AWS_MACIE2_API S3Bucket(Aws::Utils::Json::JsonView jsonValue); AWS_MACIE2_API S3Bucket& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_MACIE2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies whether the bucket policy for the bucket requires server-side * encryption of objects when objects are added to the bucket. Possible values * are:

  • FALSE - The bucket policy requires server-side encryption of * new objects. PutObject requests must include a valid server-side encryption * header.

  • TRUE - The bucket doesn't have a bucket policy or it has * a bucket policy that doesn't require server-side encryption of new objects. If a * bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header.

  • UNKNOWN - Amazon Macie can't * determine whether the bucket policy requires server-side encryption of new * objects.

Valid server-side encryption headers are: * x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256.

*/ inline const AllowsUnencryptedObjectUploads& GetAllowsUnencryptedObjectUploads() const{ return m_allowsUnencryptedObjectUploads; } /** *

Specifies whether the bucket policy for the bucket requires server-side * encryption of objects when objects are added to the bucket. Possible values * are:

  • FALSE - The bucket policy requires server-side encryption of * new objects. PutObject requests must include a valid server-side encryption * header.

  • TRUE - The bucket doesn't have a bucket policy or it has * a bucket policy that doesn't require server-side encryption of new objects. If a * bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header.

  • UNKNOWN - Amazon Macie can't * determine whether the bucket policy requires server-side encryption of new * objects.

Valid server-side encryption headers are: * x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256.

*/ inline bool AllowsUnencryptedObjectUploadsHasBeenSet() const { return m_allowsUnencryptedObjectUploadsHasBeenSet; } /** *

Specifies whether the bucket policy for the bucket requires server-side * encryption of objects when objects are added to the bucket. Possible values * are:

  • FALSE - The bucket policy requires server-side encryption of * new objects. PutObject requests must include a valid server-side encryption * header.

  • TRUE - The bucket doesn't have a bucket policy or it has * a bucket policy that doesn't require server-side encryption of new objects. If a * bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header.

  • UNKNOWN - Amazon Macie can't * determine whether the bucket policy requires server-side encryption of new * objects.

Valid server-side encryption headers are: * x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256.

*/ inline void SetAllowsUnencryptedObjectUploads(const AllowsUnencryptedObjectUploads& value) { m_allowsUnencryptedObjectUploadsHasBeenSet = true; m_allowsUnencryptedObjectUploads = value; } /** *

Specifies whether the bucket policy for the bucket requires server-side * encryption of objects when objects are added to the bucket. Possible values * are:

  • FALSE - The bucket policy requires server-side encryption of * new objects. PutObject requests must include a valid server-side encryption * header.

  • TRUE - The bucket doesn't have a bucket policy or it has * a bucket policy that doesn't require server-side encryption of new objects. If a * bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header.

  • UNKNOWN - Amazon Macie can't * determine whether the bucket policy requires server-side encryption of new * objects.

Valid server-side encryption headers are: * x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256.

*/ inline void SetAllowsUnencryptedObjectUploads(AllowsUnencryptedObjectUploads&& value) { m_allowsUnencryptedObjectUploadsHasBeenSet = true; m_allowsUnencryptedObjectUploads = std::move(value); } /** *

Specifies whether the bucket policy for the bucket requires server-side * encryption of objects when objects are added to the bucket. Possible values * are:

  • FALSE - The bucket policy requires server-side encryption of * new objects. PutObject requests must include a valid server-side encryption * header.

  • TRUE - The bucket doesn't have a bucket policy or it has * a bucket policy that doesn't require server-side encryption of new objects. If a * bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header.

  • UNKNOWN - Amazon Macie can't * determine whether the bucket policy requires server-side encryption of new * objects.

Valid server-side encryption headers are: * x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256.

*/ inline S3Bucket& WithAllowsUnencryptedObjectUploads(const AllowsUnencryptedObjectUploads& value) { SetAllowsUnencryptedObjectUploads(value); return *this;} /** *

Specifies whether the bucket policy for the bucket requires server-side * encryption of objects when objects are added to the bucket. Possible values * are:

  • FALSE - The bucket policy requires server-side encryption of * new objects. PutObject requests must include a valid server-side encryption * header.

  • TRUE - The bucket doesn't have a bucket policy or it has * a bucket policy that doesn't require server-side encryption of new objects. If a * bucket policy exists, it doesn't require PutObject requests to include a valid * server-side encryption header.

  • UNKNOWN - Amazon Macie can't * determine whether the bucket policy requires server-side encryption of new * objects.

Valid server-side encryption headers are: * x-amz-server-side-encryption with a value of AES256 or aws:kms, and * x-amz-server-side-encryption-customer-algorithm with a value of AES256.

*/ inline S3Bucket& WithAllowsUnencryptedObjectUploads(AllowsUnencryptedObjectUploads&& value) { SetAllowsUnencryptedObjectUploads(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline S3Bucket& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline S3Bucket& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the bucket.

*/ inline S3Bucket& WithArn(const char* value) { SetArn(value); return *this;} /** *

The date and time, in UTC and extended ISO 8601 format, when the bucket was * created. This value can also indicate when changes such as edits to the bucket's * policy were most recently made to the bucket, relative to when the finding was * created or last updated.

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The date and time, in UTC and extended ISO 8601 format, when the bucket was * created. This value can also indicate when changes such as edits to the bucket's * policy were most recently made to the bucket, relative to when the finding was * created or last updated.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

The date and time, in UTC and extended ISO 8601 format, when the bucket was * created. This value can also indicate when changes such as edits to the bucket's * policy were most recently made to the bucket, relative to when the finding was * created or last updated.

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

The date and time, in UTC and extended ISO 8601 format, when the bucket was * created. This value can also indicate when changes such as edits to the bucket's * policy were most recently made to the bucket, relative to when the finding was * created or last updated.

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

The date and time, in UTC and extended ISO 8601 format, when the bucket was * created. This value can also indicate when changes such as edits to the bucket's * policy were most recently made to the bucket, relative to when the finding was * created or last updated.

*/ inline S3Bucket& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The date and time, in UTC and extended ISO 8601 format, when the bucket was * created. This value can also indicate when changes such as edits to the bucket's * policy were most recently made to the bucket, relative to when the finding was * created or last updated.

*/ inline S3Bucket& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

The default server-side encryption settings for the bucket.

*/ inline const ServerSideEncryption& GetDefaultServerSideEncryption() const{ return m_defaultServerSideEncryption; } /** *

The default server-side encryption settings for the bucket.

*/ inline bool DefaultServerSideEncryptionHasBeenSet() const { return m_defaultServerSideEncryptionHasBeenSet; } /** *

The default server-side encryption settings for the bucket.

*/ inline void SetDefaultServerSideEncryption(const ServerSideEncryption& value) { m_defaultServerSideEncryptionHasBeenSet = true; m_defaultServerSideEncryption = value; } /** *

The default server-side encryption settings for the bucket.

*/ inline void SetDefaultServerSideEncryption(ServerSideEncryption&& value) { m_defaultServerSideEncryptionHasBeenSet = true; m_defaultServerSideEncryption = std::move(value); } /** *

The default server-side encryption settings for the bucket.

*/ inline S3Bucket& WithDefaultServerSideEncryption(const ServerSideEncryption& value) { SetDefaultServerSideEncryption(value); return *this;} /** *

The default server-side encryption settings for the bucket.

*/ inline S3Bucket& WithDefaultServerSideEncryption(ServerSideEncryption&& value) { SetDefaultServerSideEncryption(std::move(value)); return *this;} /** *

The name of the bucket.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the bucket.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the bucket.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the bucket.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the bucket.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the bucket.

*/ inline S3Bucket& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the bucket.

*/ inline S3Bucket& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the bucket.

*/ inline S3Bucket& WithName(const char* value) { SetName(value); return *this;} /** *

The display name and canonical user ID for the Amazon Web Services account * that owns the bucket.

*/ inline const S3BucketOwner& GetOwner() const{ return m_owner; } /** *

The display name and canonical user ID for the Amazon Web Services account * that owns the bucket.

*/ inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; } /** *

The display name and canonical user ID for the Amazon Web Services account * that owns the bucket.

*/ inline void SetOwner(const S3BucketOwner& value) { m_ownerHasBeenSet = true; m_owner = value; } /** *

The display name and canonical user ID for the Amazon Web Services account * that owns the bucket.

*/ inline void SetOwner(S3BucketOwner&& value) { m_ownerHasBeenSet = true; m_owner = std::move(value); } /** *

The display name and canonical user ID for the Amazon Web Services account * that owns the bucket.

*/ inline S3Bucket& WithOwner(const S3BucketOwner& value) { SetOwner(value); return *this;} /** *

The display name and canonical user ID for the Amazon Web Services account * that owns the bucket.

*/ inline S3Bucket& WithOwner(S3BucketOwner&& value) { SetOwner(std::move(value)); return *this;} /** *

The permissions settings that determine whether the bucket is publicly * accessible.

*/ inline const BucketPublicAccess& GetPublicAccess() const{ return m_publicAccess; } /** *

The permissions settings that determine whether the bucket is publicly * accessible.

*/ inline bool PublicAccessHasBeenSet() const { return m_publicAccessHasBeenSet; } /** *

The permissions settings that determine whether the bucket is publicly * accessible.

*/ inline void SetPublicAccess(const BucketPublicAccess& value) { m_publicAccessHasBeenSet = true; m_publicAccess = value; } /** *

The permissions settings that determine whether the bucket is publicly * accessible.

*/ inline void SetPublicAccess(BucketPublicAccess&& value) { m_publicAccessHasBeenSet = true; m_publicAccess = std::move(value); } /** *

The permissions settings that determine whether the bucket is publicly * accessible.

*/ inline S3Bucket& WithPublicAccess(const BucketPublicAccess& value) { SetPublicAccess(value); return *this;} /** *

The permissions settings that determine whether the bucket is publicly * accessible.

*/ inline S3Bucket& WithPublicAccess(BucketPublicAccess&& value) { SetPublicAccess(std::move(value)); return *this;} /** *

The tags that are associated with the bucket.

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

The tags that are associated with the bucket.

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

The tags that are associated with the bucket.

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

The tags that are associated with the bucket.

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

The tags that are associated with the bucket.

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

The tags that are associated with the bucket.

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

The tags that are associated with the bucket.

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

The tags that are associated with the bucket.

*/ inline S3Bucket& AddTags(KeyValuePair&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: AllowsUnencryptedObjectUploads m_allowsUnencryptedObjectUploads; bool m_allowsUnencryptedObjectUploadsHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet = false; ServerSideEncryption m_defaultServerSideEncryption; bool m_defaultServerSideEncryptionHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; S3BucketOwner m_owner; bool m_ownerHasBeenSet = false; BucketPublicAccess m_publicAccess; bool m_publicAccessHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Macie2 } // namespace Aws