Reference documentation and code samples for the Google Cloud IoT Core V1 Client class SendCommandToDeviceRequest.
Request for SendCommandToDevice.
Generated from protobuf message google.cloud.iot.v1.SendCommandToDeviceRequest
Namespace
Google \ Cloud \ Iot \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Required. The name of the device. For example, |
↳ binary_data |
string
Required. The command data to send to the device. |
↳ subfolder |
string
Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
getName
Required. The name of the device. For example,
projects/p0/locations/us-central1/registries/registry0/devices/device0 or
projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Required. The name of the device. For example,
projects/p0/locations/us-central1/registries/registry0/devices/device0 or
projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBinaryData
Required. The command data to send to the device.
| Returns | |
|---|---|
| Type | Description |
string |
|
setBinaryData
Required. The command data to send to the device.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSubfolder
Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.
| Returns | |
|---|---|
| Type | Description |
string |
|
setSubfolder
Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
static::build
| Parameters | |
|---|---|
| Name | Description |
name |
string
Required. The name of the device. For example,
|
binaryData |
string
Required. The command data to send to the device. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iot\V1\SendCommandToDeviceRequest |
|
static::buildFromNameBinaryDataSubfolder
| Parameters | |
|---|---|
| Name | Description |
name |
string
Required. The name of the device. For example,
|
binaryData |
string
Required. The command data to send to the device. |
subfolder |
string
Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iot\V1\SendCommandToDeviceRequest |
|