Class BasicDigitalTwinMetadata

java.lang.Object
com.azure.digitaltwins.core.BasicDigitalTwinMetadata

public final class BasicDigitalTwinMetadata extends Object
An optional, helper class for deserializing a digital twin. The $metadata class on a BasicDigitalTwin. Only properties with non-null values are included.
  • Constructor Details

    • BasicDigitalTwinMetadata

      public BasicDigitalTwinMetadata()
      Creates an instance of digital twin metadata.
  • Method Details

    • getModelId

      public String 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

      public BasicDigitalTwinMetadata setModelId(String modelId)
      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

      public Map<String,DigitalTwinPropertyMetadata> getPropertyMetadata()
      Gets the metadata about changes on properties on a component. The values can be deserialized into DigitalTwinPropertyMetadata
      Returns:
      The metadata about changes on properties on a component.
    • addPropertyMetadata

      public BasicDigitalTwinMetadata addPropertyMetadata(String key, DigitalTwinPropertyMetadata value)
      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.