DigitalTwinCommandResponse Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.service.digitaltwin.models.DigitalTwinCommandResponse

public class DigitalTwinCommandResponse

Represents the device command invocation results.

Method Summary

Modifier and Type Method and Description
<T> T getPayload(Class<T> clazz)

Return the DigitalTwinCommandResponse payload in a custom type of your choosing

JsonElement getPayloadAsJsonElement()

Return the DigitalTwinCommandResponse payload in JsonElement type

String getPayloadAsJsonString()

Return the DigitalTwinCommandResponse payload in json string Use this if you wish to deserialize to a specific type using a deserialization library of your choice

Integer getStatus()
void setPayload(JsonElement payload)
void setStatus(Integer status)

Method Details

getPayload

public T getPayload(Class clazz)

Return the DigitalTwinCommandResponse payload in a custom type of your choosing

Parameters:

clazz - the Custom type into which the payload can be deserialized

Returns:

the DigitalTwinCommandResponse payload in Custom type

getPayloadAsJsonElement

public JsonElement getPayloadAsJsonElement()

Return the DigitalTwinCommandResponse payload in JsonElement type

Returns:

the DigitalTwinCommandResponse payload in JsonElement type

getPayloadAsJsonString

public String getPayloadAsJsonString()

Return the DigitalTwinCommandResponse payload in json string Use this if you wish to deserialize to a specific type using a deserialization library of your choice

Returns:

the DigitalTwinCommandResponse payload in json string

getStatus

public Integer getStatus()

setPayload

public void setPayload(JsonElement payload)

Parameters:

payload

setStatus

public void setStatus(Integer status)

Parameters:

status

Applies to