BasicDigitalTwinMetadata Class
- java.
lang. Object - com.
azure. digitaltwins. core. BasicDigitalTwinMetadata
- com.
Implements
public final class BasicDigitalTwinMetadata
implements JsonSerializable<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
| Constructor | Description |
|---|---|
| BasicDigitalTwinMetadata() |
Creates an instance of digital twin metadata. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Basic |
addPropertyMetadata(String key, DigitalTwinPropertyMetadata value)
Adds a custom property to the digital twin. |
|
static
Basic |
fromJson(JsonReader jsonReader)
Reads an instance of Basic |
| String |
getModelId()
Gets the ID of the model that the digital twin or component is modeled by. |
|
Map<String,Digital |
getPropertyMetadata()
Gets the metadata about changes on properties on a component. |
|
Basic |
setModelId(String modelId)
Sets the ID of the model that the digital twin or component is modeled by. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
BasicDigitalTwinMetadata
public BasicDigitalTwinMetadata()
Creates an instance of digital twin metadata.
Method Details
addPropertyMetadata
public BasicDigitalTwinMetadata addPropertyMetadata(String key, DigitalTwinPropertyMetadata value)
Adds a 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:
Returns:
fromJson
public static BasicDigitalTwinMetadata fromJson(JsonReader jsonReader)
Reads an instance of BasicDigitalTwinMetadata from the JsonReader.
Parameters:
Returns:
Throws:
getModelId
public String getModelId()
Gets the ID of the model that the digital twin or component is modeled by.
Returns:
getPropertyMetadata
public Map<String,DigitalTwinPropertyMetadata> getPropertyMetadata()
Gets the metadata about changes on properties on a component. The values can be deserialized into DigitalTwinPropertyMetadata
Returns:
setModelId
public BasicDigitalTwinMetadata setModelId(String modelId)
Sets the ID of the model that the digital twin or component is modeled by.
Parameters:
Returns: