# ModeSelectTrait.ModeOptionStruct

# ModeSelectTrait.ModeOptionStruct


```
class ModeSelectTrait.ModeOptionStruct : ClusterStruct
```

<br />

*** ** * ** ***

Represents the possible mode of the cluster instance.

## 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/ModeSelectTrait.ModeOptionStruct.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/ModeSelectTrait.ModeOptionStruct#ModeOptionStruct(kotlin.String,kotlin.UByte,kotlin.collections.List)( label: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, mode: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html, semanticTags: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.SemanticTagStruct> )` Creates the ModeOptionStruct 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/ModeSelectTrait.ModeOptionStruct#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/ModeSelectTrait.ModeOptionStruct#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://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.ModeOptionStruct#label()` Readable text that describes the mode option for the user. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.ModeOptionStruct#mode()` Identifies the mode option for the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.Attributes#supportedModes()` attribute. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.SemanticTagStruct>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.ModeOptionStruct#semanticTags()` A list of semantic tags for the mode option, used to determine the meaning of the mode as defined in a standard- or manufacturer-specific namespace. |

## Public constructors

### ModeOptionStruct

```
ModeOptionStruct(
    label: String = "",
    mode: UByte,
    semanticTags: List<ModeSelectTrait.SemanticTagStruct> = emptyList()
)
```

Creates the ModeOptionStruct 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

### label

```
val label: String
```

Readable text that describes the mode option for the user.

### mode

```
val mode: UByte
```

Identifies the mode option for the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.Attributes#supportedModes()` attribute.

### semanticTags

```
val semanticTags: List<ModeSelectTrait.SemanticTagStruct>
```

A list of semantic tags for the mode option, used to determine the meaning of the mode as defined in a standard- or manufacturer-specific namespace. These values are defined in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ModeSelectTrait.SemanticTagStruct`.