/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (ArrivalLocationId != null) { hashCode = hashCode * 59 + ArrivalLocationId.GetHashCode(); } if (DepartureLocationIds != null) { hashCode = hashCode * 59 + DepartureLocationIds.GetHashCode(); } if (Transportation != null) { hashCode = hashCode * 59 + Transportation.GetHashCode(); } hashCode = hashCode * 59 + TravelTime.GetHashCode(); hashCode = hashCode * 59 + ArrivalTimePeriod.GetHashCode(); if (Properties != null) { hashCode = hashCode * 59 + Properties.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if RequestTimeFilterArrivalSearch instances are equal /// </summary> /// <param name="other">Instance of RequestTimeFilterArrivalSearch to be compared</param> /// <returns>Boolean</returns> public bool Equals(RequestTimeFilterArrivalSearch other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( DepartureLocationIds == other.DepartureLocationIds || DepartureLocationIds != null && other.DepartureLocationIds != null && DepartureLocationIds.SequenceEqual(other.DepartureLocationIds) ) && ( ArrivalLocationId == other.ArrivalLocationId || ArrivalLocationId != null && ArrivalLocationId.Equals(other.ArrivalLocationId) ) && ( Transportation == other.Transportation || Transportation != null && Transportation.Equals(other.Transportation) ) && ( TravelTime == other.TravelTime || TravelTime.Equals(other.TravelTime) ) && ( ArrivalTime == other.ArrivalTime || ArrivalTime != null && ArrivalTime.Equals(other.ArrivalTime) ) && ( Properties == other.Properties || Properties != null && other.Properties != null && Properties.SequenceEqual(other.Properties) ) && ( Range == other.Range || Range != null && Range.Equals(other.Range) )); }