Google Cloud IoT Core V1 Client - Class CreateDeviceRequest (1.7.4)

Reference documentation and code samples for the Google Cloud IoT Core V1 Client class CreateDeviceRequest.

Request for CreateDevice.

Generated from protobuf message google.cloud.iot.v1.CreateDeviceRequest

Namespace

Google \ Cloud \ Iot \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ parent string

Required. The name of the device registry where this device should be created. For example, projects/example-project/locations/us-central1/registries/my-registry.

↳ device Google\Cloud\Iot\V1\Device

Required. The device registration details. The field name must be empty. The server generates name from the device registry id and the parent field.

getParent

Required. The name of the device registry where this device should be created.

For example, projects/example-project/locations/us-central1/registries/my-registry.

Returns
Type Description
string

setParent

Required. The name of the device registry where this device should be created.

For example, projects/example-project/locations/us-central1/registries/my-registry.

Parameter
Name Description
var string
Returns
Type Description
$this

getDevice

Required. The device registration details. The field name must be empty. The server generates name from the device registry id and the parent field.

Returns
Type Description
Google\Cloud\Iot\V1\Device|null

hasDevice

clearDevice

setDevice

Required. The device registration details. The field name must be empty. The server generates name from the device registry id and the parent field.

Parameter
Name Description
var Google\Cloud\Iot\V1\Device
Returns
Type Description
$this

static::build

Parameters
Name Description
parent string

Required. The name of the device registry where this device should be created. For example, projects/example-project/locations/us-central1/registries/my-registry. Please see Google\Cloud\Iot\V1\DeviceManagerClient::registryName() for help formatting this field.

device Google\Cloud\Iot\V1\Device

Required. The device registration details. The field name must be empty. The server generates name from the device registry id and the parent field.

Returns
Type Description
Google\Cloud\Iot\V1\CreateDeviceRequest