Class: Google::Apis::HomegraphV1::QueryResponse

Inherits:
Object
  • Object
show all
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

Response type for the Query call. This should follow the same format as the Actions on Google action.devices.QUERY response.

Example

`
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": `
"devices": `
"123": `
"on": true,
"online": true
`,
"456": `
"on": true,
"online": true,
"brightness": 80,
"color": `
"name": "cerulean",
"spectrumRGB": 31655
`
`
`
`
`

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ QueryResponse

Returns a new instance of QueryResponse.



374
375
376
# File 'generated/google/apis/homegraph_v1/classes.rb', line 374

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#payloadGoogle::Apis::HomegraphV1::QueryResponsePayload

Payload containing device states information. Corresponds to the JSON property payload



367
368
369
# File 'generated/google/apis/homegraph_v1/classes.rb', line 367

def payload
  @payload
end

#request_idString

Request ID used for debugging. Copied from the request. Corresponds to the JSON property requestId

Returns:

  • (String)


372
373
374
# File 'generated/google/apis/homegraph_v1/classes.rb', line 372

def request_id
  @request_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



379
380
381
382
# File 'generated/google/apis/homegraph_v1/classes.rb', line 379

def update!(**args)
  @payload = args[:payload] if args.key?(:payload)
  @request_id = args[:request_id] if args.key?(:request_id)
end