# DeviceEnergyManagementTrait.SlotStruct


```
class DeviceEnergyManagementTrait.SlotStruct : ClusterStruct
```

<br />

*** ** * ** ***

Indicates a specific stage of an ESA's operation.

## 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.SlotStruct.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.SlotStruct#SlotStruct(kotlin.UInt,kotlin.UInt,kotlin.UInt,kotlin.UInt,kotlin.UInt,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue)( minDuration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, maxDuration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, defaultDuration: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, elapsedSlotTime: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, remainingSlotTime: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, slotIsPausable: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html>, minPauseDuration: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>, maxPauseDuration: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>, manufacturerEsaState: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/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>, minPower: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html>, maxPower: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html>, nominalEnergy: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html>, costs: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.CostStruct>>, minPowerAdjustment: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html>, maxPowerAdjustment: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html>, minDurationAdjustment: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>, maxDurationAdjustment: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html> )` Creates the SlotStruct 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.SlotStruct#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.SlotStruct#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.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.CostStruct>>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotStruct#costs()` The current estimated cost of operating the appliance. |
| `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.SlotStruct#defaultDuration()` The time, in seconds, that the appliance is expected to be in its slot. |
| `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.SlotStruct#elapsedSlotTime()` The time, in seconds, that has already elapsed with the appliance in its slot. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotStruct#manufacturerEsaState()` Provides a manufacturer-defined value that indicates the state of the ESA. |
| `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.SlotStruct#maxDuration()` The maximum time, in seconds, that the appliance is expected to be in its slot. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<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.SlotStruct#maxDurationAdjustment()` The maximum duration, in seconds, to which the slot's usage can be extended. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<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.SlotStruct#maxPauseDuration()` The maximum amount of time, in seconds, that the slot can be paused. |
| `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.SlotStruct#maxPower()` The highest power, in milliwatts, that the appliance is expected to use in its current slot. |
| `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.SlotStruct#maxPowerAdjustment()` The maximum power adjustment, in milliwatts, that the ESA can be requested to use. |
| `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.SlotStruct#minDuration()` The minimum time, in seconds, that the appliance is expected to be in its slot. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<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.SlotStruct#minDurationAdjustment()` The minimum time, in seconds, to which the slot's usage can be shortened. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<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.SlotStruct#minPauseDuration()` The shortest amount of time, in seconds, that the slot can be paused. |
| `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.SlotStruct#minPower()` The lowest power, in milliwatts, that the appliance is expected to use in its current slot. |
| `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.SlotStruct#minPowerAdjustment()` The minimum power adjustment, in milliwatts, that the ESA can be requested to use. |
| `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.SlotStruct#nominalEnergy()` The amount of energy that the appliance is expected to use or produce in its current slot. |
| `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.SlotStruct#nominalPower()` The expected power that the appliance will use in its current slot. |
| `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.SlotStruct#remainingSlotTime()` The remaining time, in seconds, that the appliance is expected to be in its slot. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.SlotStruct#slotIsPausable()` Indicates whether this slot can be paused. |

## Public constructors

### SlotStruct

```
SlotStruct(
    minDuration: UInt,
    maxDuration: UInt,
    defaultDuration: UInt,
    elapsedSlotTime: UInt,
    remainingSlotTime: UInt,
    slotIsPausable: OptionalValue<Boolean> = OptionalValue.absent(),
    minPauseDuration: OptionalValue<UInt> = OptionalValue.absent(),
    maxPauseDuration: OptionalValue<UInt> = OptionalValue.absent(),
    manufacturerEsaState: OptionalValue<UShort> = OptionalValue.absent(),
    nominalPower: OptionalValue<Long> = OptionalValue.absent(),
    minPower: OptionalValue<Long> = OptionalValue.absent(),
    maxPower: OptionalValue<Long> = OptionalValue.absent(),
    nominalEnergy: OptionalValue<Long> = OptionalValue.absent(),
    costs: OptionalValue<List<DeviceEnergyManagementTrait.CostStruct>> = OptionalValue.absent(),
    minPowerAdjustment: OptionalValue<Long> = OptionalValue.absent(),
    maxPowerAdjustment: OptionalValue<Long> = OptionalValue.absent(),
    minDurationAdjustment: OptionalValue<UInt> = OptionalValue.absent(),
    maxDurationAdjustment: OptionalValue<UInt> = OptionalValue.absent()
)
```

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

### costs

```
val costs: OptionalValue<List<DeviceEnergyManagementTrait.CostStruct>>
```

The current estimated cost of operating the appliance.

### defaultDuration

```
val defaultDuration: UInt
```

The time, in seconds, that the appliance is expected to be in its slot.

### elapsedSlotTime

```
val elapsedSlotTime: UInt
```

The time, in seconds, that has already elapsed with the appliance in its slot.

### manufacturerEsaState

```
val manufacturerEsaState: OptionalValue<UShort>
```

Provides a manufacturer-defined value that indicates the state of the ESA.

### maxDuration

```
val maxDuration: UInt
```

The maximum time, in seconds, that the appliance is expected to be in its slot.

### maxDurationAdjustment

```
val maxDurationAdjustment: OptionalValue<UInt>
```

The maximum duration, in seconds, to which the slot's usage can be extended.

### maxPauseDuration

```
val maxPauseDuration: OptionalValue<UInt>
```

The maximum amount of time, in seconds, that the slot can be paused.

### maxPower

```
val maxPower: OptionalValue<Long>
```

The highest power, in milliwatts, that the appliance is expected to use in its current slot. Some appliances, such as battery inverters that can charge and discharge, might have a negative value for this field.

### maxPowerAdjustment

```
val maxPowerAdjustment: OptionalValue<Long>
```

The maximum power adjustment, in milliwatts, that the ESA can be requested to use.

### minDuration

```
val minDuration: UInt
```

The minimum time, in seconds, that the appliance is expected to be in its slot.

### minDurationAdjustment

```
val minDurationAdjustment: OptionalValue<UInt>
```

The minimum time, in seconds, to which the slot's usage can be shortened.

### minPauseDuration

```
val minPauseDuration: OptionalValue<UInt>
```

The shortest amount of time, in seconds, that the slot can be paused.

### minPower

```
val minPower: OptionalValue<Long>
```

The lowest power, in milliwatts, that the appliance is expected to use in its current slot. Some appliances, such as battery inverters that can charge and discharge, might have a negative value for this field.

### minPowerAdjustment

```
val minPowerAdjustment: OptionalValue<Long>
```

The minimum power adjustment, in milliwatts, that the ESA can be requested to use.

### nominalEnergy

```
val nominalEnergy: OptionalValue<Long>
```

The amount of energy that the appliance is expected to use or produce in its current slot.

### nominalPower

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

The expected power that the appliance will use in its current slot.

### remainingSlotTime

```
val remainingSlotTime: UInt
```

The remaining time, in seconds, that the appliance is expected to be in its slot.

### slotIsPausable

```
val slotIsPausable: OptionalValue<Boolean>
```

Indicates whether this slot can be paused.