/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include A custom response to send to the client. You can define a custom response
* for rule actions and default web ACL actions that are set to block.
* See Also:
AWS
* API Reference
References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline const Aws::String& GetCustomResponseBodyKey() const{ return m_customResponseBodyKey; } /** *References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline bool CustomResponseBodyKeyHasBeenSet() const { return m_customResponseBodyKeyHasBeenSet; } /** *References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline void SetCustomResponseBodyKey(const Aws::String& value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey = value; } /** *References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline void SetCustomResponseBodyKey(Aws::String&& value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey = std::move(value); } /** *References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline void SetCustomResponseBodyKey(const char* value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey.assign(value); } /** *References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline AwsWafv2CustomResponseDetails& WithCustomResponseBodyKey(const Aws::String& value) { SetCustomResponseBodyKey(value); return *this;} /** *References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline AwsWafv2CustomResponseDetails& WithCustomResponseBodyKey(Aws::String&& value) { SetCustomResponseBodyKey(std::move(value)); return *this;} /** *References the response body that you want WAF to return to the web request * client. You can define a custom response for a rule action or a default web ACL * action that is set to block.
*/ inline AwsWafv2CustomResponseDetails& WithCustomResponseBodyKey(const char* value) { SetCustomResponseBodyKey(value); return *this;} /** *The HTTP status code to return to the client. For a list of status codes * that you can use in your custom responses, see Supported * status codes for custom response in the WAF Developer Guide.
*/ inline int GetResponseCode() const{ return m_responseCode; } /** *The HTTP status code to return to the client. For a list of status codes * that you can use in your custom responses, see Supported * status codes for custom response in the WAF Developer Guide.
*/ inline bool ResponseCodeHasBeenSet() const { return m_responseCodeHasBeenSet; } /** *The HTTP status code to return to the client. For a list of status codes * that you can use in your custom responses, see Supported * status codes for custom response in the WAF Developer Guide.
*/ inline void SetResponseCode(int value) { m_responseCodeHasBeenSet = true; m_responseCode = value; } /** *The HTTP status code to return to the client. For a list of status codes * that you can use in your custom responses, see Supported * status codes for custom response in the WAF Developer Guide.
*/ inline AwsWafv2CustomResponseDetails& WithResponseCode(int value) { SetResponseCode(value); return *this;} /** *The HTTP headers to use in the response.
*/ inline const Aws::VectorThe HTTP headers to use in the response.
*/ inline bool ResponseHeadersHasBeenSet() const { return m_responseHeadersHasBeenSet; } /** *The HTTP headers to use in the response.
*/ inline void SetResponseHeaders(const Aws::VectorThe HTTP headers to use in the response.
*/ inline void SetResponseHeaders(Aws::VectorThe HTTP headers to use in the response.
*/ inline AwsWafv2CustomResponseDetails& WithResponseHeaders(const Aws::VectorThe HTTP headers to use in the response.
*/ inline AwsWafv2CustomResponseDetails& WithResponseHeaders(Aws::VectorThe HTTP headers to use in the response.
*/ inline AwsWafv2CustomResponseDetails& AddResponseHeaders(const AwsWafv2CustomHttpHeader& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(value); return *this; } /** *The HTTP headers to use in the response.
*/ inline AwsWafv2CustomResponseDetails& AddResponseHeaders(AwsWafv2CustomHttpHeader&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(std::move(value)); return *this; } private: Aws::String m_customResponseBodyKey; bool m_customResponseBodyKeyHasBeenSet = false; int m_responseCode; bool m_responseCodeHasBeenSet = false; Aws::Vector