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

The action that WAF should take on a web request when it matches a rule's * statement. Settings at the web ACL level can override the rule action setting. *

See Also:

AWS * API Reference

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

Instructs WAF to allow the web request.

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

Instructs WAF to allow the web request.

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

Instructs WAF to allow the web request.

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

Instructs WAF to allow the web request.

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

Instructs WAF to allow the web request.

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

Instructs WAF to allow the web request.

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

Instructs WAF to block the web request.

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

Instructs WAF to block the web request.

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

Instructs WAF to block the web request.

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

Instructs WAF to block the web request.

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

Instructs WAF to block the web request.

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

Instructs WAF to block the web request.

*/ inline AwsWafv2RulesActionDetails& WithBlock(AwsWafv2ActionBlockDetails&& value) { SetBlock(std::move(value)); return *this;} /** *

Instructs WAF to run a CAPTCHA check against the web request.

*/ inline const AwsWafv2RulesActionCaptchaDetails& GetCaptcha() const{ return m_captcha; } /** *

Instructs WAF to run a CAPTCHA check against the web request.

*/ inline bool CaptchaHasBeenSet() const { return m_captchaHasBeenSet; } /** *

Instructs WAF to run a CAPTCHA check against the web request.

*/ inline void SetCaptcha(const AwsWafv2RulesActionCaptchaDetails& value) { m_captchaHasBeenSet = true; m_captcha = value; } /** *

Instructs WAF to run a CAPTCHA check against the web request.

*/ inline void SetCaptcha(AwsWafv2RulesActionCaptchaDetails&& value) { m_captchaHasBeenSet = true; m_captcha = std::move(value); } /** *

Instructs WAF to run a CAPTCHA check against the web request.

*/ inline AwsWafv2RulesActionDetails& WithCaptcha(const AwsWafv2RulesActionCaptchaDetails& value) { SetCaptcha(value); return *this;} /** *

Instructs WAF to run a CAPTCHA check against the web request.

*/ inline AwsWafv2RulesActionDetails& WithCaptcha(AwsWafv2RulesActionCaptchaDetails&& value) { SetCaptcha(std::move(value)); return *this;} /** *

Instructs WAF to count the web request and then continue evaluating the * request using the remaining rules in the web ACL.

*/ inline const AwsWafv2RulesActionCountDetails& GetCount() const{ return m_count; } /** *

Instructs WAF to count the web request and then continue evaluating the * request using the remaining rules in the web ACL.

*/ inline bool CountHasBeenSet() const { return m_countHasBeenSet; } /** *

Instructs WAF to count the web request and then continue evaluating the * request using the remaining rules in the web ACL.

*/ inline void SetCount(const AwsWafv2RulesActionCountDetails& value) { m_countHasBeenSet = true; m_count = value; } /** *

Instructs WAF to count the web request and then continue evaluating the * request using the remaining rules in the web ACL.

*/ inline void SetCount(AwsWafv2RulesActionCountDetails&& value) { m_countHasBeenSet = true; m_count = std::move(value); } /** *

Instructs WAF to count the web request and then continue evaluating the * request using the remaining rules in the web ACL.

*/ inline AwsWafv2RulesActionDetails& WithCount(const AwsWafv2RulesActionCountDetails& value) { SetCount(value); return *this;} /** *

Instructs WAF to count the web request and then continue evaluating the * request using the remaining rules in the web ACL.

*/ inline AwsWafv2RulesActionDetails& WithCount(AwsWafv2RulesActionCountDetails&& value) { SetCount(std::move(value)); return *this;} private: AwsWafv2ActionAllowDetails m_allow; bool m_allowHasBeenSet = false; AwsWafv2ActionBlockDetails m_block; bool m_blockHasBeenSet = false; AwsWafv2RulesActionCaptchaDetails m_captcha; bool m_captchaHasBeenSet = false; AwsWafv2RulesActionCountDetails m_count; bool m_countHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws