ReportStateAndNotificationRequest class
Request type for the
[ReportStateAndNotification](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification)
call.
It may include states, notifications, home_traits, home_events, or any
combination thereof. Smart Home Device Traits (SHDT) states and
notifications are defined per device_id (for example, "123" and "456" in
the following example). Google Home Traits home_traits and home_events
are lists of updates or events, each associated with a device_id (for
example, "789" in the following example). Example: json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "agentUserId": "1234", "payload": { "devices": { "states": { "123": { "on": true }, "456": { "on": true, "brightness": 10 }, }, "homeTraits": [ { "deviceId": "789", "components": [ { "componentId": "main", "traitData": [ { "trait": { "@type": "type.googleapis.com/home.graph.v1.OnOffTrait", "onOff": true } } ] } ] } ], "homeEvents": [ { "deviceId": "789", "events": [ { "componentId": "main", "events": [ { "eventId": "event-123", "eventTime": "2026-01-01T00:00:00Z", "event": { "@type": "type.googleapis.com/home.graph.v1.DoorbellPressTrait.DoorbellPressedEvent" } } ] } ] } ] } } }
Constructors
- ReportStateAndNotificationRequest({String? agentUserId, String? eventId, String? followUpToken, StateAndNotificationPayload? payload, String? requestId})
- ReportStateAndNotificationRequest.fromJson(Map json_)
Properties
- agentUserId ↔ String?
-
Third-party user ID.
getter/setter pair
- eventId ↔ String?
-
Unique identifier per event (for example, a doorbell press).
getter/setter pair
- followUpToken ↔ String?
-
Deprecated.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- payload ↔ StateAndNotificationPayload?
-
State of devices to update and notification metadata for devices.
getter/setter pair
- requestId ↔ String?
-
Request ID used for debugging.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited