Class: Google::Apis::HomegraphV1::Device

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

Third-party device definition. Next ID = 14

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Device

Returns a new instance of Device.



150
151
152
# File 'lib/google/apis/homegraph_v1/classes.rb', line 150

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

Instance Attribute Details

#attributesHash<String,Object>

Attributes for the traits supported by the device. Corresponds to the JSON property attributes

Returns:

  • (Hash<String,Object>)


76
77
78
# File 'lib/google/apis/homegraph_v1/classes.rb', line 76

def attributes
  @attributes
end

#custom_dataHash<String,Object>

Custom device attributes stored in Home Graph and provided to your smart home Action in each QUERY and EXECUTE intent. Data in this object has a few constraints: No sensitive information, including but not limited to Personally Identifiable Information. Corresponds to the JSON property customData

Returns:

  • (Hash<String,Object>)


86
87
88
# File 'lib/google/apis/homegraph_v1/classes.rb', line 86

def custom_data
  @custom_data
end

#device_infoGoogle::Apis::HomegraphV1::DeviceInfo

Device information. Corresponds to the JSON property deviceInfo



91
92
93
# File 'lib/google/apis/homegraph_v1/classes.rb', line 91

def device_info
  @device_info
end

#idString

Third-party device ID. Corresponds to the JSON property id

Returns:

  • (String)


96
97
98
# File 'lib/google/apis/homegraph_v1/classes.rb', line 96

def id
  @id
end

#nameGoogle::Apis::HomegraphV1::DeviceNames

Identifiers used to describe the device. Corresponds to the JSON property name



101
102
103
# File 'lib/google/apis/homegraph_v1/classes.rb', line 101

def name
  @name
end

#notification_supported_by_agentBoolean 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

Returns:

  • (Boolean)


109
110
111
# File 'lib/google/apis/homegraph_v1/classes.rb', line 109

def notification_supported_by_agent
  @notification_supported_by_agent
end

#other_device_idsArray<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



117
118
119
# File 'lib/google/apis/homegraph_v1/classes.rb', line 117

def other_device_ids
  @other_device_ids
end

#room_hintString

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

Returns:

  • (String)


123
124
125
# File 'lib/google/apis/homegraph_v1/classes.rb', line 123

def room_hint
  @room_hint
end

#structure_hintString

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

Returns:

  • (String)


129
130
131
# File 'lib/google/apis/homegraph_v1/classes.rb', line 129

def structure_hint
  @structure_hint
end

#traitsArray<String>

Traits supported by the device. See device traits. Corresponds to the JSON property traits

Returns:

  • (Array<String>)


135
136
137
# File 'lib/google/apis/homegraph_v1/classes.rb', line 135

def traits
  @traits
end

#typeString

Hardware type of the device. See device types. Corresponds to the JSON property type

Returns:

  • (String)


141
142
143
# File 'lib/google/apis/homegraph_v1/classes.rb', line 141

def type
  @type
end

#will_report_stateBoolean 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

Returns:

  • (Boolean)


147
148
149
# File 'lib/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 'lib/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