Class DynamicHttpResponseBody
- java.lang.Object
- 
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
- 
- com.oracle.bmc.waf.model.HttpResponseBody
- 
- com.oracle.bmc.waf.model.DynamicHttpResponseBody
 
 
 
- 
 @Generated(value="OracleSDKGenerator", comments="API Version: 20210930") public final class DynamicHttpResponseBody extends HttpResponseBodyAllows returning dynamically generated HTTP response body based on the provided template.The template allows variable interpolation by specifying variable name between the ‘${’ and ‘}’ delimiters. Escape sequences using ‘\’ are supported to allow usage of ‘\\’ and ‘\${’ in the template to return ‘\’ and ‘\${’ in final response. The following variables are supported: http.request.id - the HTTP request ID. For example: "d5fa953f75ef417e4c8008ef9336d779". Example: { "type": "DYNAMIC", "template": "{\ \\"code\\": 403,\ \\"message\\":\\"Unauthorised\\",\ \\"incidentId\\": \\"${http.request.id}\\"\ }" } Example with escape sequence: { "type": "DYNAMIC", "template": "\\\\${Returned as plain text}" } 
 Note: Objects should always be created or deserialized using theDynamicHttpResponseBody.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theDynamicHttpResponseBody.Builder, which maintain a set of all explicitly set fields calledDynamicHttpResponseBody.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDynamicHttpResponseBody.Builder- 
Nested classes/interfaces inherited from class com.oracle.bmc.waf.model.HttpResponseBodyHttpResponseBody.Type
 
- 
 - 
Constructor SummaryConstructors Constructor Description DynamicHttpResponseBody(String template)Deprecated.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DynamicHttpResponseBody.Builderbuilder()Create a new builder.booleanequals(Object o)StringgetTemplate()Dynamic response bodyinthashCode()DynamicHttpResponseBody.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
 
- 
- 
- 
Constructor Detail- 
DynamicHttpResponseBody@Deprecated public DynamicHttpResponseBody(String template) Deprecated.
 
- 
 - 
Method Detail- 
builderpublic static DynamicHttpResponseBody.Builder builder() Create a new builder.
 - 
toBuilderpublic DynamicHttpResponseBody.Builder toBuilder() 
 - 
getTemplatepublic String getTemplate() Dynamic response body- Returns:
- the value
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- HttpResponseBody
 
 - 
toStringpublic String toString(boolean includeByteArrayContents) Return a string representation of the object.- Overrides:
- toStringin class- HttpResponseBody
- Parameters:
- includeByteArrayContents- true to include the full contents of byte arrays
- Returns:
- string representation
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- HttpResponseBody
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- HttpResponseBody
 
 
- 
 
-