/// <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&#39;s outward description. (required).</param>
        /// <param name="inwardDescription">Description of the relationship based on relationship definition&#39;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 &#39;In&#39; or &#39;Out&#39;. 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&#39;s traversal direction. If &#39;TraversalDirection&#39; is &#39;Out&#39;, this description would be &#39;OutwardDescription&#39; from the associated relationship definition. If &#39;TraversalDirection&#39; is &#39;In&#39;, this description would be &#39;InwardDescription&#39; 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;
        }