public class DeviceTwinDevice extends Object
| Constructor and Description |
|---|
DeviceTwinDevice()
Constructor to create instance for a device
|
DeviceTwinDevice(String deviceId)
Constructor to create instance for a device
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearDesiredProperties()
Clear desired properties set so far
|
void |
clearTags() |
void |
clearTwin()
Clear tags and desired properties set so far
|
String |
desiredPropertiesToString()
String representation for this device containing desired properties
|
protected Map<String,Object> |
getDesiredMap()
Getter for the desired properties
|
Set<Pair> |
getDesiredProperties()
Getter to get Desired Properties set
|
String |
getDeviceId()
Getter to get device ID
|
String |
getETag()
Getter for the eTag
|
protected Map<String,Object> |
getReportedMap()
Getter for the reported properties
|
Set<Pair> |
getReportedProperties()
Getter to get Reported Properties Set
|
Set<Pair> |
getTags()
Getter to get Tags Set
|
protected Map<String,Object> |
getTagsMap()
Getter for the tags
|
protected com.microsoft.azure.sdk.iot.deps.serializer.TwinParser |
getTwinParser()
Getter for the twin serializer object for this device
|
Integer |
getVersion()
Getter for the Twin version
|
String |
reportedPropertiesToString()
String representation for this device containing reported properties
|
protected void |
setDesiredProperties(Map<String,Object> desiredProperties)
Setter for the desired properties
|
void |
setDesiredProperties(Set<Pair> desiredProperties)
Setter for the desired properties
|
void |
setETag(String eTag)
Setter for ETag
|
protected void |
setReportedProperties(Map<String,Object> reportedProperties)
Setter for the reported properties
|
protected void |
setTags(Map<String,Object> tag)
Setter for the tags
|
void |
setTags(Set<Pair> tags)
Setter for the tags
|
String |
tagsToString()
String representation for this device containing tags
|
String |
toString()
String representation for this device containing device id, tags, desired and reported properties
|
public DeviceTwinDevice()
public DeviceTwinDevice(String deviceId) throws IllegalArgumentException
deviceId - Device ID for this deviceIllegalArgumentException - This exception is thrown if the device id is null or emptypublic String getDeviceId()
public void setETag(String eTag) throws IllegalArgumentException
eTag - is the value of the etagIllegalArgumentException - if the provided etag is null or emptypublic String getETag()
null if not set.public Integer getVersion()
null.public void setTags(Set<Pair> tags) throws IllegalArgumentException
tags - A set of tag key-value pairsIllegalArgumentException - This exception is thrown if the set tags is nullpublic void clearTags()
public Set<Pair> getDesiredProperties()
public void setDesiredProperties(Set<Pair> desiredProperties) throws IllegalArgumentException
desiredProperties - A set of key-value pairs for desired propertiesIllegalArgumentException - This exception is thrown if the set is nullpublic void clearDesiredProperties()
public void clearTwin()
public Set<Pair> getReportedProperties()
protected void setReportedProperties(Map<String,Object> reportedProperties)
reportedProperties - A map of validated key and value pairs for reported propertiesprotected void setDesiredProperties(Map<String,Object> desiredProperties)
desiredProperties - A map of validated key and value pairs for desired propertiesprotected void setTags(Map<String,Object> tag)
tag - A map of validated key and value pairs for tagprotected Map<String,Object> getTagsMap()
protected Map<String,Object> getDesiredMap()
protected Map<String,Object> getReportedMap()
protected com.microsoft.azure.sdk.iot.deps.serializer.TwinParser getTwinParser()
public String toString()
public String tagsToString()
public String desiredPropertiesToString()
public String reportedPropertiesToString()
Copyright © 2017. All rights reserved.