Class BasicDigitalTwinComponent

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

public final class BasicDigitalTwinComponent extends Object
Properties on a component that adhere to a specific model.
  • Constructor Details

    • BasicDigitalTwinComponent

      public BasicDigitalTwinComponent()
  • Method Details

    • getMetadata

      public Map<String,DigitalTwinPropertyMetadata> getMetadata()
      Gets the metadata about the model.
      Returns:
      The component metadata.
    • addMetadata

      public BasicDigitalTwinComponent addMetadata(String key, DigitalTwinPropertyMetadata metadata)
      Adds property metadata.
      Parameters:
      key - The key that maps to the property metadata
      metadata - Property metadata.
      Returns:
      The BasicDigitalTwinComponent object itself.
    • getLastUpdatedOn

      public OffsetDateTime getLastUpdatedOn()
      Gets the date and time when the twin was last updated.
      Returns:
      The date and time the twin was last updated.
    • getContents

      public Map<String,Object> getContents()
      Gets the custom contents
      Returns:
      The custom contents
    • addToContents

      public BasicDigitalTwinComponent addToContents(String key, Object value)
      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.