Class IncomingRelationship

java.lang.Object
com.azure.digitaltwins.core.models.IncomingRelationship

public final class IncomingRelationship extends Object
Defines an incoming relationship on a digital twin. Unlike outgoing relationships, incoming relationships have no user-defined properties when retrieved using DigitalTwinsClient.listIncomingRelationships(String, Context) or DigitalTwinsAsyncClient.listIncomingRelationships(String). Because of this, there is no need for user-defined types for deserialization. This class will capture the full service response when listing incoming relationships.
  • Constructor Details

    • IncomingRelationship

      public IncomingRelationship(String relationshipId, String sourceDigitalTwinId, String relationshipName, String relationshipLink)
      Construct a new IncomingRelationship instance. This class should only be constructed internally since the service never takes this as an input.
      Parameters:
      relationshipId - The Id of this incoming relationship.
      sourceDigitalTwinId - The Id of the digital twin that this relationship comes from.
      relationshipName - The name of the relationship, for instance "Contains" or "IsAdjacentTo".
      relationshipLink - The link to the relationship, to be used for deletion.
  • Method Details

    • getRelationshipId

      public String getRelationshipId()
      Get the relationshipId property: A user-provided string representing the id of this relationship, unique in the context of the source digital twin, i.e. sourceId + relationshipId is unique in the context of the service.
      Returns:
      the relationshipId value.
    • getSourceId

      public String getSourceId()
      Get the sourceId property: The id of the source digital twin.
      Returns:
      the sourceId value.
    • getRelationshipName

      public String getRelationshipName()
      Get the relationshipName property: The name of the relationship.
      Returns:
      the relationshipName value.
    • getRelationshipLink

      public String getRelationshipLink()
      Get the relationshipLink property: Link to the relationship, to be used for deletion.
      Returns:
      the relationshipLink value.