@Generated(value="software.amazon.awssdk:codegen") public final class CustomResponseBody extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CustomResponseBody.Builder,CustomResponseBody>
The response body to use in a custom response to a web request. This is referenced by key from CustomResponse
CustomResponseBodyKey.
| Modifier and Type | Class and Description |
|---|---|
static interface |
CustomResponseBody.Builder |
| Modifier and Type | Method and Description |
|---|---|
static CustomResponseBody.Builder |
builder() |
String |
content()
The payload of the custom response.
|
ResponseContentType |
contentType()
The type of content in the payload that you are defining in the
Content string. |
String |
contentTypeAsString()
The type of content in the payload that you are defining in the
Content string. |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
List<SdkField<?>> |
sdkFields() |
static Class<? extends CustomResponseBody.Builder> |
serializableBuilderClass() |
CustomResponseBody.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final ResponseContentType contentType()
The type of content in the payload that you are defining in the Content string.
If the service returns an enum value that is not available in the current SDK version, contentType will
return ResponseContentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from contentTypeAsString().
Content string.ResponseContentTypepublic final String contentTypeAsString()
The type of content in the payload that you are defining in the Content string.
If the service returns an enum value that is not available in the current SDK version, contentType will
return ResponseContentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from contentTypeAsString().
Content string.ResponseContentTypepublic final String 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.
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.
public CustomResponseBody.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<CustomResponseBody.Builder,CustomResponseBody>public static CustomResponseBody.Builder builder()
public static Class<? extends CustomResponseBody.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.