# UnitTestingTrait.NestedStruct

# UnitTestingTrait.NestedStruct


```
class UnitTestingTrait.NestedStruct : ClusterStruct
```

<br />

*** ** * ** ***

NestedStruct

## Summary

| ### Nested types |
|---|
| `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct.StructFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this struct's fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct#NestedStruct(kotlin.UByte,kotlin.Boolean,com.google.home.matter.standard.UnitTestingTrait.SimpleStruct,com.google.home.matter.serialization.OptionalValue)( a: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html, b: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, c: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleStruct, d: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.TestGlobalStruct> )` Creates the NestedStruct class. |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct#a()` `a` attribute. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct#b()` `b` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleStruct` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct#c()` `c` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.TestGlobalStruct>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NestedStruct#d()` |

## Public constructors

### NestedStruct

```
NestedStruct(
    a: UByte,
    b: Boolean = false,
    c: UnitTestingTrait.SimpleStruct = SimpleStruct(),
    d: OptionalValue<UnitTestingTrait.TestGlobalStruct> = OptionalValue.absent()
)
```

Creates the NestedStruct class.

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### a

```
val a: UByte
```

`a` attribute.

### b

```
val b: Boolean
```

`b` attribute.

### c

```
val c: UnitTestingTrait.SimpleStruct
```

`c` attribute.

### d

```
val d: OptionalValue<UnitTestingTrait.TestGlobalStruct>
```