public override int GetHashCode() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } if (NoPenaltyDays != 0) { hash ^= NoPenaltyDays.GetHashCode(); } if (FeeCategory != 0) { hash ^= FeeCategory.GetHashCode(); } if (cancellationFeeAmount_ != null) { hash ^= CancellationFeeAmount.GetHashCode(); } if (cancellationFeeRate_ != null) { hash ^= CancellationFeeRate.GetHashCode(); } if (CancellationPolicyText.Length != 0) { hash ^= CancellationPolicyText.GetHashCode(); } return(hash); }
public void MergeFrom(CancellationPolicy other) { if (other == null) { return; } if (other.entityId_ != null) { if (entityId_ == null) { entityId_ = new global::HOLMS.Types.Booking.Indicators.CancellationPolicyIndicator(); } EntityId.MergeFrom(other.EntityId); } if (other.Description.Length != 0) { Description = other.Description; } if (other.NoPenaltyDays != 0) { NoPenaltyDays = other.NoPenaltyDays; } if (other.FeeCategory != 0) { FeeCategory = other.FeeCategory; } if (other.cancellationFeeAmount_ != null) { if (cancellationFeeAmount_ == null) { cancellationFeeAmount_ = new global::HOLMS.Types.Primitive.MonetaryAmount(); } CancellationFeeAmount.MergeFrom(other.CancellationFeeAmount); } if (other.cancellationFeeRate_ != null) { if (cancellationFeeRate_ == null) { cancellationFeeRate_ = new global::HOLMS.Types.Primitive.FixedPointRatio(); } CancellationFeeRate.MergeFrom(other.CancellationFeeRate); } if (other.CancellationPolicyText.Length != 0) { CancellationPolicyText = other.CancellationPolicyText; } }