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

Specifies that WAF should count the request. Optionally defines additional * custom handling for the request.

This is used in the context of other * settings, for example to specify values for RuleAction and web ACL * DefaultAction.

See Also:

AWS * API Reference

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

Defines custom handling for the web request.

For information about * customizing web requests and responses, see Customizing * web requests and responses in WAF in the WAF Developer Guide.

*/ inline const CustomRequestHandling& GetCustomRequestHandling() const{ return m_customRequestHandling; } /** *

Defines custom handling for the web request.

For information about * customizing web requests and responses, see Customizing * web requests and responses in WAF in the WAF Developer Guide.

*/ inline bool CustomRequestHandlingHasBeenSet() const { return m_customRequestHandlingHasBeenSet; } /** *

Defines custom handling for the web request.

For information about * customizing web requests and responses, see Customizing * web requests and responses in WAF in the WAF Developer Guide.

*/ inline void SetCustomRequestHandling(const CustomRequestHandling& value) { m_customRequestHandlingHasBeenSet = true; m_customRequestHandling = value; } /** *

Defines custom handling for the web request.

For information about * customizing web requests and responses, see Customizing * web requests and responses in WAF in the WAF Developer Guide.

*/ inline void SetCustomRequestHandling(CustomRequestHandling&& value) { m_customRequestHandlingHasBeenSet = true; m_customRequestHandling = std::move(value); } /** *

Defines custom handling for the web request.

For information about * customizing web requests and responses, see Customizing * web requests and responses in WAF in the WAF Developer Guide.

*/ inline CountAction& WithCustomRequestHandling(const CustomRequestHandling& value) { SetCustomRequestHandling(value); return *this;} /** *

Defines custom handling for the web request.

For information about * customizing web requests and responses, see Customizing * web requests and responses in WAF in the WAF Developer Guide.

*/ inline CountAction& WithCustomRequestHandling(CustomRequestHandling&& value) { SetCustomRequestHandling(std::move(value)); return *this;} private: CustomRequestHandling m_customRequestHandling; bool m_customRequestHandlingHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws