Class: Google::Apis::HomegraphV1::QueryResponsePayload
- Inherits:
-
Object
- Object
- Google::Apis::HomegraphV1::QueryResponsePayload
- 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
-
#device_metadata ⇒ Hash<String,Google::Apis::HomegraphV1::DeviceMetadata>
Map from the Trait ID (e.g., "action.devices.traits.OnOff") to its last Spanner commit timestamp.
-
#devices ⇒ Hash<String,Hash<String,Object>>
States of the devices.
-
#home_trait_payload ⇒ Hash<String,Google::Apis::HomegraphV1::HomeTraitPayload>
Map of device IDs to their Unified Device Data Model (UDDM) trait payloads.
Instance Method Summary collapse
-
#initialize(**args) ⇒ QueryResponsePayload
constructor
A new instance of QueryResponsePayload.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ QueryResponsePayload
Returns a new instance of QueryResponsePayload.
611 612 613 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 611 def initialize(**args) update!(**args) end |
Instance Attribute Details
#device_metadata ⇒ Hash<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
597 598 599 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 597 def @device_metadata end |
#devices ⇒ Hash<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
602 603 604 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 602 def devices @devices end |
#home_trait_payload ⇒ Hash<String,Google::Apis::HomegraphV1::HomeTraitPayload>
Map of device IDs to their Unified Device Data Model (UDDM) trait payloads.
This field is populated when device_view is set to HOME_TRAIT_ONLY or
HOME_TRAIT_AND_SMART_HOME_TRAIT.
Corresponds to the JSON property homeTraitPayload
609 610 611 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 609 def home_trait_payload @home_trait_payload end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
616 617 618 619 620 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 616 def update!(**args) @device_metadata = args[:device_metadata] if args.key?(:device_metadata) @devices = args[:devices] if args.key?(:devices) @home_trait_payload = args[:home_trait_payload] if args.key?(:home_trait_payload) end |