# Constraint

# Constraint


```
sealed interface Constraint
```

<br />

Known direct subclasses [BitmapConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/BitmapConstraint), [BooleanConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/BooleanConstraint), [ByteConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ByteConstraint), [EnumConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/EnumConstraint), [ListConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListConstraint), [NumberRangeConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberRangeConstraint), [NumberSetConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberSetConstraint), [StringConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/StringConstraint), [StructConstraint](https://developers.home.google.com/reference/kotlin/com/google/home/automation/StructConstraint)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BitmapConstraint` | Represents constraints on a bitmap. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BooleanConstraint` | Constrains a field to boolean values. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ByteConstraint` |   |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/EnumConstraint` | Represents possible values a field can take. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListConstraint` | Represents constraints on elements of a list. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberRangeConstraint` | Represents a range of numbers. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NumberSetConstraint` | Represents a set of numbers. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/StringConstraint` | Represents string constraints, including constraints on length, and specific allowed and disallowed values. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/StructConstraint` | Represents constraints on individual fields of a struct. |

*** ** * ** ***

Constraints on a trait attribute, command parameter, or event field. Represents the possible values that an attribute, parameter, or field can have.