public override int GetHashCode() { int hashCode = -735515174; if (StartAtRange != null) { hashCode += StartAtRange.GetHashCode(); } if (LocationId != null) { hashCode += LocationId.GetHashCode(); } if (SegmentFilters != null) { hashCode += SegmentFilters.GetHashCode(); } if (BookingId != null) { hashCode += BookingId.GetHashCode(); } return(hashCode); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is SearchAvailabilityFilter other && ((StartAtRange == null && other.StartAtRange == null) || (StartAtRange?.Equals(other.StartAtRange) == true)) && ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) && ((SegmentFilters == null && other.SegmentFilters == null) || (SegmentFilters?.Equals(other.SegmentFilters) == true)) && ((BookingId == null && other.BookingId == null) || (BookingId?.Equals(other.BookingId) == true))); }