public final class Device
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the HomeGraph API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Device() |
| Modifier and Type | Method and Description |
|---|---|
Device |
clone() |
Map<String,Object> |
getAttributes()
Attributes for the traits supported by the device.
|
Map<String,Object> |
getCustomData()
Custom device attributes stored in Home Graph and provided to your smart home Action in each
[QUERY](https://developers.home.google.com/cloud-to-cloud/intents/query) and
[EXECUTE](https://developers.home.google.com/cloud-to-cloud/intents/execute) intent.
|
DeviceInfo |
getDeviceInfo()
Device manufacturer, model, hardware version, and software version.
|
String |
getId()
Third-party device ID.
|
DeviceNames |
getName()
Names given to this device by your smart home Action.
|
Boolean |
getNotificationSupportedByAgent()
Indicates whether your smart home Action will report notifications to Google for this device
via ReportStateAndNotification.
|
List<AgentOtherDeviceId> |
getOtherDeviceIds()
Alternate IDs associated with this device.
|
String |
getRoomHint()
Suggested name for the room where this device is installed.
|
String |
getStructureHint()
Suggested name for the structure where this device is installed.
|
List<String> |
getTraits()
Traits supported by the device.
|
String |
getType()
Hardware type of the device.
|
Boolean |
getWillReportState()
Indicates whether your smart home Action will report state of this device to Google via
ReportStateAndNotification.
|
Device |
set(String fieldName,
Object value) |
Device |
setAttributes(Map<String,Object> attributes)
Attributes for the traits supported by the device.
|
Device |
setCustomData(Map<String,Object> customData)
Custom device attributes stored in Home Graph and provided to your smart home Action in each
[QUERY](https://developers.home.google.com/cloud-to-cloud/intents/query) and
[EXECUTE](https://developers.home.google.com/cloud-to-cloud/intents/execute) intent.
|
Device |
setDeviceInfo(DeviceInfo deviceInfo)
Device manufacturer, model, hardware version, and software version.
|
Device |
setId(String id)
Third-party device ID.
|
Device |
setName(DeviceNames name)
Names given to this device by your smart home Action.
|
Device |
setNotificationSupportedByAgent(Boolean notificationSupportedByAgent)
Indicates whether your smart home Action will report notifications to Google for this device
via ReportStateAndNotification.
|
Device |
setOtherDeviceIds(List<AgentOtherDeviceId> otherDeviceIds)
Alternate IDs associated with this device.
|
Device |
setRoomHint(String roomHint)
Suggested name for the room where this device is installed.
|
Device |
setStructureHint(String structureHint)
Suggested name for the structure where this device is installed.
|
Device |
setTraits(List<String> traits)
Traits supported by the device.
|
Device |
setType(String type)
Hardware type of the device.
|
Device |
setWillReportState(Boolean willReportState)
Indicates whether your smart home Action will report state of this device to Google via
ReportStateAndNotification.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Map<String,Object> getAttributes()
null for nonepublic Device setAttributes(Map<String,Object> attributes)
attributes - attributes or null for nonepublic Map<String,Object> getCustomData()
null for nonepublic Device setCustomData(Map<String,Object> customData)
customData - customData or null for nonepublic DeviceInfo getDeviceInfo()
null for nonepublic Device setDeviceInfo(DeviceInfo deviceInfo)
deviceInfo - deviceInfo or null for nonepublic String getId()
null for nonepublic DeviceNames getName()
null for nonepublic Device setName(DeviceNames name)
name - name or null for nonepublic Boolean getNotificationSupportedByAgent()
null for nonepublic Device setNotificationSupportedByAgent(Boolean notificationSupportedByAgent)
notificationSupportedByAgent - notificationSupportedByAgent or null for nonepublic List<AgentOtherDeviceId> getOtherDeviceIds()
null for nonepublic Device setOtherDeviceIds(List<AgentOtherDeviceId> otherDeviceIds)
otherDeviceIds - otherDeviceIds or null for nonepublic String getRoomHint()
null for nonepublic Device setRoomHint(String roomHint)
roomHint - roomHint or null for nonepublic String getStructureHint()
null for nonepublic Device setStructureHint(String structureHint)
structureHint - structureHint or null for nonepublic List<String> getTraits()
null for nonepublic Device setTraits(List<String> traits)
traits - traits or null for nonepublic String getType()
null for nonepublic Device setType(String type)
type - type or null for nonepublic Boolean getWillReportState()
null for nonepublic Device setWillReportState(Boolean willReportState)
willReportState - willReportState or null for nonepublic Device set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic Device clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.