/// <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 (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (IsCompatible != null) { hashCode = hashCode * 59 + IsCompatible.GetHashCode(); } if (CompatibilityLevel != null) { hashCode = hashCode * 59 + CompatibilityLevel.GetHashCode(); } if (Confidence != null) { hashCode = hashCode * 59 + Confidence.GetHashCode(); } if (ConfidenceDescription != null) { hashCode = hashCode * 59 + ConfidenceDescription.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if BrandedFoodObjectDietFlags instances are equal /// </summary> /// <param name="other">Instance of BrandedFoodObjectDietFlags to be compared</param> /// <returns>Boolean</returns> public bool Equals(BrandedFoodObjectDietFlags other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Ingredient == other.Ingredient || Ingredient != null && Ingredient.Equals(other.Ingredient) ) && ( IngredientDescription == other.IngredientDescription || IngredientDescription != null && IngredientDescription.Equals(other.IngredientDescription) ) && ( DietLabel == other.DietLabel || DietLabel != null && DietLabel.Equals(other.DietLabel) ) && ( IsCompatible == other.IsCompatible || IsCompatible != null && IsCompatible.Equals(other.IsCompatible) ) && ( CompatibilityLevel == other.CompatibilityLevel || CompatibilityLevel != null && CompatibilityLevel.Equals(other.CompatibilityLevel) ) && ( CompatibilityDescription == other.CompatibilityDescription || CompatibilityDescription != null && CompatibilityDescription.Equals(other.CompatibilityDescription) ) && ( IsAllergen == other.IsAllergen || IsAllergen != null && IsAllergen.Equals(other.IsAllergen) )); }
/// <summary> /// Returns true if BrandedFoodObjectDietLabelsGlutenFree instances are equal /// </summary> /// <param name="other">Instance of BrandedFoodObjectDietLabelsGlutenFree to be compared</param> /// <returns>Boolean</returns> public bool Equals(BrandedFoodObjectDietLabelsGlutenFree other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( IsCompatible == other.IsCompatible || IsCompatible != null && IsCompatible.Equals(other.IsCompatible) ) && ( CompatibilityLevel == other.CompatibilityLevel || CompatibilityLevel != null && CompatibilityLevel.Equals(other.CompatibilityLevel) ) && ( Confidence == other.Confidence || Confidence != null && Confidence.Equals(other.Confidence) ) && ( ConfidenceDescription == other.ConfidenceDescription || ConfidenceDescription != null && ConfidenceDescription.Equals(other.ConfidenceDescription) )); }
/// <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 (Ingredient != null) { hashCode = hashCode * 59 + Ingredient.GetHashCode(); } if (IngredientDescription != null) { hashCode = hashCode * 59 + IngredientDescription.GetHashCode(); } if (DietLabel != null) { hashCode = hashCode * 59 + DietLabel.GetHashCode(); } if (IsCompatible != null) { hashCode = hashCode * 59 + IsCompatible.GetHashCode(); } if (CompatibilityLevel != null) { hashCode = hashCode * 59 + CompatibilityLevel.GetHashCode(); } if (CompatibilityDescription != null) { hashCode = hashCode * 59 + CompatibilityDescription.GetHashCode(); } if (IsAllergen != null) { hashCode = hashCode * 59 + IsAllergen.GetHashCode(); } return(hashCode); } }