# ClosureControlTrait.OverallCurrentStateStruct

# ClosureControlTrait.OverallCurrentStateStruct


```
class ClosureControlTrait.OverallCurrentStateStruct : ClusterStruct
```

<br />

*** ** * ** ***

The current state of the closure.

## 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/ClosureControlTrait.OverallCurrentStateStruct.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/ClosureControlTrait.OverallCurrentStateStruct#OverallCurrentStateStruct(com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,kotlin.Boolean)( position: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.CurrentPositionEnum?>, latch: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?>, speed: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.ThreeLevelAutoEnum>, secureState: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html? )` Creates the OverallCurrentStateStruct 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/ClosureControlTrait.OverallCurrentStateStruct#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/ClosureControlTrait.OverallCurrentStateStruct#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/-boolean/index.html?>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OverallCurrentStateStruct#latch()` The current latch state of the closure. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.CurrentPositionEnum?>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OverallCurrentStateStruct#position()` The current Position state of the closure, as defined in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.CurrentPositionEnum`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OverallCurrentStateStruct#secureState()` The current secure state of the closure. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.ThreeLevelAutoEnum>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OverallCurrentStateStruct#speed()` The current speed state of the closure, as defined in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.ThreeLevelAutoEnum`. |

## Public constructors

### OverallCurrentStateStruct

```
OverallCurrentStateStruct(
    position: OptionalValue<ClosureControlTrait.CurrentPositionEnum?> = OptionalValue.absent(),
    latch: OptionalValue<Boolean?> = OptionalValue.absent(),
    speed: OptionalValue<ClosureControlTrait.ThreeLevelAutoEnum> = OptionalValue.absent(),
    secureState: Boolean? = null
)
```

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

### latch

```
val latch: OptionalValue<Boolean?>
```

The current latch state of the closure. A null value indicates that the state is not known.

### position

```
val position: OptionalValue<ClosureControlTrait.CurrentPositionEnum?>
```

The current Position state of the closure, as defined in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.CurrentPositionEnum`.

### secureState

```
val secureState: Boolean?
```

The current secure state of the closure. A secure state requires the closure to meet both of the following conditions defined by the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.OverallCurrentStateStruct`:

- If the `Positioning` feature is supported, then the Position field of `OverallCurrentState` is `FullyClosed`.
- If the `MotionLatching` feature is supported, then the `Latch` field `of OverallCurrentState`is `True`.

<br />

### speed

```
val speed: OptionalValue<ClosureControlTrait.ThreeLevelAutoEnum>
```

The current speed state of the closure, as defined in the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureControlTrait.ThreeLevelAutoEnum`.