/// <param name="origin">API response that was processed to make this statement</param> /// <param name="id">Identifies the train</param> /// <param name="from">Identifies the train</param> /// <param name="to">Station the train arrives to</param> /// <param name="type">Type of the train on this subrelation</param> public TrainSubrelationStatement(APIResponse origin, TrainIdStatement id, StationIdStatement from, StationIdStatement to, TrainType type) : base(origin) { Id = id; From = from; To = to; Type = type; }
/// <param name="origin">API response that was processed to make this statement</param> /// <param name="trainId">Identifies the train</param> /// <param name="from">Station the link starts with</param> /// <param name="to">Station the link ends with</param> /// <param name="isDirect">Indicates whether the link is absolutely direct between the stations (for the specific train)</param> public TrainStationLinkStatement(APIResponse origin, TrainIdStatement trainId, StationIdStatement from, StationIdStatement to, bool isDirect) : base(origin) { TrainId = trainId; From = from; To = to; IsDirect = isDirect; }
/// <param name="origin">API response that was processed to make this statement</param> /// <param name="id">Identifies the train</param> /// <param name="from">Identifies the train</param> /// <param name="to">Station the train arrives to</param> /// <param name="type">Type of the train on this subrelation</param> public TrainRelationStatement(APIResponse origin, TrainIdStatement id, StationIdStatement from, StationIdStatement to, TimeSpan?fromTime = null, TimeSpan?toTime = null) : base(origin) { Id = id; From = from; To = to; FromTime = fromTime; ToTime = toTime; }
/// <param name="origin"></param> /// <param name="trainId">Identifies the train</param> /// <param name="stationId">Station of the train</param> /// <param name="arrival">Time the train arrives at (null may indicate first station, this will set <see cref="HasTimeInfo">HasTimeInfo</see> to false if departure is also null)</param> /// <param name="departure">Time the train departs at (null may indicate last station, this will set <see cref="HasTimeInfo">HasTimeInfo</see> to false if arrival is also null)</param> public TrainStationStatement(APIResponse origin, TrainIdStatement trainId, StationIdStatement stationId, TimeTuple?arrival, TimeTuple?departure) : base(origin) { TrainId = trainId; StationId = stationId; Arrival = arrival; Departure = departure; HasTimeInfo = arrival != null || departure != null; }