DeviceTwinDevice Class
Definition
- java.lang.Object
- com.microsoft.azure.sdk.iot.service.devicetwin.DeviceTwinDevice
Represent the twin on IoT hub. Implementing constructors and serialization functionality.
The object is a representation of a module twin if and only if the moduleId is set.
public class DeviceTwinDevice
Constructors
| DeviceTwinDevice() |
Constructor to create an instance for a device. |
| DeviceTwinDevice(String deviceId) |
Constructor to create instance for a device. |
| DeviceTwinDevice(String deviceId, String moduleId) |
Constructor to create an instance for a module. |
Methods
| clearDesiredProperties() |
Clears the desired properties set so far. |
| clearTags() |
Clears the tags set so far. |
| clearTwin() |
Clear tags and desired properties set so far. |
| desiredPropertiesToString() |
String representation for this device containing desired properties. |
| getCapabilities() |
Getter for capabilities. |
| getConfigurations() |
Getter for configuration properties. |
| getConnectionState() | |
| getDesiredMap() |
Getter for desired properties. |
| getDesiredProperties() |
Getter to get the desired properties setter. |
| getDesiredPropertiesVersion() |
Getter for the desired properties version. |
| getDeviceId() |
Getter to get the device Id. |
| getDeviceScope() |
The scope of the device. Auto-generated and immutable for edge devices and modifiable in leaf devices to create child/parent relationship. For more information, see this document. |
| getETag() |
Getter for the ETag. |
| getModelId() |
Getter for a model Id. |
| getModuleId() |
Getter to get the module Id. |
| getParentScopes() |
The scopes of the upper level edge devices if applicable. Only available for edge devices. For more information, see this document. |
| getReportedMap() |
Getter for reported properties. |
| getReportedProperties() |
Getter to get reported properties setter. |
| getReportedPropertiesVersion() |
Getter for the reported properties version. |
| getTags() |
Getter for the twin tags. |
| getTagsMap() |
Getter for tags. |
| getTagsVersion() |
Getter for the tag version. |
| getVersion() |
Getter for the twin version. |
| reportedPropertiesToString() |
String representation for this device containing reported properties.' |
| setCapabilities(DeviceCapabilities capabilities) |
Setter for capabilities. |
| setConfigurations(Map<String,ConfigurationInfo> configurations) |
Setter for configuration properties. |
| setConnectionState(String connectionState) |
Sets the connection state of the device. |
| setDesiredProperties(TwinCollection desiredProperties) |
Setter for the desired properties. |
| setDesiredProperties(Set<Pair> desiredProperties) |
Setter for the desired properties. |
| setDeviceScope(String deviceScope) |
Sets the device scope. |
| setETag(String eTag) |
Setter for ETag. |
| setModelId(String modelId) |
Setter for a model Id |
| setParentScopes(List<String> parentScopes) |
Sets the parent scopes. |
| setReportedProperties(TwinCollection reportedProperties) |
Setter for the reported properties. |
| setTags(TwinCollection tag) |
Setter for tags. |
| setTags(Set<Pair> tags) |
Setter for twin tags. |
| tagsToString() |
String representation for this device containing tags. |
| toString() |
String representation for this device containing device Id, tags, desired and reported properties. |