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

Specifies the action that Amazon CloudFront or WAF takes when a web request * matches the conditions in the rule.

See Also:

AWS * API Reference

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

Specifies that WAF should allow requests by default.

*/ inline const AwsWafv2ActionAllowDetails& GetAllow() const{ return m_allow; } /** *

Specifies that WAF should allow requests by default.

*/ inline bool AllowHasBeenSet() const { return m_allowHasBeenSet; } /** *

Specifies that WAF should allow requests by default.

*/ inline void SetAllow(const AwsWafv2ActionAllowDetails& value) { m_allowHasBeenSet = true; m_allow = value; } /** *

Specifies that WAF should allow requests by default.

*/ inline void SetAllow(AwsWafv2ActionAllowDetails&& value) { m_allowHasBeenSet = true; m_allow = std::move(value); } /** *

Specifies that WAF should allow requests by default.

*/ inline AwsWafv2WebAclActionDetails& WithAllow(const AwsWafv2ActionAllowDetails& value) { SetAllow(value); return *this;} /** *

Specifies that WAF should allow requests by default.

*/ inline AwsWafv2WebAclActionDetails& WithAllow(AwsWafv2ActionAllowDetails&& value) { SetAllow(std::move(value)); return *this;} /** *

Specifies that WAF should block requests by default.

*/ inline const AwsWafv2ActionBlockDetails& GetBlock() const{ return m_block; } /** *

Specifies that WAF should block requests by default.

*/ inline bool BlockHasBeenSet() const { return m_blockHasBeenSet; } /** *

Specifies that WAF should block requests by default.

*/ inline void SetBlock(const AwsWafv2ActionBlockDetails& value) { m_blockHasBeenSet = true; m_block = value; } /** *

Specifies that WAF should block requests by default.

*/ inline void SetBlock(AwsWafv2ActionBlockDetails&& value) { m_blockHasBeenSet = true; m_block = std::move(value); } /** *

Specifies that WAF should block requests by default.

*/ inline AwsWafv2WebAclActionDetails& WithBlock(const AwsWafv2ActionBlockDetails& value) { SetBlock(value); return *this;} /** *

Specifies that WAF should block requests by default.

*/ inline AwsWafv2WebAclActionDetails& WithBlock(AwsWafv2ActionBlockDetails&& value) { SetBlock(std::move(value)); return *this;} private: AwsWafv2ActionAllowDetails m_allow; bool m_allowHasBeenSet = false; AwsWafv2ActionBlockDetails m_block; bool m_blockHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws