Iot/src/V1/CreateDeviceRequest.php
public function setDevice($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class);
        $this->device = $var;

        return $this;
    }
public function setDevice($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class);
        $this->device = $var;

        return $this;
    }
public function setDevice ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Iot \ V1 \ Device :: class ) ; $ this -> device = $ var ; return $ this ; }
The device registration details. The field `name` must be empty. The server
generates `name` from the device registry `id` and the
`parent` field.

Generated from protobuf field <code>.google.cloud.iot.v1.Device device = 2;</code>
@param \Google\Cloud\Iot\V1\Device $var
@return $this
The device registration details . The field name must be empty . The server generates name from the device registry id and the parent field .