/// <summary> /// Adds a relationship between two digital twins. /// Status codes: /// 200 (OK): Success. /// 400 (Bad Request): The request is invalid. /// 404 (Not Found): There is either no digital twin, target digital twin, or /// relationship with the provided id. /// 409 (Conflict): A relationship with the provided id already exists. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The id of the digital twin. The id is unique within the service and case /// sensitive. /// </param> /// <param name='relationshipId'> /// The id of the relationship. The id is unique within the digital twin and /// case sensitive. /// </param> /// <param name='relationship'> /// The data for the relationship. /// </param> /// <param name='ifNoneMatch'> /// Only perform the operation if the entity does not already exist. Possible /// values include: '*' /// </param> public static object AddRelationship(this IDigitalTwinsOperations operations, string id, string relationshipId, object relationship = default(object), string ifNoneMatch = default(string)) { return(operations.AddRelationshipAsync(id, relationshipId, relationship, ifNoneMatch).GetAwaiter().GetResult()); }