# Cloud IoT v1 API - Class DeviceState (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.DeviceState)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.DeviceState)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.DeviceState)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.DeviceState)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.DeviceState)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.DeviceState)

    public sealed class DeviceState : IMessage<DeviceState>, IEquatable<DeviceState>, IDeepCloneable<DeviceState>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud IoT v1 API class DeviceState.

The device state, as reported by the device.

## Inheritance

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

## Implements

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

### DeviceState()

    public DeviceState()

### DeviceState(DeviceState)

    public DeviceState(DeviceState other)

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

## Properties

### BinaryData

    public ByteString BinaryData { get; set; }

The device state data.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

\[Output only\] The time at which this state version was updated in Cloud
IoT Core.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |