public class Response
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
customData
Any additional, non-standard, data.
|
Constructor and Description |
---|
Response() |
Modifier and Type | Method and Description |
---|---|
<T> T |
getCustomDataOrDefault(java.lang.String key,
java.lang.Class<T> clazz)
Retrieve a named custom value from the response.
|
<T> T |
getCustomDataOrThrow(java.lang.String key,
java.lang.Class<T> clazz)
Retrieve a named custom value from the response.
|
public java.util.Map<java.lang.String,java.lang.Object> customData
public <T> T getCustomDataOrThrow(java.lang.String key, java.lang.Class<T> clazz) throws Loop54Exception
T
- Expected type of the response data to retrieve.key
- Key of the custom data.clazz
- Expected class of the response data to retrieve.Loop54Exception
- If not found, or the value could not be deserialized to the desired class.public <T> T getCustomDataOrDefault(java.lang.String key, java.lang.Class<T> clazz) throws Loop54Exception
T
- Expected type of the response data to retrieve.key
- Key of the custom data.clazz
- Expected class of the response data to retrieve.Loop54Exception
- if the value cannot be deserialized to the desired class.