/** * 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 level or bucket level. For * detailed information about each setting, see Using * Amazon S3 block public access in the Amazon Simple Storage Service * Developer Guide.

See Also:

AWS * API Reference

*/ class AWS_MACIE2_API BlockPublicAccess { public: BlockPublicAccess(); BlockPublicAccess(Aws::Utils::Json::JsonView jsonValue); BlockPublicAccess& operator=(Aws::Utils::Json::JsonView jsonValue); 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; bool m_blockPublicPolicy; bool m_blockPublicPolicyHasBeenSet; bool m_ignorePublicAcls; bool m_ignorePublicAclsHasBeenSet; bool m_restrictPublicBuckets; bool m_restrictPublicBucketsHasBeenSet; }; } // namespace Model } // namespace Macie2 } // namespace Aws