# DeviceEnergyManagementTrait.RequestConstraintBasedForecastCommand.Request

# DeviceEnergyManagementTrait.RequestConstraintBasedForecastCommand.Request


```
class DeviceEnergyManagementTrait.RequestConstraintBasedForecastCommand.Request : ClusterStruct
```

<br />

*** ** * ** ***

The request payload for the RequestConstraintBasedForecast command.

## 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.RequestConstraintBasedForecastCommand.Request.CommandFields : 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 command's request fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.RequestConstraintBasedForecastCommand.Request#Request(kotlin.collections.List,com.google.home.matter.standard.DeviceEnergyManagementTrait.AdjustmentCauseEnum)( constraints: 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.ConstraintsStruct>, cause: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum )` Creates a request payload for the RequestConstraintBasedForecast command. |

| ### 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.RequestConstraintBasedForecastCommand.Request#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.RequestConstraintBasedForecastCommand.Request#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/standard/DeviceEnergyManagementTrait.AdjustmentCauseEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.RequestConstraintBasedForecastCommand.Request#cause()` The cause of the request from the EMS. |
| `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.ConstraintsStruct>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DeviceEnergyManagementTrait.RequestConstraintBasedForecastCommand.Request#constraints()` A series of turn-up or turn-down power constraints that the EMS is asking the ESA to adhere to in its forecast. |

## Public constructors

### Request

```
Request(
    constraints: List<DeviceEnergyManagementTrait.ConstraintsStruct> = emptyList(),
    cause: DeviceEnergyManagementTrait.AdjustmentCauseEnum = AdjustmentCauseEnum.LocalOptimization
)
```

Creates a request payload for the RequestConstraintBasedForecast command.

## 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

### cause

```
val cause: DeviceEnergyManagementTrait.AdjustmentCauseEnum
```

The cause of the request from the EMS.

### constraints

```
val constraints: List<DeviceEnergyManagementTrait.ConstraintsStruct>
```

A series of turn-up or turn-down power constraints that the EMS is asking the ESA to adhere to in its forecast. For example, if a grid event requires devices to reduce power (turn down) between 4 p.m. and 6 p.m., and there is excess power on the grid overnight, this may cause an EMS to request that an ESA increase its power demand (turn up) between midnight and 6 a.m.