GatewayInfo
Used for PublishEventRequest, SetDeviceStateRequest, and GetDeviceConfigRequest if sent through a gateway. Specify delegatedDeviceId or gatewayId. The resource path and authorization token can correspond to the device or gateway.
These cases illustrate the field’s use:
The request is for a device and is not sent through a gateway. The resource path and authorization token belong to the device.
gatewayInfoshould NOT be set.The request is for the gateway, not for a delegated device. The resource path and authorization token belong to the gateway.
gatewayInfoshould NOT be set.The request has the gateway's resource path and authorization token, but the gateway requests on a device’s behalf.
gatewayInfo.delegated_device_idMUST be set to the delegated device’s ID.The request has the device's resource path and authorization token and is sent through a gateway.
gatewayInfo.gateway_idMUST be set to the gateway’s ID.
JSON representation |
|---|
CODE
|
Fields | |
|---|---|
Union field | |
|
The delegated device’s ID. Set only if the request’s resource name corresponds to the gateway. |
|
The gateway’s ID. Set only if the request’s resource name corresponds to the delegated device. |