IncomingRelationship Class

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

public final class IncomingRelationship

Defines an incoming relationship on a digital twin. Unlike outgoing relationships, incoming relationships have no user-defined properties when retrieved using com.azure.digitaltwins.core.DigitalTwinsClient#listIncomingRelationships(String, Context) or listIncomingRelationships(String digitalTwinId). 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 Summary

Constructor Description
IncomingRelationship(String relationshipId, String sourceDigitalTwinId, String relationshipName, String relationshipLink)

Construct a new IncomingRelationship instance.

Method Summary

Modifier and Type Method and Description
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.

String getRelationshipLink()

Get the relationshipLink property: Link to the relationship, to be used for deletion.

String getRelationshipName()

Get the relationshipName property: The name of the relationship.

String getSourceId()

Get the sourceId property: The id of the source digital twin.

Methods inherited from java.lang.Object

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.

getRelationshipLink

public String getRelationshipLink()

Get the relationshipLink property: Link to the relationship, to be used for deletion.

Returns:

the relationshipLink value.

getRelationshipName

public String getRelationshipName()

Get the relationshipName property: The name of the relationship.

Returns:

the relationshipName value.

getSourceId

public String getSourceId()

Get the sourceId property: The id of the source digital twin.

Returns:

the sourceId value.

Applies to