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() |
as
public AlgoSuccess(com.google.gson.JsonElement result, Metadata metadata)
public boolean isSuccess()
isSuccess
in class AlgoResponse
public boolean isFailure()
isFailure
in class AlgoResponse
public Metadata getMetadata()
getMetadata
in class AlgoResponse
protected <T> T as(java.lang.Class<T> returnClass)
AlgoResponse
as
in class AlgoResponse
T
- 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)
AlgoResponse
as
in class AlgoResponse
T
- the type that the response will be deserialized intoreturnType
- the type used by the deserializer (should correspond with T)public java.lang.String asJsonString()
AlgoResponse
asJsonString
in class AlgoResponse
public java.lang.String asString()
AlgoResponse
asString
in class AlgoResponse