    struct TraitPayload

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

Container representing an encoded trait payload.
- `


  ### [init(id:typeURL:value:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload#/s:13GoogleHomeSDK12TraitPayloadV2id7typeURL5valueACSS_SS10Foundation4DataVtcfc)


  ` Initializes a `TraitPayload` with the given `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload.html#/s:13GoogleHomeSDK12TraitPayloadV2idSSvp`, `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload.html#/s:13GoogleHomeSDK12TraitPayloadV7typeURLSSvp`, and `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload.html#/s:13GoogleHomeSDK12TraitPayloadV5value10Foundation4DataVvp`.

  #### Declaration

  Swift

      init(id: String, typeURL: String = "", value: Data)

  #### Parameters

  |---|---|
  | ` id ` | The ID of the trait. |
  | ` typeURL ` | The type URL of the trait. |
  | ` value ` | The value of the trait. |

- `


  ### [id](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload#/s:13GoogleHomeSDK12TraitPayloadV2idSSvp)


  ` The ID of the trait.

  #### Declaration

  Swift

      var id: String { get }

- `


  ### [typeURL](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload#/s:13GoogleHomeSDK12TraitPayloadV7typeURLSSvp)


  ` The typeURL of the encoded trait data.

  #### Declaration

  Swift

      var typeURL: String { get }

- `


  ### [value](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload#/s:13GoogleHomeSDK12TraitPayloadV5value10Foundation4DataVvp)


  ` The encoded trait data.

  #### Declaration

  Swift

      var value: Data { get }

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload#/s:13GoogleHomeSDK12TraitPayloadV4hash4intoys6HasherVz_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)

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitPayload#/s:13GoogleHomeSDK12TraitPayloadV2eeoiySbAC_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: TraitPayload, rhs: TraitPayload) -> Bool

  #### Parameters

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

- `


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