2021-11-20 19:06:43 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
import "types.proto";
|
2021-11-20 19:06:43 +00:00
|
|
|
|
|
|
|
package trains.webapi;
|
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
message SummarizeServiceRequest {
|
|
|
|
uint64 id = 1;
|
2021-11-20 19:06:43 +00:00
|
|
|
}
|
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
message LocationRequest {
|
|
|
|
string tiploc = 1;
|
|
|
|
string crs = 2;
|
2021-11-20 19:06:43 +00:00
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
bool include_in_past = 3;
|
2021-11-20 19:06:43 +00:00
|
|
|
}
|
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
message ListServicesRequest {
|
|
|
|
string rid = 1;
|
|
|
|
string uid = 2;
|
|
|
|
string headcode = 3;
|
|
|
|
string scheduled_start_date = 4;
|
|
|
|
string train_operator_code = 5;
|
2021-11-20 19:06:43 +00:00
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
LocationRequest origin = 6;
|
|
|
|
LocationRequest destination = 7;
|
|
|
|
LocationRequest calling_at = 8;
|
|
|
|
LocationRequest passing = 9;
|
2021-11-20 19:06:43 +00:00
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
bool include_deleted = 10;
|
|
|
|
|
|
|
|
uint32 max_results = 11;
|
2021-11-20 19:06:43 +00:00
|
|
|
}
|
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
message ServiceList {
|
|
|
|
repeated ServiceData services = 1;
|
2021-11-20 19:06:43 +00:00
|
|
|
}
|
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
service TrainsService {
|
|
|
|
rpc SummarizeService(SummarizeServiceRequest) returns (ServiceData) {}
|
2021-11-20 19:06:43 +00:00
|
|
|
|
2021-11-20 23:46:53 +00:00
|
|
|
rpc ListServices(ListServicesRequest) returns (ServiceList) {}
|
2021-11-20 19:06:43 +00:00
|
|
|
}
|