# NullablesAndOptionalsStruct

    struct NullablesAndOptionalsStruct

NullablesAndOptionalsStruct\`.
- `


  ### [nullableInt](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV11nullableInts6UInt16VSgvp)


  ` `nullableInt` attribute.

  #### Declaration

  Swift

      let nullableInt: UInt16?

- `


  ### [optionalInt](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV11optionalInts6UInt16VSgvp)


  ` `optionalInt` attribute.

  #### Declaration

  Swift

      let optionalInt: UInt16?

- `


  ### [nullableOptionalInt](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV19nullableOptionalInts6UInt16VSgvp)


  ` `nullableOptionalInt` attribute.

  #### Declaration

  Swift

      let nullableOptionalInt: UInt16?

- `


  ### [nullableString](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV14nullableStringSSSgvp)


  ` `nullableString` attribute.

  #### Declaration

  Swift

      let nullableString: String?

- `


  ### [optionalString](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV14optionalStringSSSgvp)


  ` `optionalString` attribute.

  #### Declaration

  Swift

      let optionalString: String?

- `


  ### [nullableOptionalString](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV22nullableOptionalStringSSSgvp)


  ` `nullableOptionalString` attribute.

  #### Declaration

  Swift

      let nullableOptionalString: String?

- `


  ### [nullableStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV08nullableK0AE06SimpleK0VSgvp)


  ` `nullableStruct` attribute.

  #### Declaration

  Swift

      let nullableStruct: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/SimpleStruct.html?

- `


  ### [optionalStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV08optionalK0AE06SimpleK0VSgvp)


  ` `optionalStruct` attribute.

  #### Declaration

  Swift

      let optionalStruct: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/SimpleStruct.html?

- `


  ### [nullableOptionalStruct](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV016nullableOptionalK0AE06SimpleK0VSgvp)


  ` `nullableOptionalStruct` attribute.

  #### Declaration

  Swift

      let nullableOptionalStruct: https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/SimpleStruct.html?

- `


  ### [nullableList](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV12nullableListSayAE10SimpleEnumOGSgvp)


  ` `nullableList` attribute.

  #### Declaration

  Swift

      let nullableList: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/SimpleEnum.html]?

- `


  ### [optionalList](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV12optionalListSayAE10SimpleEnumOGSgvp)


  ` `optionalList` attribute.

  #### Declaration

  Swift

      let optionalList: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/SimpleEnum.html]?

- `


  ### [nullableOptionalList](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV20nullableOptionalListSayAE10SimpleEnumOGSgvp)


  ` `nullableOptionalList` attribute.

  #### Declaration

  Swift

      let nullableOptionalList: [https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait.html.https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/SimpleEnum.html]?

- `


  ### [init(decoder:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV7decoderAG0aB3SDK0G7DecoderV_tKcfc)


  ` Creates a new Struct instance using data read from the given `TraitDecoder`.
  Throws
  `HomeError.parseError` when parsing fails.

  #### Declaration

  Swift

      init(decoder: TraitDecoder) throws

  #### Parameters

  |---|---|
  | ` decoder ` | The raw data representing this Struct. |

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV6encode4withy0aB3SDK0G7EncoderC_tKF)


  ` Writes this Struct to the given `TraitEncoder`.
  Throws `HomeError.parseError` if the data could not be encoded.

  #### Declaration

  Swift

      func encode(with encoder: TraitEncoder) throws

- `


  ### [structField(id:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/UnitTestingTrait/NullablesAndOptionalsStruct#/s:15GoogleHomeTypes6MatterO16UnitTestingTraitV27NullablesAndOptionalsStructV11structField2id0aB3SDK0M0_pSgs6UInt32V_tFZ)


  ` Returns the field corresponding to the given field ID.

  #### Declaration

  Swift

      static func structField(id: UInt32) -> (any Field)?