# StructDescriptor

# StructDescriptor


```
@Immutable
@HomeExperimentalGenericApi
interface StructDescriptor : Descriptor
```

<br />

*** ** * ** ***

Interface implemented by logical struct types. In addition to Matter-defined structs, this can be used to represent command, event and trait attribute containers approximated as structures.

## Summary

| ### Public functions |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/ClusterStruct` | `https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor#toStruct(kotlin.collections.Map)(fields: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/Field, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?>)` Returns the `https://developers.home.google.com/reference/kotlin/com/google/home/ClusterStruct` representation of this descriptor. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field>` | `https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor#fields()` |

## Public functions

### toStruct

```
fun toStruct(fields: Map<Field, Any?>): ClusterStruct
```

Returns the `https://developers.home.google.com/reference/kotlin/com/google/home/ClusterStruct` representation of this descriptor.

## Public properties

### fields

```
val fields: Map<UInt, Field>
```