    protocol StructDataRepresentable : https://developers.home.google.com/reference/swift/GoogleHomeSDK/GoogleHomeSDK.html#/s:13GoogleHomeSDK15AutomationValueP

    extension StructDataRepresentable : Equatable, Hashable, Sendable, SendableMetatype

Serializable abstraction for Structure data objects.
- `


  ### [init(decoder:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable#/s:13GoogleHomeSDK23StructDataRepresentableP7decoderxAA12TraitDecoderV_tKcfc)


  ` Creates a new Struct instance using data read from the given `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitDecoder.html`.
  Throws
  `HomeError.parseError` when parsing fails.

  #### Declaration

  Swift

      init(decoder: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitDecoder.html) throws

  #### Parameters

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

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable#/s:13GoogleHomeSDK23StructDataRepresentableP6encode4withyAA12TraitEncoderC_tKF)


  ` Writes this Struct to the given `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/TraitEncoder.html`.
  Throws `HomeError.parseError` if the data could not be encoded.

  #### Declaration

  Swift

      func encode(with encoder: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/TraitEncoder.html) throws

- `


  ### [structField(id:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable#/s:13GoogleHomeSDK23StructDataRepresentableP11structField2idAA0H0_pSgs6UInt32V_tFZ)


  ` Default implementation Returns the field corresponding to the given field ID.

  #### Default Implementation

  Returns the field corresponding to the given field ID.

  #### Declaration

  Swift

      static func structField(id: UInt32) -> (any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Field.html)?

- `


  ### [init(fields:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable#/s:13GoogleHomeSDK23StructDataRepresentableP6fieldsxSgSDyAA8AnyFieldVAA0H15AutomationValueOG_tcfc)


  ` Default implementation Creates a new Struct instance using the given dictionary of field/value pairs.

  #### Default Implementation

  Creates a new Struct instance using the given dictionary of field/value pairs.

  #### Declaration

  Swift

      @_spi(Unknown)
      init?(fields: [https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyField.html : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Enums/AnyAutomationValue.html])

  #### Parameters

  |---|---|
  | ` fields ` | The list of fields representing this Struct. |

- `


  ### [toFields()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable#/s:13GoogleHomeSDK23StructDataRepresentableP8toFieldsSDyAA8AnyFieldVAA0I15AutomationValueOGyF)


  ` Default implementation Serializes this Struct to a dictionary of `AnyField`/`AnyAutomationValue` pairs that can be
  used for serialization in the Automation SDK.

  #### Default Implementation

  Serializes this Struct to a dictionary of `AnyField`/`AnyAutomationValue` pairs that can be
  used for serialization in the Automation SDK.

  #### Declaration

  Swift

      @_spi(Unknown)
      func toFields() -> [https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyField.html : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Enums/AnyAutomationValue.html]

- `


  ### [isEqual(to:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable#/s:13GoogleHomeSDK23StructDataRepresentablePAAE7isEqual2toSbAaB_p_tF)


  ` Extension method Undocumented

  #### Declaration

  Swift

      func isEqual(to other: any StructDataRepresentable) -> Bool