Package com.azure.digitaltwins.core
Class BasicDigitalTwinMetadata
java.lang.Object
com.azure.digitaltwins.core.BasicDigitalTwinMetadata
An optional, helper class for deserializing a digital twin.
The $metadata class on a
BasicDigitalTwin
.
Only properties with non-null values are included.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPropertyMetadata
(String key, DigitalTwinPropertyMetadata value) Adds an additional custom property to the digital twin.Gets the Id of the model that the digital twin or component is modeled by.Gets the metadata about changes on properties on a component.setModelId
(String modelId) Sets the Id of the model that the digital twin or component is modeled by.
-
Constructor Details
-
BasicDigitalTwinMetadata
public BasicDigitalTwinMetadata()Creates an instance of digital twin metadata.
-
-
Method Details
-
getModelId
Gets the Id of the model that the digital twin or component is modeled by.- Returns:
- The Id of the model that the digital twin or component is modeled by.
-
setModelId
Sets the Id of the model that the digital twin or component is modeled by.- Parameters:
modelId
- The Id of the model that the digital twin or component is modeled by.- Returns:
- The BasicDigitalTwinMetadata object itself.
-
getPropertyMetadata
Gets the metadata about changes on properties on a component. The values can be deserialized intoDigitalTwinPropertyMetadata
- Returns:
- The metadata about changes on properties on a component.
-
addPropertyMetadata
Adds an additional custom property to the digital twin. This field will contain any property of the digital twin that is not already defined by the other strong types of this class.- Parameters:
key
- The key of the additional property to be added to the digital twin.value
- The value of the additional property to be added to the digital twin.- Returns:
- The BasicDigitalTwin object itself.
-