    protocol DeviceType : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/HasParts.html, CustomDebugStringConvertible, Hashable

    extension DeviceType : Equatable, Sendable, SendableMetatype

Protocol implemented by all the generated `DeviceType` structs.

A device type represents a collection of traits with connected functionality.
- `


  ### [identifier](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypeP10identifierSSvpZ)


  ` The device type's identifier.

  #### Declaration

  Swift

      static var identifier: String { get }

- `


  ### [isUtilityType](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypeP09isUtilityE0SbvpZ)


  ` Whether the device type is a utility type. If false, this type is an application type.

  #### Declaration

  Swift

      static var isUtilityType: Bool { get }

- `


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


  ` Additional information about this device type.

  #### Declaration

  Swift

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

- `


  ### [traits](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypeP6traitsAA15TraitCollectionCvp)


  ` The traits that make up this device type.

  Use this to access traits that are not directly exposed as properties on the `DeviceType`,
  like custom traits and traits belonging to utility types.

  #### Declaration

  Swift

      var traits: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/TraitCollection.html { get }

- `


  ### [events](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypeP6eventsAA15EventController_pvp)


  ` Entrypoint to subscribe to events on this DeviceType.

  #### Declaration

  Swift

      var events: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/EventController.html { get }

- `


  ### [init(traits:eventController:metadataBuilder:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypeP6traits15eventController15metadataBuilderxAA15TraitCollectionC_AA05EventH0_pAA0dE8MetadataVSayAA0K0_pGSgXEtKcfc)


  ` Creates a new `DeviceType` from the given trait collection.
  Throws
  Throws a `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html` if the given collection is missing one or more required traits for the given device type.

  #### Declaration

  Swift

      init(traits: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/TraitCollection.html, eventController: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/EventController.html, metadataBuilder: ([any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait.html]?) -> https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/DeviceTypeMetadata.html) throws

- `


  ### [parts(type:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypePAAE5parts4typeSayqd__Gqd__m_tAaBRd__lF)


  ` Extension method Returns the parts satisfying the given criteria.

  #### Declaration

  Swift

      @available(*, deprecated, message: "Use `HasParts` protocol methods instead.")
      func parts<T>(type: T.Type = T.self) -> [T] where T : DeviceType

  #### Parameters

  |---|---|
  | ` type ` | The type of parts to return. |

  #### Return Value

  The parts satisfying the given criteria.
- `


  ### [identifier](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypePAAE10identifierSSvp)


  ` Extension method Undocumented

  #### Declaration

  Swift

      var identifier: String { get }

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypePAAE2eeoiySbx_xtFZ)


  ` Extension method 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: Self, rhs: Self) -> Bool

  #### Parameters

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

- `


  ### [hash(into:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/DeviceType#/s:13GoogleHomeSDK10DeviceTypePAAE4hash4intoys6HasherVz_tF)


  ` Extension method 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)