    final class HistoryQuery

A query for history items.
- `


  ### [objects(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC7objectsyACXDAA0B6Object_pd_tF)


  ` Adds a filter for history items that originate from any of the given objects.

  #### Declaration

  Swift

      func objects(_ objects: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/HomeObject.html...) -> Self

- `


  ### [objects(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC7objectsyACXDSayAA0B6Object_pGF)


  ` Adds a filter for history items that originate from any of the given objects.

  #### Declaration

  Swift

      func objects(_ objects: [any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/HomeObject.html]) -> Self

- `


  ### [objects(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC7objectsyACXDSSd_tF)


  ` Adds a filter for history items that originate from any of the referenced objects.

  #### Declaration

  Swift

      func objects(_ objectIDs: String...) -> Self

- `


  ### [objects(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC7objectsyACXDSaySSGF)


  ` Adds a filter for history items that originate from any of the referenced objects.

  #### Declaration

  Swift

      func objects(_ objectIDs: [String]) -> Self

- `


  ### [date(start:end:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC4date5start3endACXD10Foundation4DateV_AItF)


  ` Adds a filter for history items that occurred within the given date range.

  #### Declaration

  Swift

      func date(start: Date = .distantPast, end: Date = .distantFuture) -> Self

  #### Parameters

  |---|---|
  | ` start ` | The start date of the date range. Defaults to `.distantPast`. |
  | ` end ` | The end date of the date range. Defaults to `.distantFuture`. |

- `


  ### [traits(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC6traitsyACXDAA5Trait_pXpd_tF)


  ` Adds a filter for history items that belong to any of the given Trait types.

  #### Declaration

  Swift

      func traits(_ traits: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Trait.html.Type...) -> Self

- `


  ### [events(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC6eventsyACXDAA5Event_pXpd_tF)


  ` Adds a filter for history items that belong to any of the given Event types.

  #### Declaration

  Swift

      func events(_ events: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Event.html.Type...) -> Self

- `


  ### [cameraEvents(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC12cameraEventsyACXDSSd_tF)


  ` Adds a filter for history items that belong to any of the given camera event types.

  #### Declaration

  Swift

      func cameraEvents(_ cameraEventTypes: String...) -> Self

- `


  ### [attribute(_:value:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC9attribute_5valueACXDSS_SStF)


  ` Adds a filter expression for history items that match the given attribute.

  #### Declaration

  Swift

      func attribute(_ key: String, value: String) -> Self

- `


  ### [description](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC11descriptionSSvp)


  ` Undocumented

  #### Declaration

  Swift

      var description: String { get }

- `


  ### [execute(pageSize:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC7execute8pageSizeAA05PagedD6StreamVSu_tKF)


  ` Executes the query with the current filter spec.

  Parameter: pageSize - Number of items to return in a single page (max 1000).
  Returns an AsyncSequence of pages of items.s

  #### Declaration

  Swift

      func execute(pageSize: UInt) throws -> https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/PagedHistoryStream.html

- `


  ### [execute()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery#/s:13GoogleHomeSDK12HistoryQueryC7executeSayAA0D4ItemVGyYaKF)


  ` Executes the query with the current filter spec, collects results,
  and returns them as an array.

  Returns an array of all matched items.

  #### Declaration

  Swift

      func execute() async throws -> [https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HistoryItem.html]

- `


  ### [Paged](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery/Paged.html)


  ` A page of query results.

  #### Declaration

  Swift

      struct Paged<T> where T : Sendable

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/HistoryQuery.html.Paged : Sendable, SendableMetatype