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

Provides information about the block public access settings for an S3 bucket. * These settings can apply to a bucket at the account or bucket level. For * detailed information about each setting, see Blocking * public access to your Amazon S3 storage in the Amazon Simple Storage * Service User Guide.

See Also:

AWS * API Reference

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

Specifies whether Amazon S3 blocks public access control lists (ACLs) for the * bucket and objects in the bucket.

*/ inline bool GetBlockPublicAcls() const{ return m_blockPublicAcls; } /** *

Specifies whether Amazon S3 blocks public access control lists (ACLs) for the * bucket and objects in the bucket.

*/ inline bool BlockPublicAclsHasBeenSet() const { return m_blockPublicAclsHasBeenSet; } /** *

Specifies whether Amazon S3 blocks public access control lists (ACLs) for the * bucket and objects in the bucket.

*/ inline void SetBlockPublicAcls(bool value) { m_blockPublicAclsHasBeenSet = true; m_blockPublicAcls = value; } /** *

Specifies whether Amazon S3 blocks public access control lists (ACLs) for the * bucket and objects in the bucket.

*/ inline BlockPublicAccess& WithBlockPublicAcls(bool value) { SetBlockPublicAcls(value); return *this;} /** *

Specifies whether Amazon S3 blocks public bucket policies for the bucket.

*/ inline bool GetBlockPublicPolicy() const{ return m_blockPublicPolicy; } /** *

Specifies whether Amazon S3 blocks public bucket policies for the bucket.

*/ inline bool BlockPublicPolicyHasBeenSet() const { return m_blockPublicPolicyHasBeenSet; } /** *

Specifies whether Amazon S3 blocks public bucket policies for the bucket.

*/ inline void SetBlockPublicPolicy(bool value) { m_blockPublicPolicyHasBeenSet = true; m_blockPublicPolicy = value; } /** *

Specifies whether Amazon S3 blocks public bucket policies for the bucket.

*/ inline BlockPublicAccess& WithBlockPublicPolicy(bool value) { SetBlockPublicPolicy(value); return *this;} /** *

Specifies whether Amazon S3 ignores public ACLs for the bucket and objects in * the bucket.

*/ inline bool GetIgnorePublicAcls() const{ return m_ignorePublicAcls; } /** *

Specifies whether Amazon S3 ignores public ACLs for the bucket and objects in * the bucket.

*/ inline bool IgnorePublicAclsHasBeenSet() const { return m_ignorePublicAclsHasBeenSet; } /** *

Specifies whether Amazon S3 ignores public ACLs for the bucket and objects in * the bucket.

*/ inline void SetIgnorePublicAcls(bool value) { m_ignorePublicAclsHasBeenSet = true; m_ignorePublicAcls = value; } /** *

Specifies whether Amazon S3 ignores public ACLs for the bucket and objects in * the bucket.

*/ inline BlockPublicAccess& WithIgnorePublicAcls(bool value) { SetIgnorePublicAcls(value); return *this;} /** *

Specifies whether Amazon S3 restricts public bucket policies for the * bucket.

*/ inline bool GetRestrictPublicBuckets() const{ return m_restrictPublicBuckets; } /** *

Specifies whether Amazon S3 restricts public bucket policies for the * bucket.

*/ inline bool RestrictPublicBucketsHasBeenSet() const { return m_restrictPublicBucketsHasBeenSet; } /** *

Specifies whether Amazon S3 restricts public bucket policies for the * bucket.

*/ inline void SetRestrictPublicBuckets(bool value) { m_restrictPublicBucketsHasBeenSet = true; m_restrictPublicBuckets = value; } /** *

Specifies whether Amazon S3 restricts public bucket policies for the * bucket.

*/ inline BlockPublicAccess& WithRestrictPublicBuckets(bool value) { SetRestrictPublicBuckets(value); return *this;} private: bool m_blockPublicAcls; bool m_blockPublicAclsHasBeenSet = false; bool m_blockPublicPolicy; bool m_blockPublicPolicyHasBeenSet = false; bool m_ignorePublicAcls; bool m_ignorePublicAclsHasBeenSet = false; bool m_restrictPublicBuckets; bool m_restrictPublicBucketsHasBeenSet = false; }; } // namespace Model } // namespace Macie2 } // namespace Aws