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

Custom request handling behavior that inserts custom headers into a web * request. You can add custom request handling for WAF to use when the rule action * doesn't block the request. For example, CaptchaAction for requests * with valid t okens, and AllowAction.

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

See Also:

AWS * API Reference

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

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline const Aws::Vector& GetInsertHeaders() const{ return m_insertHeaders; } /** *

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline bool InsertHeadersHasBeenSet() const { return m_insertHeadersHasBeenSet; } /** *

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline void SetInsertHeaders(const Aws::Vector& value) { m_insertHeadersHasBeenSet = true; m_insertHeaders = value; } /** *

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline void SetInsertHeaders(Aws::Vector&& value) { m_insertHeadersHasBeenSet = true; m_insertHeaders = std::move(value); } /** *

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline CustomRequestHandling& WithInsertHeaders(const Aws::Vector& value) { SetInsertHeaders(value); return *this;} /** *

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline CustomRequestHandling& WithInsertHeaders(Aws::Vector&& value) { SetInsertHeaders(std::move(value)); return *this;} /** *

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline CustomRequestHandling& AddInsertHeaders(const CustomHTTPHeader& value) { m_insertHeadersHasBeenSet = true; m_insertHeaders.push_back(value); return *this; } /** *

The HTTP headers to insert into the request. Duplicate header names are not * allowed.

For information about the limits on count and size for custom * request and response settings, see WAF * quotas in the WAF Developer Guide.

*/ inline CustomRequestHandling& AddInsertHeaders(CustomHTTPHeader&& value) { m_insertHeadersHasBeenSet = true; m_insertHeaders.push_back(std::move(value)); return *this; } private: Aws::Vector m_insertHeaders; bool m_insertHeadersHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws