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.
|
DeviceTwinDevice(String deviceId,
String moduleId)
Constructor to create instance for a module.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearDesiredProperties()
Clear desired properties set so far
|
void |
clearTags()
Clear tags set so far
|
void |
clearTwin()
Clear tags and desired properties set so far
|
String |
desiredPropertiesToString()
String representation for this device containing desired properties
|
com.microsoft.azure.sdk.iot.deps.twin.DeviceCapabilities |
getCapabilities()
Getter for capabilities
|
Map<String,com.microsoft.azure.sdk.iot.deps.twin.ConfigurationInfo> |
getConfigurations()
Getter for the configuration properties
|
protected com.microsoft.azure.sdk.iot.deps.twin.TwinCollection |
getDesiredMap()
Getter for the desired properties
|
Set<Pair> |
getDesiredProperties()
Getter to get Desired Properties set
|
Integer |
getDesiredPropertiesVersion()
Getter for the desired properties version.
|
String |
getDeviceId()
Getter to get device ID
|
String |
getETag()
Getter for the eTag
|
String |
getModuleId()
Getter to get module ID
|
protected com.microsoft.azure.sdk.iot.deps.twin.TwinCollection |
getReportedMap()
Getter for the reported properties
|
Set<Pair> |
getReportedProperties()
Getter to get Reported Properties Set
|
Integer |
getReportedPropertiesVersion()
Getter for the reported properties version.
|
Set<Pair> |
getTags()
Getter to get Tags Set
|
protected com.microsoft.azure.sdk.iot.deps.twin.TwinCollection |
getTagsMap()
Getter for the tags
|
Integer |
getTagsVersion()
Getter for the tag version.
|
Integer |
getVersion()
Getter for the Twin version
|
String |
reportedPropertiesToString()
String representation for this device containing reported properties
|
protected void |
setCapabilities(com.microsoft.azure.sdk.iot.deps.twin.DeviceCapabilities capabilities)
Setter for capabilities
|
protected void |
setConfigurations(Map<String,com.microsoft.azure.sdk.iot.deps.twin.ConfigurationInfo> configurations)
Setter for the configuration properties
|
void |
setDesiredProperties(Set<Pair> desiredProperties)
Setter for the desired properties
|
protected void |
setDesiredProperties(com.microsoft.azure.sdk.iot.deps.twin.TwinCollection desiredProperties)
Setter for the desired properties
|
void |
setETag(String eTag)
Setter for ETag
|
protected void |
setReportedProperties(com.microsoft.azure.sdk.iot.deps.twin.TwinCollection reportedProperties)
Setter for the reported properties
|
void |
setTags(Set<Pair> tags)
Setter for the tags
|
protected void |
setTags(com.microsoft.azure.sdk.iot.deps.twin.TwinCollection tag)
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 DeviceTwinDevice(String deviceId, String moduleId) throws IllegalArgumentException
deviceId - Device ID for the device which this module belongs tomoduleId - Module ID for this moduleIllegalArgumentException - This exception is thrown if the device id is null or emptypublic String getDeviceId()
public String getModuleId()
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 Integer getTagsVersion()
Integer with the Tags Collection version.IllegalArgumentException - if the tags is null.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 Integer getDesiredPropertiesVersion()
Integer with the Desired properties Collection version.IllegalArgumentException - if the desired properties is null.public void clearTwin()
public Set<Pair> getReportedProperties()
public Integer getReportedPropertiesVersion()
Integer with the Desired properties Collection version.IllegalArgumentException - if the reported properties is null.protected void setReportedProperties(com.microsoft.azure.sdk.iot.deps.twin.TwinCollection reportedProperties)
reportedProperties - A map of validated key and value pairs for reported propertiesprotected void setDesiredProperties(com.microsoft.azure.sdk.iot.deps.twin.TwinCollection desiredProperties)
desiredProperties - A map of validated key and value pairs for desired propertiesprotected void setTags(com.microsoft.azure.sdk.iot.deps.twin.TwinCollection tag)
tag - A map of validated key and value pairs for tagprotected com.microsoft.azure.sdk.iot.deps.twin.TwinCollection getTagsMap()
protected com.microsoft.azure.sdk.iot.deps.twin.TwinCollection getDesiredMap()
protected com.microsoft.azure.sdk.iot.deps.twin.TwinCollection getReportedMap()
protected void setConfigurations(Map<String,com.microsoft.azure.sdk.iot.deps.twin.ConfigurationInfo> configurations)
configurations - is the configuration properties.public Map<String,com.microsoft.azure.sdk.iot.deps.twin.ConfigurationInfo> getConfigurations()
null.protected void setCapabilities(com.microsoft.azure.sdk.iot.deps.twin.DeviceCapabilities capabilities)
capabilities - is the value of the capabilitiespublic com.microsoft.azure.sdk.iot.deps.twin.DeviceCapabilities getCapabilities()
null.public String toString()
public String tagsToString()
public String desiredPropertiesToString()
public String reportedPropertiesToString()
Copyright © 2018. All rights reserved.