Google Cloud IoT Core V1 Client - Class SendCommandToDeviceRequest (1.7.5)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

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}.

↳ 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, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}. Please see Google\Cloud\Iot\V1\DeviceManagerClient::deviceName() for help formatting this field.

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, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}. Please see Google\Cloud\Iot\V1\DeviceManagerClient::deviceName() for help formatting this field.

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