public sealed class ListDeviceStatesRequest : IMessage<ListDeviceStatesRequest>, IEquatable<ListDeviceStatesRequest>, IDeepCloneable<ListDeviceStatesRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud IoT v1 API class ListDeviceStatesRequest.
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 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.
[[["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."],[[["\u003cp\u003eThe \u003ccode\u003eListDeviceStatesRequest\u003c/code\u003e class is used to request a list of device states within the Cloud IoT v1 API, with the latest version being 2.2.0.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e to support various functionalities, including message handling, equality checks, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eIt provides constructors to create an empty \u003ccode\u003eListDeviceStatesRequest\u003c/code\u003e or one based on another \u003ccode\u003eListDeviceStatesRequest\u003c/code\u003e object for replication.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties to specify the device's name (\u003ccode\u003eName\u003c/code\u003e or \u003ccode\u003eDeviceName\u003c/code\u003e) and the number of states to retrieve (\u003ccode\u003eNumStates\u003c/code\u003e), allowing customization of the request.\u003c/p\u003e\n"],["\u003cp\u003eThe most recent 6 version of the class are listed on the page, ranging from 2.2.0 down to 1.0.0.\u003c/p\u003e\n"]]],[],null,["# Cloud IoT v1 API - Class ListDeviceStatesRequest (2.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest) \n\n public sealed class ListDeviceStatesRequest : IMessage\u003cListDeviceStatesRequest\u003e, IEquatable\u003cListDeviceStatesRequest\u003e, IDeepCloneable\u003cListDeviceStatesRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud IoT v1 API class ListDeviceStatesRequest.\n\nRequest for `ListDeviceStates`. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ListDeviceStatesRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ListDeviceStatesRequest](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ListDeviceStatesRequest](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ListDeviceStatesRequest](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Iot.V1](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Iot.V1.dll\n\nConstructors\n------------\n\n### ListDeviceStatesRequest()\n\n public ListDeviceStatesRequest()\n\n### ListDeviceStatesRequest(ListDeviceStatesRequest)\n\n public ListDeviceStatesRequest(ListDeviceStatesRequest other)\n\nProperties\n----------\n\n### DeviceName\n\n public DeviceName DeviceName { get; set; }\n\n[DeviceName](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest#Google_Cloud_Iot_V1_ListDeviceStatesRequest_Name) resource name property.\n\n### Name\n\n public string Name { get; set; }\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### NumStates\n\n public int NumStates { get; set; }\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."]]