public final class DirectMethodResponse extends Object
Constructor and Description |
---|
DirectMethodResponse(Integer status,
com.google.gson.JsonElement payload) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getPayload(Class<T> clazz)
Return the DirectMethodResponse payload in a custom type of your choosing
|
com.google.gson.JsonElement |
getPayloadAsJsonElement()
Return the DirectMethodResponse payload in JsonElement type
|
String |
getPayloadAsJsonString()
Return the DirectMethodResponse payload in json string
Use this if you wish to deserialize to a specific type using a deserialization library of your choice
|
public DirectMethodResponse(Integer status, com.google.gson.JsonElement payload)
public com.google.gson.JsonElement getPayloadAsJsonElement()
public String getPayloadAsJsonString()
public <T> T getPayload(Class<T> clazz)
clazz
- the Custom type into which the payload can be deserializedCopyright © 2023. All rights reserved.