Class ApiResponse

java.lang.Object
io.stargate.sdk.data.domain.ApiResponse

public class ApiResponse extends Object
Represents the Api response.
  • Constructor Details

    • ApiResponse

      public ApiResponse()
      Default constructor.
  • Method Details

    • getStatusKeyAsStringStream

      public Stream<String> getStatusKeyAsStringStream(@NonNull @NonNull String key)
      Read a value as a stream from the key/value 'status' map.
      Parameters:
      key - key to be retrieved
      Returns:
      list of values
    • getStatusKeyAsObject

      public <T> T getStatusKeyAsObject(@NonNull @NonNull String key, @NonNull @NonNull Class<T> targetClass)
      Read a value as a List from the key/value 'status' map.
      Type Parameters:
      T - type in used
      Parameters:
      key - target get
      targetClass - target class
      Returns:
      object
    • getStatusKeyAsList

      public <T> List<T> getStatusKeyAsList(@NonNull @NonNull String key, Class<T> targetClass)
      Read a value as a Specialized class from the key/value 'status' map.
      Type Parameters:
      T - type in used
      Parameters:
      key - target get
      targetClass - target class
      Returns:
      object
    • getStatusKeyAsInt

      public Integer getStatusKeyAsInt(@NonNull @NonNull String key)
      Read a value as an Integer from the key/value 'status' map.
      Parameters:
      key - key to be retrieved
      Returns:
      list of values
    • getStatusKeyAsBoolean

      public Boolean getStatusKeyAsBoolean(@NonNull @NonNull String key)
      Read a value as an Integer from the key/value 'status' map.
      Parameters:
      key - key to be retrieved
      Returns:
      list of values