    struct AnyEvent

    extension AnyEvent : Sendable, SendableMetatype

Struct holding information about a generic, encoded event that has yet to be parsed into its
corresponding concrete type.
- `


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


  ` Event Identifier indicating the type of the event -- this corresponds to the `identifier`
  property on the corresponding concrete event type that this can be decoded into.

  #### Declaration

  Swift

      let id: String

- `


  ### [isEventType(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyEvent#/s:13GoogleHomeSDK8AnyEventV02isE4TypeySbxmAA0E0RzlF)


  ` Returns whether the given `AnyEvent` contains an event of type `T`.

  #### Declaration

  Swift

      func isEventType<T>(_ type: T.Type) -> Bool where T : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Event.html

- `


  ### [decode(as:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/AnyEvent#/s:13GoogleHomeSDK8AnyEventV6decode2asxxm_tKAA0E0RzlF)


  ` Attempts to decode the given `GenericEvent` into the concrete event type `T`.
  Throws
  A `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html` if the decoding fails.

  #### Declaration

  Swift

      func decode<T>(as type: T.Type = T.self) throws -> T where T : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Event.html

  #### Return Value

  The decoded event of type `T`.