# ThermostatTrait.PresetTypeStruct

# ThermostatTrait.PresetTypeStruct


```
class ThermostatTrait.PresetTypeStruct : ClusterStruct
```

<br />

*** ** * ** ***

A preset type.

## 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/ThermostatTrait.PresetTypeStruct.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/ThermostatTrait.PresetTypeStruct#PresetTypeStruct(com.google.home.matter.standard.ThermostatTrait.PresetScenarioEnum,kotlin.UByte,com.google.home.matter.standard.ThermostatTrait.PresetTypeFeaturesBitmap)( presetScenario: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetScenarioEnum, numberOfPresets: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html, presetTypeFeatures: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetTypeFeaturesBitmap )` Creates the PresetTypeStruct 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/ThermostatTrait.PresetTypeStruct#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/ThermostatTrait.PresetTypeStruct#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/-u-byte/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetTypeStruct#numberOfPresets()` The limit for the number of presets for this `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetScenarioEnum`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetScenarioEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetTypeStruct#presetScenario()` A `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetScenarioEnum` supported by this thermostat. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetTypeFeaturesBitmap` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetTypeStruct#presetTypeFeatures()` A bitmap of features for this preset. |

## Public constructors

### PresetTypeStruct

```
PresetTypeStruct(
    presetScenario: ThermostatTrait.PresetScenarioEnum = PresetScenarioEnum.Occupied,
    numberOfPresets: UByte,
    presetTypeFeatures: ThermostatTrait.PresetTypeFeaturesBitmap = PresetTypeFeaturesBitmap()
)
```

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

### numberOfPresets

```
val numberOfPresets: UByte
```

The limit for the number of presets for this `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetScenarioEnum`.

### presetScenario

```
val presetScenario: ThermostatTrait.PresetScenarioEnum
```

A `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ThermostatTrait.PresetScenarioEnum` supported by this thermostat.

### presetTypeFeatures

```
val presetTypeFeatures: ThermostatTrait.PresetTypeFeaturesBitmap
```

A bitmap of features for this preset.