# RvcOperationalStateTrait.ErrorStateStruct

# RvcOperationalStateTrait.ErrorStateStruct


```
class RvcOperationalStateTrait.ErrorStateStruct : ClusterStruct
```

<br />

*** ** * ** ***

Used to indicate the error state of the device when the RvcOperationStateTrait.Attributes.operationalState attribute is Error.

## Summary

| ### Nested types |
|---|
| `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.ErrorStateStruct.StructFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this struct's fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.ErrorStateStruct#ErrorStateStruct(kotlin.UByte,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue)( errorStateId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html, errorStateLabel: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>, errorStateDetails: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html> )` Creates the ErrorStateStruct class. |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.ErrorStateStruct#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.ErrorStateStruct#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.ErrorStateStruct#errorStateDetails()` Details about the error condition. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.ErrorStateStruct#errorStateId()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/RvcOperationalStateTrait.ErrorStateStruct#errorStateLabel()` Present only when `errorStateId` is populated with a vendor-specific error ID. |

## Public constructors

### ErrorStateStruct

```
ErrorStateStruct(
    errorStateId: UByte,
    errorStateLabel: OptionalValue<String> = OptionalValue.absent(),
    errorStateDetails: OptionalValue<String> = OptionalValue.absent()
)
```

Creates the ErrorStateStruct class.

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### errorStateDetails

```
val errorStateDetails: OptionalValue<String>
```

Details about the error condition.

### errorStateId

```
val errorStateId: UByte
```

### errorStateLabel

```
val errorStateLabel: OptionalValue<String>
```

Present only when `errorStateId` is populated with a vendor-specific error ID.