Class: Google::Apis::HomegraphV1::ReportStateAndNotificationRequest
- Inherits:
-
Object
- Object
- Google::Apis::HomegraphV1::ReportStateAndNotificationRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/homegraph_v1/classes.rb,
generated/google/apis/homegraph_v1/representations.rb,
generated/google/apis/homegraph_v1/representations.rb
Overview
Request type for the
ReportStateAndNotification
call. It may include States, Notifications, or both. This request uses
globally unique flattened state names instead of namespaces based on traits
to align with the existing QUERY and EXECUTE APIs implemented by 90+ Smart
Home partners. States and notifications are defined per device_id
(for
example, "123"
and "456" in the following example). # Example
`
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"agentUserId": "1234",
"payload": `
"devices": `
"states": `
"123": `
"on": true
`,
"456": `
"on": true,
"brightness": 10
`
`,
`
`
`
Instance Attribute Summary collapse
-
#agent_user_id ⇒ String
Required.
-
#event_id ⇒ String
Unique identifier per event (for example, a doorbell press).
-
#follow_up_token ⇒ String
Token to maintain state in the follow up notification response.
-
#payload ⇒ Google::Apis::HomegraphV1::StateAndNotificationPayload
Payload containing the state and notification information for devices.
-
#request_id ⇒ String
Request ID used for debugging.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReportStateAndNotificationRequest
constructor
A new instance of ReportStateAndNotificationRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ReportStateAndNotificationRequest
Returns a new instance of ReportStateAndNotificationRequest.
486 487 488 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 486 def initialize(**args) update!(**args) end |
Instance Attribute Details
#agent_user_id ⇒ String
Required. Third-party user ID.
Corresponds to the JSON property agentUserId
464 465 466 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 464 def agent_user_id @agent_user_id end |
#event_id ⇒ String
Unique identifier per event (for example, a doorbell press).
Corresponds to the JSON property eventId
469 470 471 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 469 def event_id @event_id end |
#follow_up_token ⇒ String
Token to maintain state in the follow up notification response.
Corresponds to the JSON property followUpToken
474 475 476 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 474 def follow_up_token @follow_up_token end |
#payload ⇒ Google::Apis::HomegraphV1::StateAndNotificationPayload
Payload containing the state and notification information for devices.
Corresponds to the JSON property payload
479 480 481 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 479 def payload @payload end |
#request_id ⇒ String
Request ID used for debugging.
Corresponds to the JSON property requestId
484 485 486 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 484 def request_id @request_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
491 492 493 494 495 496 497 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 491 def update!(**args) @agent_user_id = args[:agent_user_id] if args.key?(:agent_user_id) @event_id = args[:event_id] if args.key?(:event_id) @follow_up_token = args[:follow_up_token] if args.key?(:follow_up_token) @payload = args[:payload] if args.key?(:payload) @request_id = args[:request_id] if args.key?(:request_id) end |