Class ReturnHttpResponseAction
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.waf.model.Action
-
- com.oracle.bmc.waf.model.ReturnHttpResponseAction
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20210930") public final class ReturnHttpResponseAction extends Action
An object that represents an action which returns a defined HTTP response.
Note: Objects should always be created or deserialized using theReturnHttpResponseAction.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 theReturnHttpResponseAction.Builder
, which maintain a set of all explicitly set fields calledReturnHttpResponseAction.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 Summary
Nested Classes Modifier and Type Class Description static class
ReturnHttpResponseAction.Builder
-
Nested classes/interfaces inherited from class com.oracle.bmc.waf.model.Action
Action.Type
-
-
Constructor Summary
Constructors Constructor Description ReturnHttpResponseAction(String name, Integer code, List<ResponseHeader> headers, HttpResponseBody body)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReturnHttpResponseAction.Builder
builder()
Create a new builder.boolean
equals(Object o)
HttpResponseBody
getBody()
Integer
getCode()
Response code.List<ResponseHeader>
getHeaders()
Adds headers defined in this array for HTTP response.int
hashCode()
ReturnHttpResponseAction.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
ReturnHttpResponseAction
@Deprecated public ReturnHttpResponseAction(String name, Integer code, List<ResponseHeader> headers, HttpResponseBody body)
Deprecated.
-
-
Method Detail
-
builder
public static ReturnHttpResponseAction.Builder builder()
Create a new builder.
-
toBuilder
public ReturnHttpResponseAction.Builder toBuilder()
-
getCode
public Integer getCode()
Response code.The following response codes are valid values for this property:
2xx
200 OK 201 Created 202 Accepted 206 Partial Content
3xx
300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 307 Temporary Redirect
4xx
400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 405 Method Not Allowed 408 Request Timeout 409 Conflict 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 422 Unprocessable Entity 429 Too Many Requests 494 Request Header Too Large 495 Cert Error 496 No Cert 497 HTTP to HTTPS
5xx
500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 507 Insufficient Storage
Example: 200
- Returns:
- the value
-
getHeaders
public List<ResponseHeader> getHeaders()
Adds headers defined in this array for HTTP response.Hop-by-hop headers are not allowed to be set:
Connection * Keep-Alive * Proxy-Authenticate * Proxy-Authorization * TE * Trailer * Transfer-Encoding * Upgrade
- Returns:
- the value
-
getBody
public HttpResponseBody getBody()
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-