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

            return
                ((
                     Value == other.Value ||
                     Value != null &&
                     Value.Equals(other.Value)
                     ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     IsManaged == other.IsManaged ||
                     IsManaged != null &&
                     IsManaged.Equals(other.IsManaged)
                 ) &&
                 (
                     ExternalValue == other.ExternalValue ||
                     ExternalValue != null &&
                     ExternalValue.Equals(other.ExternalValue)
                 ) &&
                 (
                     ParentValues == other.ParentValues ||
                     ParentValues != null &&
                     ParentValues.SequenceEqual(other.ParentValues)
                 ) &&
                 (
                     MetadataId == other.MetadataId ||
                     MetadataId != null &&
                     MetadataId.Equals(other.MetadataId)
                 ) &&
                 (
                     HasChanged == other.HasChanged ||
                     HasChanged != null &&
                     HasChanged.Equals(other.HasChanged)
                 ) &&
                 (
                     Label == other.Label ||
                     Label != null &&
                     Label.Equals(other.Label)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ));
        }
Ejemplo n.º 2
0
 /// <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 (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (IsManaged != null)
         {
             hashCode = hashCode * 59 + IsManaged.GetHashCode();
         }
         if (ExternalValue != null)
         {
             hashCode = hashCode * 59 + ExternalValue.GetHashCode();
         }
         if (ParentValues != null)
         {
             hashCode = hashCode * 59 + ParentValues.GetHashCode();
         }
         if (MetadataId != null)
         {
             hashCode = hashCode * 59 + MetadataId.GetHashCode();
         }
         if (HasChanged != null)
         {
             hashCode = hashCode * 59 + HasChanged.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         return(hashCode);
     }
 }