/// <summary>
        /// Returns true if PartyRef instances are equal
        /// </summary>
        /// <param name="other">Instance of PartyRef to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PartyRef other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PartyRefType == other.PartyRefType ||
                     PartyRefType != null &&
                     PartyRefType.Equals(other.PartyRefType)
                     ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Href == other.Href ||
                     Href != null &&
                     Href.Equals(other.Href)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Individual == other.Individual ||
                     Individual != null &&
                     Individual.SequenceEqual(other.Individual)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.SequenceEqual(other.Organization)
                 ));
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (PartyRefType != null)
         {
             hashCode = hashCode * 59 + PartyRefType.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Href != null)
         {
             hashCode = hashCode * 59 + Href.GetHashCode();
         }
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Individual != null)
         {
             hashCode = hashCode * 59 + Individual.GetHashCode();
         }
         if (Organization != null)
         {
             hashCode = hashCode * 59 + Organization.GetHashCode();
         }
         return(hashCode);
     }
 }