106 lines
1.8 KiB
Protocol Buffer
106 lines
1.8 KiB
Protocol Buffer
|
syntax = "proto3";
|
||
|
|
||
|
import "google/protobuf/timestamp.proto";
|
||
|
|
||
|
package trains.webapi;
|
||
|
|
||
|
message ServiceData {
|
||
|
uint64 id = 1;
|
||
|
string rid = 2;
|
||
|
string uid = 3;
|
||
|
string rsid = 4;
|
||
|
string headcode = 5;
|
||
|
string scheduled_start_date = 6;
|
||
|
|
||
|
TrainOperator operator = 7;
|
||
|
|
||
|
DisruptionReason delay_reason = 8;
|
||
|
DisruptionReason cancel_reason = 9;
|
||
|
|
||
|
bool is_active = 10;
|
||
|
bool is_deleted = 11;
|
||
|
bool is_cancelled = 12;
|
||
|
|
||
|
repeated ServiceLocation locations = 13;
|
||
|
}
|
||
|
|
||
|
message TrainOperator {
|
||
|
string code = 1;
|
||
|
|
||
|
string name = 2;
|
||
|
string url = 3;
|
||
|
}
|
||
|
|
||
|
message Location {
|
||
|
string tiploc = 1;
|
||
|
string name = 2;
|
||
|
|
||
|
string crs = 3;
|
||
|
TrainOperator operator = 4;
|
||
|
}
|
||
|
|
||
|
message DisruptionReason {
|
||
|
uint32 code = 1;
|
||
|
string text = 2;
|
||
|
|
||
|
Location location = 3;
|
||
|
bool near_location = 4;
|
||
|
}
|
||
|
|
||
|
message TimeZone {
|
||
|
string name = 1;
|
||
|
int32 utc_offset = 2;
|
||
|
}
|
||
|
|
||
|
message DateTime {
|
||
|
google.protobuf.Timestamp timestamp = 1;
|
||
|
TimeZone timezone = 2;
|
||
|
}
|
||
|
|
||
|
message TimingData {
|
||
|
DateTime public_scheduled = 1;
|
||
|
DateTime working_scheduled = 2;
|
||
|
|
||
|
DateTime public_estimated = 3;
|
||
|
DateTime working_estimated = 4;
|
||
|
|
||
|
DateTime actual = 5;
|
||
|
}
|
||
|
|
||
|
message PlatformData {
|
||
|
string scheduled = 1;
|
||
|
|
||
|
string live = 2;
|
||
|
bool confirmed = 3;
|
||
|
|
||
|
bool suppressed = 4;
|
||
|
}
|
||
|
|
||
|
message ServiceLocation {
|
||
|
enum CallingPointType {
|
||
|
CALLING_POINT_UNKNOWN = 0;
|
||
|
OR = 1;
|
||
|
OPOR = 2;
|
||
|
PP = 3;
|
||
|
OPIP = 4;
|
||
|
IP = 5;
|
||
|
OPDT = 6;
|
||
|
DT = 7;
|
||
|
}
|
||
|
|
||
|
uint32 id = 1;
|
||
|
Location location = 2;
|
||
|
string calling_point_type = 3;
|
||
|
|
||
|
uint32 train_length = 4;
|
||
|
bool service_suppressed = 5;
|
||
|
PlatformData platform = 6;
|
||
|
|
||
|
bool cancelled = 7;
|
||
|
Location false_destination = 8;
|
||
|
|
||
|
TimingData arrival_timing = 9;
|
||
|
TimingData departure_timing = 10;
|
||
|
TimingData pass_timing = 11;
|
||
|
}
|