# Cloud IoT v1 API - Class ListDeviceStatesRequest (2.2.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.2.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.ListDeviceStatesRequest)

    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.

Request for `ListDeviceStates`.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ListDeviceStatesRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ListDeviceStatesRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ListDeviceStatesRequest](https://docs.cloud.google.com/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](https://docs.cloud.google.com/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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Iot.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1)

## Assembly

Google.Cloud.Iot.V1.dll

## Constructors

### ListDeviceStatesRequest()

    public ListDeviceStatesRequest()

### ListDeviceStatesRequest(ListDeviceStatesRequest)

    public ListDeviceStatesRequest(ListDeviceStatesRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest` |

## Properties

### DeviceName

    public DeviceName DeviceName { get; set; }

[DeviceName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest#Google_Cloud_Iot_V1_ListDeviceStatesRequest_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` |   |

### Name

    public string Name { get; set; }

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}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### NumStates

    public int NumStates { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |