public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is OrderReturnLineItem other && ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) && ((SourceLineItemUid == null && other.SourceLineItemUid == null) || (SourceLineItemUid?.Equals(other.SourceLineItemUid) == true)) && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((Quantity == null && other.Quantity == null) || (Quantity?.Equals(other.Quantity) == true)) && ((QuantityUnit == null && other.QuantityUnit == null) || (QuantityUnit?.Equals(other.QuantityUnit) == true)) && ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) && ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) && ((VariationName == null && other.VariationName == null) || (VariationName?.Equals(other.VariationName) == true)) && ((ReturnModifiers == null && other.ReturnModifiers == null) || (ReturnModifiers?.Equals(other.ReturnModifiers) == true)) && ((AppliedTaxes == null && other.AppliedTaxes == null) || (AppliedTaxes?.Equals(other.AppliedTaxes) == true)) && ((AppliedDiscounts == null && other.AppliedDiscounts == null) || (AppliedDiscounts?.Equals(other.AppliedDiscounts) == true)) && ((BasePriceMoney == null && other.BasePriceMoney == null) || (BasePriceMoney?.Equals(other.BasePriceMoney) == true)) && ((VariationTotalPriceMoney == null && other.VariationTotalPriceMoney == null) || (VariationTotalPriceMoney?.Equals(other.VariationTotalPriceMoney) == true)) && ((GrossReturnMoney == null && other.GrossReturnMoney == null) || (GrossReturnMoney?.Equals(other.GrossReturnMoney) == true)) && ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) && ((TotalDiscountMoney == null && other.TotalDiscountMoney == null) || (TotalDiscountMoney?.Equals(other.TotalDiscountMoney) == true)) && ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true))); }
public override int GetHashCode() { int hashCode = 1299728447; if (Uid != null) { hashCode += Uid.GetHashCode(); } if (SourceLineItemUid != null) { hashCode += SourceLineItemUid.GetHashCode(); } if (Name != null) { hashCode += Name.GetHashCode(); } if (Quantity != null) { hashCode += Quantity.GetHashCode(); } if (QuantityUnit != null) { hashCode += QuantityUnit.GetHashCode(); } if (Note != null) { hashCode += Note.GetHashCode(); } if (CatalogObjectId != null) { hashCode += CatalogObjectId.GetHashCode(); } if (VariationName != null) { hashCode += VariationName.GetHashCode(); } if (ReturnModifiers != null) { hashCode += ReturnModifiers.GetHashCode(); } if (AppliedTaxes != null) { hashCode += AppliedTaxes.GetHashCode(); } if (AppliedDiscounts != null) { hashCode += AppliedDiscounts.GetHashCode(); } if (BasePriceMoney != null) { hashCode += BasePriceMoney.GetHashCode(); } if (VariationTotalPriceMoney != null) { hashCode += VariationTotalPriceMoney.GetHashCode(); } if (GrossReturnMoney != null) { hashCode += GrossReturnMoney.GetHashCode(); } if (TotalTaxMoney != null) { hashCode += TotalTaxMoney.GetHashCode(); } if (TotalDiscountMoney != null) { hashCode += TotalDiscountMoney.GetHashCode(); } if (TotalMoney != null) { hashCode += TotalMoney.GetHashCode(); } return(hashCode); }