public override int GetHashCode()
        {
            int hash = 1;

            hash ^= prices_.GetHashCode();
            if (lodgingSubtotal_ != null)
            {
                hash ^= LodgingSubtotal.GetHashCode();
            }
            if (incidentalSubtotal_ != null)
            {
                hash ^= IncidentalSubtotal.GetHashCode();
            }
            if (taxesSubtotal_ != null)
            {
                hash ^= TaxesSubtotal.GetHashCode();
            }
            if (feesSubtotal_ != null)
            {
                hash ^= FeesSubtotal.GetHashCode();
            }
            if (estimatedTotal_ != null)
            {
                hash ^= EstimatedTotal.GetHashCode();
            }
            if (IsPriceable != false)
            {
                hash ^= IsPriceable.GetHashCode();
            }
            if (IsAvailable != false)
            {
                hash ^= IsAvailable.GetHashCode();
            }
            if (ViolatesMlos != false)
            {
                hash ^= ViolatesMlos.GetHashCode();
            }
            if (ViolatesCta != false)
            {
                hash ^= ViolatesCta.GetHashCode();
            }
            if (IsAvailableWithHoldDrop != false)
            {
                hash ^= IsAvailableWithHoldDrop.GetHashCode();
            }
            hash ^= suppliedSubtotals_.GetHashCode();
            hash ^= offers_.GetHashCode();
            return(hash);
        }
Пример #2
0
 public void MergeFrom(ReservationPriceEstimate other)
 {
     if (other == null)
     {
         return;
     }
     prices_.Add(other.prices_);
     if (other.lodgingSubtotal_ != null)
     {
         if (lodgingSubtotal_ == null)
         {
             lodgingSubtotal_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         LodgingSubtotal.MergeFrom(other.LodgingSubtotal);
     }
     if (other.incidentalSubtotal_ != null)
     {
         if (incidentalSubtotal_ == null)
         {
             incidentalSubtotal_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         IncidentalSubtotal.MergeFrom(other.IncidentalSubtotal);
     }
     if (other.taxesSubtotal_ != null)
     {
         if (taxesSubtotal_ == null)
         {
             taxesSubtotal_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         TaxesSubtotal.MergeFrom(other.TaxesSubtotal);
     }
     if (other.feesSubtotal_ != null)
     {
         if (feesSubtotal_ == null)
         {
             feesSubtotal_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         FeesSubtotal.MergeFrom(other.FeesSubtotal);
     }
     if (other.estimatedTotal_ != null)
     {
         if (estimatedTotal_ == null)
         {
             estimatedTotal_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         EstimatedTotal.MergeFrom(other.EstimatedTotal);
     }
     if (other.IsPriceable != false)
     {
         IsPriceable = other.IsPriceable;
     }
     if (other.IsAvailable != false)
     {
         IsAvailable = other.IsAvailable;
     }
     if (other.ViolatesMlos != false)
     {
         ViolatesMlos = other.ViolatesMlos;
     }
     if (other.ViolatesCta != false)
     {
         ViolatesCta = other.ViolatesCta;
     }
     suppliedSubtotals_.Add(other.suppliedSubtotals_);
 }