    struct ForecastStruct

Indicates a list of `slots` to describe the overall timing of the ESA's planned energy and
power usage, with different power and energy demands for each slot. For example, slots might
be used to describe the distinct stages of a washing machine cycle.
- `


  ### [activeSlotNumber](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV16activeSlotNumbers6UInt16VSgvp)


  ` Indicates which element of the `Slots` list is currently active in the forecast sequence.
  A null value indicates that the sequence has not yet started.

  #### Declaration

  Swift

      let activeSlotNumber: UInt16?

- `


  ### [startTime](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV9startTimes6UInt32Vvp)


  ` The planned start time, in UTC, for the entire forecast.

  #### Declaration

  Swift

      let startTime: UInt32

- `


  ### [endTime](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV7endTimes6UInt32Vvp)


  ` The planned end time, in UTC, for the entire forecast.

  #### Declaration

  Swift

      let endTime: UInt32

- `


  ### [earliestStartTime](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV17earliestStartTimes6UInt32VSgvp)


  ` The earliest time, in UTC, that the ESA can start the forecast sequence.

  #### Declaration

  Swift

      let earliestStartTime: UInt32?

- `


  ### [latestEndTime](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV13latestEndTimes6UInt32VSgvp)


  ` The latest end time, in UTC, for the entire forecast.

  #### Declaration

  Swift

      let latestEndTime: UInt32?

- `


  ### [isPausable](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV10isPausableSbvp)


  ` Indicates that some part of the forecast can be paused.

  #### Declaration

  Swift

      let isPausable: Bool

- `


  ### [slots](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV5slotsSayAE04SlotJ0VGvp)


  ` A list of `SlotStructs` where the list must contain at least one entry but no more than
  10.

  #### Declaration

  Swift

      let slots: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/SlotStruct.html]

- `


  ### [forecastUpdateReason](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV20forecastUpdateReasonAE0ilM4EnumOvp)


  ` The reason for updating the forecast.

  #### Declaration

  Swift

      let forecastUpdateReason: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastUpdateReasonEnum.html

- `


  ### [init(decoder:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV7decoderAG0aB3SDK0H7DecoderV_tKcfc)


  ` Creates a new Struct instance using data read from the given `TraitDecoder`.
  Throws
  `HomeError.parseError` when parsing fails.

  #### Declaration

  Swift

      init(decoder: TraitDecoder) throws

  #### Parameters

  |---|---|
  | ` decoder ` | The raw data representing this Struct. |

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV6encode4withy0aB3SDK0H7EncoderC_tKF)


  ` Writes this Struct to the given `TraitEncoder`.
  Throws `HomeError.parseError` if the data could not be encoded.

  #### Declaration

  Swift

      func encode(with encoder: TraitEncoder) throws

- `


  ### [structField(id:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/DeviceEnergyManagementTrait/ForecastStruct#/s:15GoogleHomeTypes6MatterO27DeviceEnergyManagementTraitV14ForecastStructV11structField2id0aB3SDK0L0_pSgs6UInt32V_tFZ)


  ` Returns the field corresponding to the given field ID.

  #### Declaration

  Swift

      static func structField(id: UInt32) -> (any Field)?