/** * 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 { /** *

In a WebACL, this is the action that you want 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.

See Also:

AWS * API Reference

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

Specifies that WAF should block requests by default.

*/ inline const BlockAction& 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 BlockAction& value) { m_blockHasBeenSet = true; m_block = value; } /** *

Specifies that WAF should block requests by default.

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

Specifies that WAF should block requests by default.

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

Specifies that WAF should block requests by default.

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

Specifies that WAF should allow requests by default.

*/ inline const AllowAction& 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 AllowAction& value) { m_allowHasBeenSet = true; m_allow = value; } /** *

Specifies that WAF should allow requests by default.

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

Specifies that WAF should allow requests by default.

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

Specifies that WAF should allow requests by default.

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