    protocol Trait : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/TraitEncodable.html, CustomStringConvertible, Hashable, Sendable

    extension Trait : Equatable, SendableMetatype

Basic interface for object Traits.
- `


  ### [supportedEventTypes](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait#/s:13GoogleHomeSDK5TraitP19supportedEventTypesSayAA0F0_pXpGvpZ)


  ` List of all event types on the given Trait.

  Currently, only `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/MatterTrait.html` traits support any events, but this will likely expand to other
  traits in the future.

  #### Declaration

  Swift

      static var supportedEventTypes: [any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Event.html.Type] { get }

- `


  ### [supportedCommandTypes](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait#/s:13GoogleHomeSDK5TraitP21supportedCommandTypesSayAA0F0_pXpGvpZ)


  ` List of all commands supported by the Trait's definition. The commands supported by a specific
  Trait instance may vary.

  #### Declaration

  Swift

      static var supportedCommandTypes: [any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Command.html.Type] { get }

- `


  ### [metadata](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait#/s:13GoogleHomeSDK5TraitP8metadataAA0D8MetadataVvp)


  ` Metadata about this `Trait`.

  #### Declaration

  Swift

      var metadata: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitMetadata.html { get }

- `


  ### [init(decoder:interactionProxy:metadata:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait#/s:13GoogleHomeSDK5TraitP7decoder16interactionProxy8metadataxAA0D7DecoderV_AA011InteractionG0_pSgAA0D8MetadataVtKcfc)


  ` Creates a new Trait 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, interactionProxy: (any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/InteractionProxy.html)?, metadata: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitMetadata.html) throws

  #### Parameters

  |---|---|
  | ` decoder ` | The raw data representing this Trait. |
  | ` interactionProxy ` | Proxy to the Interaction Client. |
  | ` metadata ` | Metadata about this Trait. |

- `


  ### [attribute(id:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait#/s:13GoogleHomeSDK5TraitP9attribute2idAA5Field_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 attribute(id: UInt32) -> (any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Field.html)?

- `


  ### [description](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait#/s:13GoogleHomeSDK5TraitPAAE11descriptionSSvp)


  ` Extension method Returns a string representation of the Trait as {namespace}.{traitName}.

  #### Declaration

  Swift

      var description: String { get }