public final class AlgoSuccess extends AlgoResponse
| Constructor and Description |
|---|
AlgoSuccess(com.google.gson.JsonElement result,
Metadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
as(java.lang.Class<T> returnClass)
Convert the result to a specific class
|
protected <T> T |
as(java.lang.reflect.Type returnType)
Convert the result to a specific type
|
java.lang.String |
asJsonString()
Return JSON representation of the result.
|
java.lang.String |
asString()
Return String representation of the result.
|
Metadata |
getMetadata() |
boolean |
isFailure() |
boolean |
isSuccess() |
aspublic AlgoSuccess(com.google.gson.JsonElement result,
Metadata metadata)
public boolean isSuccess()
isSuccess in class AlgoResponsepublic boolean isFailure()
isFailure in class AlgoResponsepublic Metadata getMetadata()
getMetadata in class AlgoResponseprotected <T> T as(java.lang.Class<T> returnClass)
AlgoResponseas in class AlgoResponseT - the type that the response will be deserialized intoreturnClass - the class used by the deserializer (should correspond with T)protected <T> T as(java.lang.reflect.Type returnType)
AlgoResponseas in class AlgoResponseT - the type that the response will be deserialized intoreturnType - the type used by the deserializer (should correspond with T)public java.lang.String asJsonString()
AlgoResponseasJsonString in class AlgoResponsepublic java.lang.String asString()
AlgoResponseasString in class AlgoResponse