Class ApiResponse<T>

java.lang.Object
org.openapitools.client.ApiResponse<T>

public class ApiResponse<T> extends Object
API response returned by API call.
  • Field Details

    • statusCode

      private final int statusCode
    • headers

      private final Map<String,List<String>> headers
    • data

      private final T data
  • Constructor Details

    • ApiResponse

      public ApiResponse(int statusCode, Map<String,List<String>> headers)

      Constructor for ApiResponse.

      Parameters:
      statusCode - The status code of HTTP response
      headers - The headers of HTTP response
    • ApiResponse

      public ApiResponse(int statusCode, Map<String,List<String>> headers, T data)

      Constructor for ApiResponse.

      Parameters:
      statusCode - The status code of HTTP response
      headers - The headers of HTTP response
      data - The object deserialized from response bod
  • Method Details

    • getStatusCode

      public int getStatusCode()

      Get the status code.

      Returns:
      the status code
    • getHeaders

      public Map<String,List<String>> getHeaders()

      Get the headers.

      Returns:
      a Map of headers
    • getData

      public T getData()

      Get the data.

      Returns:
      the data