Package io.stargate.sdk.data.domain
Class ApiResponse
java.lang.Object
io.stargate.sdk.data.domain.ApiResponse
Represents the Api response.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetStatusKeyAsBoolean(@NonNull String key) Read a value as an Integer from the key/value 'status' map.getStatusKeyAsInt(@NonNull String key) Read a value as an Integer from the key/value 'status' map.<T> List<T> getStatusKeyAsList(@NonNull String key, Class<T> targetClass) Read a value as a Specialized class from the key/value 'status' map.<T> TgetStatusKeyAsObject(@NonNull String key, @NonNull Class<T> targetClass) Read a value as a List from the key/value 'status' map.getStatusKeyAsStringStream(@NonNull String key) Read a value as a stream from the key/value 'status' map.
-
Constructor Details
-
ApiResponse
public ApiResponse()Default constructor.
-
-
Method Details
-
getStatusKeyAsStringStream
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 gettargetClass- target class- Returns:
- object
-
getStatusKeyAsList
Read a value as a Specialized class from the key/value 'status' map.- Type Parameters:
T- type in used- Parameters:
key- target gettargetClass- target class- Returns:
- object
-
getStatusKeyAsInt
Read a value as an Integer from the key/value 'status' map.- Parameters:
key- key to be retrieved- Returns:
- list of values
-
getStatusKeyAsBoolean
Read a value as an Integer from the key/value 'status' map.- Parameters:
key- key to be retrieved- Returns:
- list of values
-