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 device definition.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash<String,Object>
Attributes for the traits supported by the device.
- #custom_data ⇒ Hash<String,Object>
-
#device_info ⇒ Google::Apis::HomegraphV1::DeviceInfo
Device information.
-
#id ⇒ String
Third-party device ID.
-
#name ⇒ Google::Apis::HomegraphV1::DeviceNames
Identifiers used to describe the device.
-
#notification_supported_by_agent ⇒ Boolean
(also: #notification_supported_by_agent?)
Indicates whether your smart home Action will report notifications to Google for this device via ReportStateAndNotification.
-
#other_device_ids ⇒ Array<Google::Apis::HomegraphV1::AgentOtherDeviceId>
Alternate IDs associated with this device.
-
#room_hint ⇒ String
Suggested name for the room where this device is installed.
-
#structure_hint ⇒ String
Suggested name for the structure where this device is installed.
-
#traits ⇒ Array<String>
Traits supported by the device.
-
#type ⇒ String
Hardware type of the device.
-
#will_report_state ⇒ Boolean
(also: #will_report_state?)
Indicates whether your smart home Action will report state of this device to Google via ReportStateAndNotification.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Device
constructor
A new instance of Device.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Device
Returns a new instance of Device.
148 149 150 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 148 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>
84 85 86 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 84 def custom_data @custom_data end |
#device_info ⇒ Google::Apis::HomegraphV1::DeviceInfo
Device information.
Corresponds to the JSON property deviceInfo
89 90 91 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 89 def device_info @device_info end |
#id ⇒ String
Third-party device ID.
Corresponds to the JSON property id
94 95 96 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 94 def id @id end |
#name ⇒ Google::Apis::HomegraphV1::DeviceNames
Identifiers used to describe the device.
Corresponds to the JSON property name
99 100 101 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 99 def name @name end |
#notification_supported_by_agent ⇒ Boolean Also known as: notification_supported_by_agent?
Indicates whether your smart home Action will report notifications to Google
for this device via ReportStateAndNotification. If your smart home Action
enables users to control device notifications, you should update this field
and call RequestSyncDevices.
Corresponds to the JSON property notificationSupportedByAgent
107 108 109 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 107 def notification_supported_by_agent @notification_supported_by_agent end |
#other_device_ids ⇒ Array<Google::Apis::HomegraphV1::AgentOtherDeviceId>
Alternate IDs associated with this device. This is used to identify cloud
synced devices enabled for local fulfillment.
Corresponds to the JSON property otherDeviceIds
115 116 117 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 115 def other_device_ids @other_device_ids end |
#room_hint ⇒ String
Suggested name for the room where this device is installed. Google attempts to
use this value during user setup.
Corresponds to the JSON property roomHint
121 122 123 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 121 def room_hint @room_hint end |
#structure_hint ⇒ String
Suggested name for the structure where this device is installed. Google
attempts to use this value during user setup.
Corresponds to the JSON property structureHint
127 128 129 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 127 def structure_hint @structure_hint end |
#traits ⇒ Array<String>
Traits supported by the device. See device traits.
Corresponds to the JSON property traits
133 134 135 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 133 def traits @traits end |
#type ⇒ String
Hardware type of the device. See device types.
Corresponds to the JSON property type
139 140 141 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 139 def type @type end |
#will_report_state ⇒ Boolean Also known as: will_report_state?
Indicates whether your smart home Action will report state of this device to
Google via ReportStateAndNotification.
Corresponds to the JSON property willReportState
145 146 147 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 145 def will_report_state @will_report_state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'generated/google/apis/homegraph_v1/classes.rb', line 153 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 |