# NumberSetConstraint


```
class NumberSetConstraint<T : Number> : Constraint
```

<br />

*** ** * ** ***

Represents a set of numbers.

## Summary

| ### Public constructors |
|---|
| `<T : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number/index.html> https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberSetConstraint#NumberSetConstraint(kotlin.collections.Set,com.google.home.automation.ConstraintUnit,kotlin.collections.Map)( allowedSet: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html<T>, unit: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConstraintUnit?, labels: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<T, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>>? )` Create a `NumberSetConstraint` instance. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html<T>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberSetConstraint#allowedSet()` The allowed values. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<T, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberSetConstraint#labels()` When specified, the key is the allowed value and the value is a list of user-friendly names for that value. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConstraintUnit?` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberSetConstraint#unit()` The measurement unit associated with the number set. |

## Public constructors

### NumberSetConstraint

```
<T : Number> NumberSetConstraint(
    allowedSet: Set<T>,
    unit: ConstraintUnit?,
    labels: Map<T, List<String>>? = null
)
```

Create a `NumberSetConstraint` instance.

## Public properties

### allowedSet

```
val allowedSet: Set<T>
```

The allowed values.

### labels

```
val labels: Map<T, List<String>>?
```

When specified, the key is the allowed value and the value is a list of user-friendly names for that value.

### unit

```
val unit: ConstraintUnit?
```

The measurement unit associated with the number set.