Example #1
0
 public void MergeFrom(ReservationAssociatedParties other)
 {
     if (other == null)
     {
         return;
     }
     if (other.primaryGuest_ != null)
     {
         if (primaryGuest_ == null)
         {
             primaryGuest_ = new global::HOLMS.Types.CRM.Guests.GuestIndicator();
         }
         PrimaryGuest.MergeFrom(other.PrimaryGuest);
     }
     additionalGuests_.Add(other.additionalGuests_);
     contactPersons_.Add(other.contactPersons_);
     if (other.reservation_ != null)
     {
         if (reservation_ == null)
         {
             reservation_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         Reservation.MergeFrom(other.Reservation);
     }
 }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (primaryGuest_ != null)
            {
                hash ^= PrimaryGuest.GetHashCode();
            }
            hash ^= additionalGuests_.GetHashCode();
            hash ^= contactPersons_.GetHashCode();
            if (reservation_ != null)
            {
                hash ^= Reservation.GetHashCode();
            }
            return(hash);
        }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Arrival == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Arrival");
     }
     if (BlockId == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "BlockId");
     }
     if (Departure == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Departure");
     }
     if (AdditionalGuests != null)
     {
         foreach (var element in AdditionalGuests)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (PrimaryGuest != null)
     {
         PrimaryGuest.Validate();
     }
     if (Services != null)
     {
         foreach (var element1 in Services)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Arrival == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Arrival");
     }
     if (ChannelCode == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ChannelCode");
     }
     if (Departure == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Departure");
     }
     if (TimeSlices == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TimeSlices");
     }
     if (AdditionalGuests != null)
     {
         foreach (var element in AdditionalGuests)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (Commission != null)
     {
         Commission.Validate();
     }
     if (PrePaymentAmount != null)
     {
         PrePaymentAmount.Validate();
     }
     if (PrimaryGuest != null)
     {
         PrimaryGuest.Validate();
     }
     if (Services != null)
     {
         foreach (var element1 in Services)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (TimeSlices != null)
     {
         foreach (var element2 in TimeSlices)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Balance == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Balance");
     }
     if (BookingId == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "BookingId");
     }
     if (CancellationFee == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CancellationFee");
     }
     if (Id == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Id");
     }
     if (NoShowFee == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "NoShowFee");
     }
     if (PrimaryGuest == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryGuest");
     }
     if (Property == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Property");
     }
     if (RatePlan == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "RatePlan");
     }
     if (TotalGrossAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TotalGrossAmount");
     }
     if (UnitGroup == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UnitGroup");
     }
     if (Actions != null)
     {
         foreach (var element in Actions)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (AdditionalGuests != null)
     {
         foreach (var element1 in AdditionalGuests)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (AssignedUnits != null)
     {
         foreach (var element2 in AssignedUnits)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
     if (Balance != null)
     {
         Balance.Validate();
     }
     if (Booker != null)
     {
         Booker.Validate();
     }
     if (CancellationFee != null)
     {
         CancellationFee.Validate();
     }
     if (CityTax != null)
     {
         CityTax.Validate();
     }
     if (Commission != null)
     {
         Commission.Validate();
     }
     if (Company != null)
     {
         Company.Validate();
     }
     if (NoShowFee != null)
     {
         NoShowFee.Validate();
     }
     if (PaymentAccount != null)
     {
         PaymentAccount.Validate();
     }
     if (PrimaryGuest != null)
     {
         PrimaryGuest.Validate();
     }
     if (Property != null)
     {
         Property.Validate();
     }
     if (RatePlan != null)
     {
         RatePlan.Validate();
     }
     if (Services != null)
     {
         foreach (var element3 in Services)
         {
             if (element3 != null)
             {
                 element3.Validate();
             }
         }
     }
     if (TimeSlices != null)
     {
         foreach (var element4 in TimeSlices)
         {
             if (element4 != null)
             {
                 element4.Validate();
             }
         }
     }
     if (TotalGrossAmount != null)
     {
         TotalGrossAmount.Validate();
     }
     if (Unit != null)
     {
         Unit.Validate();
     }
     if (UnitGroup != null)
     {
         UnitGroup.Validate();
     }
     if (ValidationMessages != null)
     {
         foreach (var element5 in ValidationMessages)
         {
             if (element5 != null)
             {
                 element5.Validate();
             }
         }
     }
 }