/// <summary> /// Initializes a new instance of the <see cref="CompleteRelationship" /> class. /// </summary> /// <param name="href">The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param> /// <param name="version">version.</param> /// <param name="relationshipDefinitionId">relationshipDefinitionId (required).</param> /// <param name="sourceEntity">sourceEntity (required).</param> /// <param name="targetEntity">targetEntity (required).</param> /// <param name="outwardDescription">Description of the relationship based on relationship definition's outward description. (required).</param> /// <param name="inwardDescription">Description of the relationship based on relationship definition's inward description. (required).</param> /// <param name="effectiveFrom">The effective datetime from which the relationship is valid..</param> public CompleteRelationship(string href = default(string), Version version = default(Version), ResourceId relationshipDefinitionId = default(ResourceId), RelatedEntity sourceEntity = default(RelatedEntity), RelatedEntity targetEntity = default(RelatedEntity), string outwardDescription = default(string), string inwardDescription = default(string), DateTimeOffset?effectiveFrom = default(DateTimeOffset?)) { this.Href = href; // to ensure "relationshipDefinitionId" is required (not null) if (relationshipDefinitionId == null) { throw new InvalidDataException("relationshipDefinitionId is a required property for CompleteRelationship and cannot be null"); } else { this.RelationshipDefinitionId = relationshipDefinitionId; } // to ensure "sourceEntity" is required (not null) if (sourceEntity == null) { throw new InvalidDataException("sourceEntity is a required property for CompleteRelationship and cannot be null"); } else { this.SourceEntity = sourceEntity; } // to ensure "targetEntity" is required (not null) if (targetEntity == null) { throw new InvalidDataException("targetEntity is a required property for CompleteRelationship and cannot be null"); } else { this.TargetEntity = targetEntity; } // to ensure "outwardDescription" is required (not null) if (outwardDescription == null) { throw new InvalidDataException("outwardDescription is a required property for CompleteRelationship and cannot be null"); } else { this.OutwardDescription = outwardDescription; } // to ensure "inwardDescription" is required (not null) if (inwardDescription == null) { throw new InvalidDataException("inwardDescription is a required property for CompleteRelationship and cannot be null"); } else { this.InwardDescription = inwardDescription; } this.Href = href; this.Version = version; this.EffectiveFrom = effectiveFrom; }
/// <summary> /// Initializes a new instance of the <see cref="Relationship" /> class. /// </summary> /// <param name="version">version.</param> /// <param name="relationshipDefinitionId">relationshipDefinitionId (required).</param> /// <param name="relatedEntity">relatedEntity (required).</param> /// <param name="traversalDirection">Direction of relationship betwen the requested entity and related entity. This can be 'In' or 'Out'. Read more about relationships traversal direction in LUSID Knowledge Base here https://support.lusid.com/relationships. (required).</param> /// <param name="traversalDescription">Description of the relationship based on relationship's traversal direction. If 'TraversalDirection' is 'Out', this description would be 'OutwardDescription' from the associated relationship definition. If 'TraversalDirection' is 'In', this description would be 'InwardDescription' from the associated relationship definition. (required).</param> /// <param name="effectiveFrom">The effective datetime from which the relationship is valid..</param> public Relationship(Version version = default(Version), ResourceId relationshipDefinitionId = default(ResourceId), RelatedEntity relatedEntity = default(RelatedEntity), string traversalDirection = default(string), string traversalDescription = default(string), DateTimeOffset?effectiveFrom = default(DateTimeOffset?)) { // to ensure "relationshipDefinitionId" is required (not null) if (relationshipDefinitionId == null) { throw new InvalidDataException("relationshipDefinitionId is a required property for Relationship and cannot be null"); } else { this.RelationshipDefinitionId = relationshipDefinitionId; } // to ensure "relatedEntity" is required (not null) if (relatedEntity == null) { throw new InvalidDataException("relatedEntity is a required property for Relationship and cannot be null"); } else { this.RelatedEntity = relatedEntity; } // to ensure "traversalDirection" is required (not null) if (traversalDirection == null) { throw new InvalidDataException("traversalDirection is a required property for Relationship and cannot be null"); } else { this.TraversalDirection = traversalDirection; } // to ensure "traversalDescription" is required (not null) if (traversalDescription == null) { throw new InvalidDataException("traversalDescription is a required property for Relationship and cannot be null"); } else { this.TraversalDescription = traversalDescription; } this.Version = version; this.EffectiveFrom = effectiveFrom; }