/** * 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 WAFV2 { namespace Model { /** *

This is the latest version of AWS WAF, named AWS WAFV2, * released in November, 2019. For information, including how to migrate your AWS * WAF resources from the prior release, see the AWS * WAF Developer Guide.

In a WebACL, this is the action * that you want AWS WAF to perform when a web request doesn't match any of the * rules in the WebACL. The default action must be a terminating * action, so count is not allowed.

See Also:

AWS * API Reference

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

Specifies that AWS WAF should block requests by default.

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

Specifies that AWS WAF should block requests by default.

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

Specifies that AWS WAF should block requests by default.

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

Specifies that AWS WAF should block requests by default.

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

Specifies that AWS WAF should block requests by default.

*/ inline DefaultAction& WithBlock(const BlockAction& value) { SetBlock(value); return *this;} /** *

Specifies that AWS WAF should block requests by default.

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

Specifies that AWS WAF should allow requests by default.

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

Specifies that AWS WAF should allow requests by default.

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

Specifies that AWS WAF should allow requests by default.

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

Specifies that AWS WAF should allow requests by default.

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

Specifies that AWS WAF should allow requests by default.

*/ inline DefaultAction& WithAllow(const AllowAction& value) { SetAllow(value); return *this;} /** *

Specifies that AWS WAF should allow requests by default.

*/ inline DefaultAction& WithAllow(AllowAction&& value) { SetAllow(std::move(value)); return *this;} private: BlockAction m_block; bool m_blockHasBeenSet; AllowAction m_allow; bool m_allowHasBeenSet; }; } // namespace Model } // namespace WAFV2 } // namespace Aws