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

The response body to use in a custom response to a web request. This is * referenced by key from CustomResponse * CustomResponseBodyKey.

See Also:

AWS * API Reference

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

The type of content in the payload that you are defining in the * Content string.

*/ inline const ResponseContentType& GetContentType() const{ return m_contentType; } /** *

The type of content in the payload that you are defining in the * Content string.

*/ inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; } /** *

The type of content in the payload that you are defining in the * Content string.

*/ inline void SetContentType(const ResponseContentType& value) { m_contentTypeHasBeenSet = true; m_contentType = value; } /** *

The type of content in the payload that you are defining in the * Content string.

*/ inline void SetContentType(ResponseContentType&& value) { m_contentTypeHasBeenSet = true; m_contentType = std::move(value); } /** *

The type of content in the payload that you are defining in the * Content string.

*/ inline CustomResponseBody& WithContentType(const ResponseContentType& value) { SetContentType(value); return *this;} /** *

The type of content in the payload that you are defining in the * Content string.

*/ inline CustomResponseBody& WithContentType(ResponseContentType&& value) { SetContentType(std::move(value)); return *this;} /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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::String& GetContent() const{ return m_content; } /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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 ContentHasBeenSet() const { return m_contentHasBeenSet; } /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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 SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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 SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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 SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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

*/ inline CustomResponseBody& WithContent(const Aws::String& value) { SetContent(value); return *this;} /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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

*/ inline CustomResponseBody& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} /** *

The payload of the custom response.

You can use JSON escape strings * in JSON content. To do this, you must specify JSON content in the * ContentType setting.

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

*/ inline CustomResponseBody& WithContent(const char* value) { SetContent(value); return *this;} private: ResponseContentType m_contentType; bool m_contentTypeHasBeenSet = false; Aws::String m_content; bool m_contentHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws