Package com.azure.digitaltwins.core
Class BasicDigitalTwinComponent
java.lang.Object
com.azure.digitaltwins.core.BasicDigitalTwinComponent
Properties on a component that adhere to a specific model.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddMetadata
(String key, DigitalTwinPropertyMetadata metadata) Adds property metadata.addToContents
(String key, Object value) Adds additional custom property to the component's contents.Gets the custom contentsGets the date and time when the twin was last updated.Gets the metadata about the model.
-
Constructor Details
-
BasicDigitalTwinComponent
public BasicDigitalTwinComponent()
-
-
Method Details
-
getMetadata
Gets the metadata about the model.- Returns:
- The component metadata.
-
addMetadata
Adds property metadata.- Parameters:
key
- The key that maps to the property metadatametadata
- Property metadata.- Returns:
- The BasicDigitalTwinComponent object itself.
-
getLastUpdatedOn
Gets the date and time when the twin was last updated.- Returns:
- The date and time the twin was last updated.
-
getContents
Gets the custom contents- Returns:
- The custom contents
-
addToContents
Adds additional custom property to the component's contents.- Parameters:
key
- The key of the additional property to be added to the component's contents.value
- The value of the additional property to be added to the component's contents.- Returns:
- The BasicDigitalTwinComponent object itself.
-