Class: Google::Apis::HomegraphV1::QueryResponsePayload

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/homegraph_v1/classes.rb,
lib/google/apis/homegraph_v1/representations.rb,
lib/google/apis/homegraph_v1/representations.rb

Overview

Payload containing device states information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryResponsePayload

Returns a new instance of QueryResponsePayload.



536
537
538
# File 'lib/google/apis/homegraph_v1/classes.rb', line 536

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

Instance Attribute Details

#device_metadataHash<String,Google::Apis::HomegraphV1::DeviceMetadata>

Map from the Trait ID (e.g., "action.devices.traits.OnOff") to its last Spanner commit timestamp. If a trait has no recorded timestamp, it will be omitted from this map. Corresponds to the JSON property deviceMetadata



529
530
531
# File 'lib/google/apis/homegraph_v1/classes.rb', line 529

def 
  @device_metadata
end

#devicesHash<String,Hash<String,Object>>

States of the devices. Map of third-party device ID to struct of device states. Corresponds to the JSON property devices

Returns:

  • (Hash<String,Hash<String,Object>>)


534
535
536
# File 'lib/google/apis/homegraph_v1/classes.rb', line 534

def devices
  @devices
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



541
542
543
544
# File 'lib/google/apis/homegraph_v1/classes.rb', line 541

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