# EnergyEvseTrait.ChargingTargetStruct

# EnergyEvseTrait.ChargingTargetStruct


```
class EnergyEvseTrait.ChargingTargetStruct : ClusterStruct
```

<br />

*** ** * ** ***

A single user-specified charging target for an electric vehicle.

## 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/EnergyEvseTrait.ChargingTargetStruct.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/EnergyEvseTrait.ChargingTargetStruct#ChargingTargetStruct(kotlin.UShort,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue)( targetTimeMinutesPastMidnight: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html, targetSoC: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html>, addedEnergy: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html> )` Creates the ChargingTargetStruct 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/EnergyEvseTrait.ChargingTargetStruct#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/EnergyEvseTrait.ChargingTargetStruct#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/-long/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.ChargingTargetStruct#addedEnergy()` The amount of energy, in milliwatt hours, that the user would like to have added to the vehicle before the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.ChargingTargetStruct#targetTimeMinutesPastMidnight()` is reached. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.ChargingTargetStruct#targetSoC()` The target SoC, in percentage, that the vehicle should be charged to before the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.ChargingTargetStruct#targetTimeMinutesPastMidnight()` is reached. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.ChargingTargetStruct#targetTimeMinutesPastMidnight()` The desired charging completion time of the associated day, where the time is represented by a 16-bit unsigned integer to designate the minutes past midnight. |

## Public constructors

### ChargingTargetStruct

```
ChargingTargetStruct(
    targetTimeMinutesPastMidnight: UShort,
    targetSoC: OptionalValue<UByte> = OptionalValue.absent(),
    addedEnergy: OptionalValue<Long> = OptionalValue.absent()
)
```

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

### addedEnergy

```
val addedEnergy: OptionalValue<Long>
```

The amount of energy, in milliwatt hours, that the user would like to have added to the vehicle before the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.ChargingTargetStruct#targetTimeMinutesPastMidnight()` is reached.

### targetSoC

```
val targetSoC: OptionalValue<UByte>
```

The target SoC, in percentage, that the vehicle should be charged to before the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/EnergyEvseTrait.ChargingTargetStruct#targetTimeMinutesPastMidnight()` is reached.

### targetTimeMinutesPastMidnight

```
val targetTimeMinutesPastMidnight: UShort
```

The desired charging completion time of the associated day, where the time is represented by a 16-bit unsigned integer to designate the minutes past midnight. For example, 6 a.m. is represented by 360 minutes past midnight.