# ClosureDimensionTrait.UnitRangeStruct

# ClosureDimensionTrait.UnitRangeStruct


```
class ClosureDimensionTrait.UnitRangeStruct : ClusterStruct
```

<br />

*** ** * ** ***

Defines an operational range, from a minimum to a maximum value, for a dimension of a 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/ClosureDimensionTrait.UnitRangeStruct.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/ClosureDimensionTrait.UnitRangeStruct#UnitRangeStruct(kotlin.Short,kotlin.Short)(min: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html, max: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html)` Creates the UnitRangeStruct 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/ClosureDimensionTrait.UnitRangeStruct#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/ClosureDimensionTrait.UnitRangeStruct#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://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureDimensionTrait.UnitRangeStruct#max()` The maximum value of the operational range for this dimension, where the unit of measurement is specified by `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureDimensionTrait.ClosureUnitEnum`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureDimensionTrait.UnitRangeStruct#min()` The minimum value of the operational range for this dimension, where the unit of measurement is specified by `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureDimensionTrait.ClosureUnitEnum`. |

## Public constructors

### UnitRangeStruct

```
UnitRangeStruct(min: Short = 0, max: Short = 0)
```

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

### max

```
val max: Short
```

The maximum value of the operational range for this dimension, where the unit of measurement is specified by `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureDimensionTrait.ClosureUnitEnum`. The value of `max` must be greater than or equal to the value of `min` and less than or equal to 32767. The default value is 1.

### min

```
val min: Short
```

The minimum value of the operational range for this dimension, where the unit of measurement is specified by `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ClosureDimensionTrait.ClosureUnitEnum`. The value of `min` must be less than or equal to the value of `max` and greater than or equal to -32768. The default value is 0.