# DeviceEnergyManagementTrait.SlotAdjustmentStruct

# DeviceEnergyManagementTrait.SlotAdjustmentStruct


```
class DeviceEnergyManagementTrait.SlotAdjustmentStruct : ClusterStruct
```

<br />

*** ** * ** ***

Indicates requested power and duration adjustments for a specific slot.

## 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/DeviceEnergyManagementTrait.SlotAdjustmentStruct.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/DeviceEnergyManagementTrait.SlotAdjustmentStruct#SlotAdjustmentStruct(kotlin.UByte,com.google.home.matter.serialization.OptionalValue,kotlin.UInt)( slotIndex: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html, nominalPower: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html>, duration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html )` Creates the SlotAdjustmentStruct 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/DeviceEnergyManagementTrait.SlotAdjustmentStruct#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/DeviceEnergyManagementTrait.SlotAdjustmentStruct#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-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotAdjustmentStruct#duration()` The new amount of time, in seconds, to which the ESA is extending or shortening its duration. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotAdjustmentStruct#nominalPower()` The power, in milliwatts, at which the ESA is being requested to operate. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotAdjustmentStruct#slotIndex()` The index into the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.ForecastStruct#slots()` within the forecast to be modified. |

## Public constructors

### SlotAdjustmentStruct

```
SlotAdjustmentStruct(
    slotIndex: UByte,
    nominalPower: OptionalValue<Long> = OptionalValue.absent(),
    duration: UInt
)
```

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

### duration

```
val duration: UInt
```

The new amount of time, in seconds, to which the ESA is extending or shortening its duration.

### nominalPower

```
val nominalPower: OptionalValue<Long>
```

The power, in milliwatts, at which the ESA is being requested to operate.

### slotIndex

```
val slotIndex: UByte
```

The index into the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.ForecastStruct#slots()` within the forecast to be modified.