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 ⇒ Hash<String,Object>
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.
-
#notification_supported_by_agent ⇒ Boolean
(also: #notification_supported_by_agent?)
Indicates whether the device is capable of sending notifications.
-
#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.
150 151 152 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 150 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 ⇒ Hash<String,Object>
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 |
#notification_supported_by_agent ⇒ Boolean Also known as: notification_supported_by_agent?
Indicates whether the device is capable of sending notifications. This
field will be set by the agent (partner) on an incoming SYNC. If a device
is not capable of generating notifications, the partner should set this
flag to false. If a partner is not capable of calling
ReportStateAndNotification to send notifications to Google, the partner
should set this flag to false. If there is a user setting in the partner
app to enable notifications and it is turned off, the partner should set
this flag to false.
Corresponds to the JSON property notificationSupportedByAgent
109 110 111 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 109 def notification_supported_by_agent @notification_supported_by_agent 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
120 121 122 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 120 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
126 127 128 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 126 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
131 132 133 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 131 def structure_hint @structure_hint end |
#traits ⇒ Array<String>
Traits supported by the device.
Corresponds to the JSON property traits
136 137 138 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 136 def traits @traits end |
#type ⇒ String
Hardware type of the device (e.g. light, outlet, etc).
Corresponds to the JSON property type
141 142 143 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 141 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
147 148 149 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 147 def will_report_state @will_report_state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 155 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) @notification_supported_by_agent = args[:notification_supported_by_agent] if args.key?(:notification_supported_by_agent) @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 |