@Generated(value="OracleSDKGenerator", comments="API Version: 20190901") public final class Response extends Object
A container object for response attributes.
Example:
{
\"status\": \"200\",
\"responseTime\": \"2019-09-18T00:10:59.278Z\",
\"headers\": {
\"ETag\": [
\"<unique_ID>\"
],
\"Connection\": [
\"close\"
],
\"Content-Length\": [
\"1828\"
],
\"opc-request-id\": [
\"<unique_ID>\"
],
\"Date\": [
\"Wed, 18 Sep 2019 00:10:59 GMT\"
],
\"Content-Type\": [
\"application/json\"
]
},
\"payload\": {
\"resourceName\": \"my_instance\",
\"id\": \"ocid1.instance.oc1.phx.<unique_ID>\"
},
\"message\": null
}
Note: Objects should always be created or deserialized using the Response.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 the Response.Builder, which maintain a set of all explicitly set fields called __explicitlySet__. The hashCode() and equals(Object) methods are implemented to take __explicitlySet__ into account. The constructor, on the other hand, does not set __explicitlySet__ (since the constructor cannot distinguish explicit null from unset null).
| Modifier and Type | Class and Description |
|---|---|
static class |
Response.Builder |
| Constructor and Description |
|---|
Response(String status,
Date responseTime,
Map<String,List<String>> headers,
Map<String,Object> payload,
String message)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static Response.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
Set<String> |
get__explicitlySet__() |
Map<String,List<String>> |
getHeaders()
The headers of the response.
|
String |
getMessage()
A friendly description of what happened during the operation.
|
Map<String,Object> |
getPayload()
This value is included for backward compatibility with the Audit version 1 schema, where it contained metadata of interest from the response payload.
|
Date |
getResponseTime()
The time of the response to the audited request, expressed in RFC 3339 timestamp format.
|
String |
getStatus()
The status code of the response.
|
int |
hashCode() |
String |
toString() |
public static Response.Builder builder()
Create a new builder.
public String getStatus()
The status code of the response.
Example: 200
public Date getResponseTime()
The time of the response to the audited request, expressed in RFC 3339 timestamp format.
Example: 2019-09-18T00:10:59.278Z
public Map<String,List<String>> getHeaders()
The headers of the response.
Example:
{
\"ETag\": [
\"<unique_ID>\"
],
\"Connection\": [
\"close\"
],
\"Content-Length\": [
\"1828\"
],
\"opc-request-id\": [
\"<unique_ID>\"
],
\"Date\": [
\"Wed, 18 Sep 2019 00:10:59 GMT\"
],
\"Content-Type\": [
\"application/json\"
]
}
public Map<String,Object> getPayload()
This value is included for backward compatibility with the Audit version 1 schema, where it contained metadata of interest from the response payload.
Example:
{
\"resourceName\": \"my_instance\",
\"id\": \"ocid1.instance.oc1.phx.<unique_ID>\"
}
public String getMessage()
A friendly description of what happened during the operation. Use this for troubleshooting.
Copyright © 2016–2020. All rights reserved.