Class: Google::Apis::HomegraphV1::Device
- Inherits:
-
Object
- Object
- Google::Apis::HomegraphV1::Device
- 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
Third-party partner's device definition.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash<String,Object>
Attributes for the traits supported by the device.
-
#custom_data ⇒ String
Custom JSON data provided by the manufacturer and attached to QUERY and EXECUTE requests in AoG.
-
#device_info ⇒ Google::Apis::HomegraphV1::DeviceInfo
Device information.
-
#id ⇒ String
Third-party partner's device ID.
-
#name ⇒ Google::Apis::HomegraphV1::DeviceNames
Different names for the device.
-
#other_device_ids ⇒ Array<Google::Apis::HomegraphV1::AgentOtherDeviceId>
IDs of other devices associated with this device.
-
#room_hint ⇒ String
If the third-party partner's cloud configuration includes placing devices in rooms, the name of the room can be provided here.
-
#structure_hint ⇒ String
As in roomHint, for structures that users set up in the partner's system.
-
#traits ⇒ Array<String>
Traits supported by the device.
-
#type ⇒ String
Hardware type of the device (e.g. light, outlet, etc).
-
#will_report_state ⇒ Boolean
(also: #will_report_state?)
Indicates whether the state of this device is being reported to Google through ReportStateAndNotification call.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Device
constructor
A new instance of Device.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Device
Returns a new instance of Device
137 138 139 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 137 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Hash<String,Object>
Attributes for the traits supported by the device.
Corresponds to the JSON property attributes
76 77 78 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 76 def attributes @attributes end |
#custom_data ⇒ String
Custom JSON data provided by the manufacturer and attached to QUERY and
EXECUTE requests in AoG.
Corresponds to the JSON property customData
82 83 84 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 82 def custom_data @custom_data end |
#device_info ⇒ Google::Apis::HomegraphV1::DeviceInfo
Device information.
Corresponds to the JSON property deviceInfo
87 88 89 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 87 def device_info @device_info end |
#id ⇒ String
Third-party partner's device ID.
Corresponds to the JSON property id
92 93 94 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 92 def id @id end |
#name ⇒ Google::Apis::HomegraphV1::DeviceNames
Different names for the device.
Corresponds to the JSON property name
97 98 99 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 97 def name @name end |
#other_device_ids ⇒ Array<Google::Apis::HomegraphV1::AgentOtherDeviceId>
IDs of other devices associated with this device. This is used to
represent a device group (e.g. bonded zone) or "facets" synced
through different flows (e.g. Google Nest Hub Max with a Nest Camera).
This may also be used to pass in alternate IDs used to identify a cloud
synced device for local execution (i.e. local verification). If used for
local verification, this field is synced from the cloud.
Corresponds to the JSON property otherDeviceIds
107 108 109 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 107 def other_device_ids @other_device_ids end |
#room_hint ⇒ String
If the third-party partner's cloud configuration includes placing devices
in rooms, the name of the room can be provided here.
Corresponds to the JSON property roomHint
113 114 115 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 113 def room_hint @room_hint end |
#structure_hint ⇒ String
As in roomHint, for structures that users set up in the partner's system.
Corresponds to the JSON property structureHint
118 119 120 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 118 def structure_hint @structure_hint end |
#traits ⇒ Array<String>
Traits supported by the device.
Corresponds to the JSON property traits
123 124 125 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 123 def traits @traits end |
#type ⇒ String
Hardware type of the device (e.g. light, outlet, etc).
Corresponds to the JSON property type
128 129 130 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 128 def type @type end |
#will_report_state ⇒ Boolean Also known as: will_report_state?
Indicates whether the state of this device is being reported to Google
through ReportStateAndNotification call.
Corresponds to the JSON property willReportState
134 135 136 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 134 def will_report_state @will_report_state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 142 def update!(**args) @attributes = args[:attributes] if args.key?(:attributes) @custom_data = args[:custom_data] if args.key?(:custom_data) @device_info = args[:device_info] if args.key?(:device_info) @id = args[:id] if args.key?(:id) @name = args[:name] if args.key?(:name) @other_device_ids = args[:other_device_ids] if args.key?(:other_device_ids) @room_hint = args[:room_hint] if args.key?(:room_hint) @structure_hint = args[:structure_hint] if args.key?(:structure_hint) @traits = args[:traits] if args.key?(:traits) @type = args[:type] if args.key?(:type) @will_report_state = args[:will_report_state] if args.key?(:will_report_state) end |