    struct AnyStruct

    extension AnyStruct : https://developers.home.google.com/reference/swift/GoogleHomeSDK/GoogleHomeSDK.html#/s:13GoogleHomeSDK15AutomationValueP, Equatable, Hashable, Sendable, SendableMetatype, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable.html

A type-erased `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable.html`
- `


  ### [init(decoder:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV7decoderAcA12TraitDecoderV_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/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV6encode4withyAA12TraitEncoderC_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

- `


  ### [cast(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV4castyxSgxmAA0E17DataRepresentableRzlF)


  ` Casts the field to the given type.

  #### Declaration

  Swift

      func cast<T>(_ type: T.Type = T.self) -> T? where T : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable.html

- `


  ### [is(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV2isySbxmAA0E17DataRepresentableRzlF)


  ` Returns true if the field is of the given type.

  #### Declaration

  Swift

      func `is`<T>(_ type: T.Type = T.self) -> Bool where T : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable.html

- `


  ### [isEqual(to:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV7isEqual2toSbAA0E17DataRepresentable_p_tF)


  ` Undocumented

  #### Declaration

  Swift

      func isEqual(to other: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable.html) -> Bool

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV2eeoiySbAC_ACtFZ)


  ` Returns a Boolean value indicating whether two values are equal.

  Equality is the inverse of inequality. For any values `a` and `b`,
  `a == b` implies that `a != b` is `false`.

  #### Declaration

  Swift

      static func == (lhs: AnyStruct, rhs: AnyStruct) -> Bool

  #### Parameters

  |---|---|
  | ` lhs ` | A value to compare. |
  | ` rhs ` | Another value to compare. |

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV4hash4intoys6HasherVz_tF)


  ` Hashes the essential components of this value by feeding them into the
  given hasher.

  Implement this method to conform to the `Hashable` protocol. The
  components used for hashing must be the same as the components compared
  in your type's `==` operator implementation. Call `hasher.combine(_:)`
  with each of these components.
  Important

  In your implementation of `hash(into:)`,
  don't call `finalize()` on the `hasher` instance provided,
  or replace it with a different instance.
  Doing so may become a compile-time error in the future.

  #### Declaration

  Swift

      func hash(into hasher: inout Hasher)

- `


  ### [toFields()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyStruct#/s:13GoogleHomeSDK9AnyStructV8toFieldsSDyAA0D5FieldVAA0D15AutomationValueOGyF)


  ` 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]