Reference documentation and code samples for the Google Cloud IoT Core V1 Client class ListDeviceStatesRequest.
Request forListDeviceStates.
Generated from protobuf messagegoogle.cloud.iot.v1.ListDeviceStatesRequest
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/device0orprojects/p0/locations/us-central1/registries/registry0/devices/{num_id}.
↳ num_states
int
The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available.
getName
Required. The name of the device. For example,projects/p0/locations/us-central1/registries/registry0/devices/device0orprojects/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/device0orprojects/p0/locations/us-central1/registries/registry0/devices/{num_id}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNumStates
The number of states to list. States are listed in descending order of
update time. The maximum number of states retained is 10. If this
value is zero, it will return all the states available.
Returns
Type
Description
int
setNumStates
The number of states to list. States are listed in descending order of
update time. The maximum number of states retained is 10. If this
value is zero, it will return all the states available.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
static::build
Parameter
Name
Description
name
string
Required. The name of the device. For example,projects/p0/locations/us-central1/registries/registry0/devices/device0orprojects/p0/locations/us-central1/registries/registry0/devices/{num_id}. Please seeGoogle\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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud IoT Core V1 Client - Class ListDeviceStatesRequest (1.7.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.5 (latest)](/php/docs/reference/cloud-iot/latest/V1.ListDeviceStatesRequest)\n- [1.7.4](/php/docs/reference/cloud-iot/1.7.4/V1.ListDeviceStatesRequest)\n- [1.6.4](/php/docs/reference/cloud-iot/1.6.4/V1.ListDeviceStatesRequest)\n- [1.5.12](/php/docs/reference/cloud-iot/1.5.12/V1.ListDeviceStatesRequest) \nReference documentation and code samples for the Google Cloud IoT Core V1 Client class ListDeviceStatesRequest.\n\nRequest for `ListDeviceStates`.\n\nGenerated from protobuf message `google.cloud.iot.v1.ListDeviceStatesRequest`\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### getNumStates\n\nThe number of states to list. States are listed in descending order of\nupdate time. The maximum number of states retained is 10. If this\nvalue is zero, it will return all the states available.\n\n### setNumStates\n\nThe number of states to list. States are listed in descending order of\nupdate time. The maximum number of states retained is 10. If this\nvalue is zero, it will return all the states available.\n\n### static::build"]]