Class CustomResponseBody

    • Method Detail

      • contentTypeAsString

        public 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().

        Returns:
        The type of content in the payload that you are defining in the Content string.
        See Also:
        ResponseContentType
      • content

        public 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.

        Returns:
        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.

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)