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 Google smart home action.devices.QUERY response. # Example json ` "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

Constructor Details

#initialize(**args) ⇒ QueryResponse

Returns a new instance of QueryResponse.



346
347
348
# File 'generated/google/apis/homegraph_v1/classes.rb', line 346

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

Instance Attribute Details

#payloadGoogle::Apis::HomegraphV1::QueryResponsePayload

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



339
340
341
# File 'generated/google/apis/homegraph_v1/classes.rb', line 339

def payload
  @payload
end

#request_idString

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

Returns:

  • (String)


344
345
346
# File 'generated/google/apis/homegraph_v1/classes.rb', line 344

def request_id
  @request_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



351
352
353
354
# File 'generated/google/apis/homegraph_v1/classes.rb', line 351

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