# TraitAttributesCandidate

# TraitAttributesCandidate


```
class TraitAttributesCandidate : StarterCandidate, StateReaderCandidate, ActionCandidate
```

<br />

*** ** * ** ***

Represents automation candidate nodes corresponding to a trait's attributes. These can be used in starters, state readers and actions.

## Summary

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#TraitAttributesCandidate(com.google.home.HasId,kotlin.collections.List,com.google.home.TraitFactory,kotlin.collections.Map,kotlin.collections.Map,kotlin.collections.List)( entity: https://developers.home.google.com/reference/kotlin/com/google/home/HasId, types: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType>>, trait: https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/Trait>, fields: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/automation/AttributeDetails>, fieldDetailsMap: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/Field, https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails>, unsupportedReasons: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedCandidateReason> )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#equals(kotlin.Any)(other: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#hashCode()()` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#toString()()` |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/HasId` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#entity()` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/Field, https://developers.home.google.com/reference/kotlin/com/google/home/automation/FieldDetails>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#fieldDetailsMap()` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/automation/AttributeDetails>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#fields()` **This property is deprecated.** Use fieldDetailsMap instead |
| `open https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/Trait>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#trait()` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType>>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#types()` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnsupportedCandidateReason>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/TraitAttributesCandidate#unsupportedReasons()` |

## Public constructors

### TraitAttributesCandidate

```
TraitAttributesCandidate(
    entity: HasId,
    types: List<DeviceTypeFactory<DeviceType>>,
    trait: TraitFactory<Trait>,
    fields: Map<String, AttributeDetails>,
    fieldDetailsMap: Map<Field, FieldDetails> = emptyMap(),
    unsupportedReasons: List<UnsupportedCandidateReason> = emptyList()
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### entity

```
open val entity: HasId
```

### fieldDetailsMap

```
open val fieldDetailsMap: Map<Field, FieldDetails>
```

### fields

```
open val fields: Map<String, AttributeDetails>
```

> [!CAUTION]
> **This property is deprecated.**   
> Use fieldDetailsMap instead

### trait

```
open val trait: TraitFactory<Trait>
```

### types

```
open val types: List<DeviceTypeFactory<DeviceType>>
```

### unsupportedReasons

```
open val unsupportedReasons: List<UnsupportedCandidateReason>
```