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

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

See Also:

AWS API * Reference

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

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.

*/ 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.

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

The date and time, in UTC and extended ISO 8601 format, when the bucket was * created.

*/ 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.

*/ 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.

*/ 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.

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

The server-side encryption settings for the bucket.

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

The server-side encryption settings for the bucket.

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

The server-side encryption settings for the bucket.

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

The server-side encryption settings for the bucket.

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

The server-side encryption settings for the bucket.

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

The 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 account identifier for the user who owns the bucket.

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

The display name and account identifier for the user who owns the bucket.

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

The display name and account identifier for the user who owns the bucket.

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

The display name and account identifier for the user who owns the bucket.

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

The display name and account identifier for the user who owns the bucket.

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

The display name and account identifier for the user who 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: Aws::String m_arn; bool m_arnHasBeenSet; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet; ServerSideEncryption m_defaultServerSideEncryption; bool m_defaultServerSideEncryptionHasBeenSet; Aws::String m_name; bool m_nameHasBeenSet; S3BucketOwner m_owner; bool m_ownerHasBeenSet; BucketPublicAccess m_publicAccess; bool m_publicAccessHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace Macie2 } // namespace Aws