Reference documentation and code samples for the Google Cloud IoT Core V1 Client class GetDeviceRequest.
Request for GetDevice.
Generated from protobuf message google.cloud.iot.v1.GetDeviceRequest
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}.
The fields of the Device resource to be returned in the response. If the field mask is unset or empty, all fields are returned. Fields have to be provided in snake_case format, for example: last_heartbeat_time.
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
getFieldMask
The fields of the Device resource to be returned in the response. If the
field mask is unset or empty, all fields are returned. Fields have to be
provided in snake_case format, for example: last_heartbeat_time.
The fields of the Device resource to be returned in the response. If the
field mask is unset or empty, all fields are returned. Fields have to be
provided in snake_case format, for example: last_heartbeat_time.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Cloud IoT Core V1 Client - Class GetDeviceRequest (1.7.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.5 (latest)](/php/docs/reference/cloud-iot/latest/V1.GetDeviceRequest)\n- [1.7.4](/php/docs/reference/cloud-iot/1.7.4/V1.GetDeviceRequest)\n- [1.6.4](/php/docs/reference/cloud-iot/1.6.4/V1.GetDeviceRequest)\n- [1.5.12](/php/docs/reference/cloud-iot/1.5.12/V1.GetDeviceRequest) \nReference documentation and code samples for the Google Cloud IoT Core V1 Client class GetDeviceRequest.\n\nRequest for `GetDevice`.\n\nGenerated from protobuf message `google.cloud.iot.v1.GetDeviceRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Iot \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.\n\n### setName\n\nRequired. The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.\n\n### getFieldMask\n\nThe fields of the `Device` resource to be returned in the response. If the\nfield mask is unset or empty, all fields are returned. Fields have to be\nprovided in snake_case format, for example: `last_heartbeat_time`.\n\n### hasFieldMask\n\n### clearFieldMask\n\n### setFieldMask\n\nThe fields of the `Device` resource to be returned in the response. If the\nfield mask is unset or empty, all fields are returned. Fields have to be\nprovided in snake_case format, for example: `last_heartbeat_time`.\n\n### static::build"]]