public void MergeFrom(CancelledReservation other) { if (other == null) { return; } if (other.entityId_ != null) { if (entityId_ == null) { entityId_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator(); } EntityId.MergeFrom(other.EntityId); } if (other.BookingId.Length != 0) { BookingId = other.BookingId; } if (other.State != 0) { State = other.State; } if (other.guest_ != null) { if (guest_ == null) { guest_ = new global::HOLMS.Types.CRM.Guests.Guest(); } Guest.MergeFrom(other.Guest); } if (other.dateRange_ != null) { if (dateRange_ == null) { dateRange_ = new global::HOLMS.Types.Primitive.PbInclusiveOpsdateRange(); } DateRange.MergeFrom(other.DateRange); } if (other.NumberAdults != 0) { NumberAdults = other.NumberAdults; } if (other.NumberChildren != 0) { NumberChildren = other.NumberChildren; } if (other.roomType_ != null) { if (roomType_ == null) { roomType_ = new global::HOLMS.Types.Supply.RoomTypes.RoomType(); } RoomType.MergeFrom(other.RoomType); } additionalGuests_.Add(other.additionalGuests_); if (other.TaxExempt != false) { TaxExempt = other.TaxExempt; } if (other.cancellationPenaltyApplied_ != null) { if (cancellationPenaltyApplied_ == null) { cancellationPenaltyApplied_ = new global::HOLMS.Types.Primitive.MonetaryAmount(); } CancellationPenaltyApplied.MergeFrom(other.CancellationPenaltyApplied); } if (other.CancellationReason.Length != 0) { CancellationReason = other.CancellationReason; } if (other.cancellationPolicy_ != null) { if (cancellationPolicy_ == null) { cancellationPolicy_ = new global::HOLMS.Types.Booking.CancellationPolicy(); } CancellationPolicy.MergeFrom(other.CancellationPolicy); } if (other.RequestingParty.Length != 0) { RequestingParty = other.RequestingParty; } if (other.cancellationDate_ != null) { if (cancellationDate_ == null) { cancellationDate_ = new global::HOLMS.Types.Primitive.PbLocalDate(); } CancellationDate.MergeFrom(other.CancellationDate); } if (other.CancellationNumber != 0L) { CancellationNumber = other.CancellationNumber; } activeTags_.Add(other.activeTags_); }
public override int GetHashCode() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (BookingId.Length != 0) { hash ^= BookingId.GetHashCode(); } if (State != 0) { hash ^= State.GetHashCode(); } if (guest_ != null) { hash ^= Guest.GetHashCode(); } if (dateRange_ != null) { hash ^= DateRange.GetHashCode(); } if (NumberAdults != 0) { hash ^= NumberAdults.GetHashCode(); } if (NumberChildren != 0) { hash ^= NumberChildren.GetHashCode(); } if (roomType_ != null) { hash ^= RoomType.GetHashCode(); } hash ^= additionalGuests_.GetHashCode(); if (TaxExempt != false) { hash ^= TaxExempt.GetHashCode(); } if (cancellationPenaltyApplied_ != null) { hash ^= CancellationPenaltyApplied.GetHashCode(); } if (CancellationReason.Length != 0) { hash ^= CancellationReason.GetHashCode(); } if (cancellationPolicy_ != null) { hash ^= CancellationPolicy.GetHashCode(); } if (RequestingParty.Length != 0) { hash ^= RequestingParty.GetHashCode(); } if (cancellationDate_ != null) { hash ^= CancellationDate.GetHashCode(); } if (CancellationNumber != 0L) { hash ^= CancellationNumber.GetHashCode(); } hash ^= activeTags_.GetHashCode(); return(hash); }