Package software.amazon.awssdk.core
Class Response<T>
- java.lang.Object
-
- software.amazon.awssdk.core.Response<T>
-
- Type Parameters:
T
- the modelled SDK response type.
public final class Response<T> extends Object
Response wrapper that indicates success or failure with the associated unmarshalled response object or exception object. This object is used by the core request/response pipeline to pass response metadata alongside the actual deserialized response object through different stages of the pipeline.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Response.Builder<T>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Response.Builder<T>
builder()
Returns a newly initialized builder object for aResponse
boolean
equals(Object o)
SdkException
exception()
The modelled exception returned by the service.int
hashCode()
SdkHttpFullResponse
httpResponse()
The HTTP response that was received by the SDK prior to determining the result.Boolean
isSuccess()
Indicates whether the result indicates success or failure of the original request.T
response()
The modelled response object returned by the service.Response.Builder<T>
toBuilder()
Creates a new builder with initial values pulled from the current object.
-
-
-
Method Detail
-
builder
public static <T> Response.Builder<T> builder()
Returns a newly initialized builder object for aResponse
- Type Parameters:
T
- Modelled response type.
-
toBuilder
public Response.Builder<T> toBuilder()
Creates a new builder with initial values pulled from the current object.
-
response
public T response()
The modelled response object returned by the service. If the response was a failure, this value is likely to be null.
-
exception
public SdkException exception()
The modelled exception returned by the service. If the response was not a failure, this value is likely to be null.
-
httpResponse
public SdkHttpFullResponse httpResponse()
The HTTP response that was received by the SDK prior to determining the result.
-
isSuccess
public Boolean isSuccess()
Indicates whether the result indicates success or failure of the original request. A true value indicates success; a false value indicates failure.
-
-