Class 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.
    • Method Detail

      • builder

        public static <T> Response.Builder<T> builder()
        Returns a newly initialized builder object for a Response
        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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object