# UnitTestingTrait.NullablesAndOptionalsStruct

# UnitTestingTrait.NullablesAndOptionalsStruct


```
class UnitTestingTrait.NullablesAndOptionalsStruct : ClusterStruct
```

<br />

*** ** * ** ***

NullablesAndOptionalsStruct\`.

## 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.NullablesAndOptionalsStruct.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.NullablesAndOptionalsStruct#NullablesAndOptionalsStruct(kotlin.UShort,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,kotlin.String,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.standard.UnitTestingTrait.SimpleStruct,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,kotlin.collections.List,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue)( nullableInt: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?, optionalInt: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html>, nullableOptionalInt: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?>, nullableString: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?, optionalString: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>, nullableOptionalString: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?>, nullableStruct: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleStruct?, optionalStruct: 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.SimpleStruct>, nullableOptionalStruct: 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.SimpleStruct?>, nullableList: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleEnum>?, optionalList: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleEnum>>, nullableOptionalList: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleEnum>?> )` Creates the NullablesAndOptionalsStruct 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.NullablesAndOptionalsStruct#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.NullablesAndOptionalsStruct#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-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#nullableInt()` `nullableInt` attribute. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleEnum>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#nullableList()` `nullableList` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#nullableOptionalInt()` `nullableOptionalInt` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleEnum>?>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#nullableOptionalList()` `nullableOptionalList` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#nullableOptionalString()` `nullableOptionalString` 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.SimpleStruct?>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#nullableOptionalStruct()` `nullableOptionalStruct` attribute. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#nullableString()` `nullableString` 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.NullablesAndOptionalsStruct#nullableStruct()` `nullableStruct` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#optionalInt()` `optionalInt` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.SimpleEnum>>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#optionalList()` `optionalList` attribute. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#optionalString()` `optionalString` 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.SimpleStruct>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/UnitTestingTrait.NullablesAndOptionalsStruct#optionalStruct()` `optionalStruct` attribute. |

## Public constructors

### NullablesAndOptionalsStruct

```
NullablesAndOptionalsStruct(
    nullableInt: UShort? = null,
    optionalInt: OptionalValue<UShort> = OptionalValue.absent(),
    nullableOptionalInt: OptionalValue<UShort?> = OptionalValue.absent(),
    nullableString: String? = null,
    optionalString: OptionalValue<String> = OptionalValue.absent(),
    nullableOptionalString: OptionalValue<String?> = OptionalValue.absent(),
    nullableStruct: UnitTestingTrait.SimpleStruct? = null,
    optionalStruct: OptionalValue<UnitTestingTrait.SimpleStruct> = OptionalValue.absent(),
    nullableOptionalStruct: OptionalValue<UnitTestingTrait.SimpleStruct?> = OptionalValue.absent(),
    nullableList: List<UnitTestingTrait.SimpleEnum>? = null,
    optionalList: OptionalValue<List<UnitTestingTrait.SimpleEnum>> = OptionalValue.absent(),
    nullableOptionalList: OptionalValue<List<UnitTestingTrait.SimpleEnum>?> = OptionalValue.absent()
)
```

Creates the NullablesAndOptionalsStruct 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

### nullableInt

```
val nullableInt: UShort?
```

`nullableInt` attribute.

### nullableList

```
val nullableList: List<UnitTestingTrait.SimpleEnum>?
```

`nullableList` attribute.

### nullableOptionalInt

```
val nullableOptionalInt: OptionalValue<UShort?>
```

`nullableOptionalInt` attribute.

### nullableOptionalList

```
val nullableOptionalList: OptionalValue<List<UnitTestingTrait.SimpleEnum>?>
```

`nullableOptionalList` attribute.

### nullableOptionalString

```
val nullableOptionalString: OptionalValue<String?>
```

`nullableOptionalString` attribute.

### nullableOptionalStruct

```
val nullableOptionalStruct: OptionalValue<UnitTestingTrait.SimpleStruct?>
```

`nullableOptionalStruct` attribute.

### nullableString

```
val nullableString: String?
```

`nullableString` attribute.

### nullableStruct

```
val nullableStruct: UnitTestingTrait.SimpleStruct?
```

`nullableStruct` attribute.

### optionalInt

```
val optionalInt: OptionalValue<UShort>
```

`optionalInt` attribute.

### optionalList

```
val optionalList: OptionalValue<List<UnitTestingTrait.SimpleEnum>>
```

`optionalList` attribute.

### optionalString

```
val optionalString: OptionalValue<String>
```

`optionalString` attribute.

### optionalStruct

```
val optionalStruct: OptionalValue<UnitTestingTrait.SimpleStruct>
```

`optionalStruct` attribute.