public class DeviceData extends Object
DeviceData defines the device model.
The device model describes the metadata and management characteristics of a device. The device database in the Watson IoT Platform is the master source of device information. Applications and managed devices are able to send updates to the database such as a location or the progress of a firmware update. Once these updates are received by the Watson IoT Platform, the device database is updated, making the information available to applications.
| Modifier and Type | Class and Description |
|---|---|
static class |
DeviceData.Builder
A builder class that helps to construct the DeviceData object.
|
| Modifier and Type | Method and Description |
|---|---|
CustomAction |
getCustomAction()
Returns the custom action object
|
DeviceAction |
getDeviceAction()
Returns the device action object
|
DeviceFirmware |
getDeviceFirmware()
Returns the DeviceFirmware object
|
String |
getDeviceId()
Returns the Device ID
|
DeviceInfo |
getDeviceInfo()
Returns the DeviceInfo object
|
DeviceLocation |
getDeviceLocation()
Return the DeviceLocation object
|
DeviceMetadata |
getMetadata()
Returns the metadata
|
Resource |
getResource(String name)
Returns the Resource for the given name
|
String |
getTypeId()
Returns the Device type
|
void |
setDeviceId(String deviceId)
Set Device-ID
|
void |
setLocation(DeviceLocation location) |
void |
setTypeId(String typeId)
Set the Device-Type
|
public String getTypeId()
public String getDeviceId()
public DeviceInfo getDeviceInfo()
public DeviceLocation getDeviceLocation()
public DeviceFirmware getDeviceFirmware()
public DeviceAction getDeviceAction()
public CustomAction getCustomAction()
public void setTypeId(String typeId)
typeId - Device Type to be setpublic void setDeviceId(String deviceId)
deviceId - DeviceID to be setpublic Resource getResource(String name)
name - - the name of the resource to be returnedpublic DeviceMetadata getMetadata()
public void setLocation(DeviceLocation location)
Copyright © 2019. All rights reserved.