# FieldDetails

# FieldDetails


```
sealed class FieldDetails
```

<br />

Known direct subclasses [AttributeDetails](https://developers.home.google.com/reference/kotlin/com/google/home/automation/AttributeDetails), [CommandFieldDetails](https://developers.home.google.com/reference/kotlin/com/google/home/automation/CommandFieldDetails), [EventFieldDetails](https://developers.home.google.com/reference/kotlin/com/google/home/automation/EventFieldDetails)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AttributeDetails` | Metadata pertaining to a trait attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/CommandFieldDetails` | A parameter belonging to a `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Command`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/EventFieldDetails` | A field that belongs to an Event. |

*** ** * ** ***

Describes a Field with additional details, in addition to information from interface `https://developers.home.google.com/reference/kotlin/com/google/home/Field`.

## Summary

| ### Protected constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails#FieldDetails(kotlin.String,kotlin.Boolean,com.google.home.automation.Constraint,com.google.home.Field)( name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, isOptional: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, constraint: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Constraint?, field: https://developers.home.google.com/reference/kotlin/com/google/home/Field )` |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Constraint?` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails#constraint()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/Field` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails#field()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails#isOptional()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails#name()` **This property is deprecated.** Use field.toString() instead |

## Protected constructors

### FieldDetails

```
protected FieldDetails(
    name: String,
    isOptional: Boolean,
    constraint: Constraint?,
    field: Field
)
```

## Public properties

### constraint

```
val constraint: Constraint?
```

### field

```
val field: Field
```

### isOptional

```
val isOptional: Boolean
```

### name

```
val name: String
```

> [!CAUTION]
> **This property is deprecated.**   
> Use field.toString() instead