-
Notifications
You must be signed in to change notification settings - Fork 12
/
request.proto
399 lines (360 loc) · 16.9 KB
/
request.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
syntax = "proto2";
import "type.proto";
package pbnavitia;
message CalendarsRequest {
optional string start_date = 1;
optional string end_date = 2;
optional int32 depth = 3;
optional int32 start_page = 4;
optional int32 count = 5;
optional string filter = 6;
repeated string forbidden_uris = 7;
}
message TrafficReportsRequest {
optional uint64 application_period_begin = 8;
optional uint64 application_period_end = 9;
optional uint64 _current_datetime = 10; // to be removed
optional int32 depth = 3;
optional int32 start_page = 4;
optional int32 count = 5;
optional string filter = 6;
repeated string forbidden_uris = 7;
}
message LineReportsRequest {
enum Type {
COMMERCIAL_MODE = 0;
LINE = 1;
PHYSICAL_MODE = 2;
STOP_AREA = 3;
}
optional int32 depth = 1;
optional int32 start_page = 2;
optional int32 count = 3;
optional string filter = 4;
repeated string forbidden_uris = 5;
optional uint64 since_datetime = 6;
optional uint64 until_datetime = 7;
repeated ActiveStatus filter_status = 8;
optional Type object_type = 9; // allows to filter on PT object
optional string object_id = 10;
}
message PlacesRequest {
required string q = 1;
repeated NavitiaType types = 2;
required int32 depth = 3;
required int32 count = 4;
repeated string admin_uris = 5;
optional int32 search_type = 6;
optional float main_stop_area_weight_factor = 7 [default=1.0];
}
message NextStopTimeRequest {
required string departure_filter = 1;
required string arrival_filter = 2;
optional uint64 from_datetime = 3;
required int32 duration = 4;
required int32 depth = 5;
required int32 nb_stoptimes = 7;
optional int32 interface_version = 8; // to be removed
required int32 start_page = 9;
required int32 count = 10;
optional int32 max_date_times = 11; // to be removed
repeated string forbidden_uri = 12;
optional string calendar = 13;
optional uint64 until_datetime = 15;
optional uint64 _current_datetime = 16; // to be removed
optional RTLevel realtime_level = 17;
optional int32 items_per_schedule = 18;
optional bool disable_geojson = 19;
}
message StreetNetworkParams {
optional string origin_mode = 1;
optional string destination_mode = 2;
optional double walking_speed = 3;
optional double bike_speed = 5;
optional double car_speed = 7;
optional double bss_speed = 9;
optional string origin_filter = 11;
optional string destination_filter = 12;
optional int32 max_walking_duration_to_pt = 13;
optional int32 max_bike_duration_to_pt = 14;
optional int32 max_bss_duration_to_pt = 15;
optional int32 max_car_duration_to_pt = 16;
optional bool enable_direct_path = 17 [default=true];
optional double car_no_park_speed = 18;
optional int32 max_car_no_park_duration_to_pt = 19;
optional string language = 20 [default="en-US"];
optional bool enable_instructions = 21 [default=true];
// bike share
optional float bss_rent_duration = 22 [default=120];
optional float bss_rent_penalty = 23 [default=0];
optional float bss_return_duration = 24 [default=120];
optional float bss_return_penalty = 25 [default=0];
// Valhalla bike
optional float bike_use_roads = 26 [default=0.5];
optional float bike_use_hills = 27 [default=0.5];
optional float bike_use_ferry = 28 [default=0.5];
optional float bike_avoid_bad_surfaces = 29 [default=0.25];
optional bool bike_shortest = 30 [default=false];
optional BicycleType bicycle_type = 31 [default=hybrid];
optional float bike_use_living_streets = 32 [default=0.5];
optional float bike_maneuver_penalty = 33 [default=5];
optional float bike_service_penalty = 34 [default=0];
optional float bike_service_factor = 35 [default=1];
optional float bike_country_crossing_cost = 36 [default=600];
optional float bike_country_crossing_penalty = 37 [default=0];
optional string profile_tag = 38 ;
optional float bike_destination_only_penalty = 54 [default=120];
// Valhalla walking/pedestrian
optional float walking_walkway_factor = 39 [default=1.0];
optional float walking_sidewalk_factor = 40 [default=1.0];
optional float walking_alley_factor = 41 [default=2.0];
optional float walking_driveway_factor = 42 [default=5.0];
optional float walking_step_penalty = 43 [default=30];
optional float walking_use_ferry = 44 [default=0.5];
optional float walking_use_living_streets = 45 [default=0.6];
optional float walking_use_tracks = 46 [default=0.5];
optional float walking_use_hills = 47 [default=1];
optional float walking_service_penalty = 48 [default=0];
optional float walking_service_factor = 49 [default=1];
optional int32 walking_max_hiking_difficulty = 50 [default=1];
optional bool walking_shortest = 51 [default=false];
optional bool walking_ignore_oneways = 52 [default=true];
optional float walking_destination_only_penalty = 53 [default=120];
}
enum Criteria {
Classic = 0;
Robustness = 1;
Occupancy = 2;
ArrivalStopAttractivity = 3;
DepartureStopAttractivity = 4;
// if datetime_represent = depature,
// PseudoDuration is the duration between the requested datetime and arrvival time
// if datetime_represent = arrival,
// PseudoDuration is the duration between the requested datetime and departure time
PseudoDuration = 5;
}
message JourneysRequest {
repeated LocationContext origin = 1;
repeated LocationContext destination = 2;
repeated uint64 datetimes = 3;
required bool clockwise = 4;
repeated string forbidden_uris = 5;
required int32 max_duration = 6;
required int32 max_transfers = 7;
optional StreetNetworkParams streetnetwork_params = 8;
optional bool wheelchair = 9 [default=false];
optional bool details = 13; //to be removed
optional RTLevel realtime_level = 14;
optional int32 max_extra_second_pass = 15 [default=0];
optional int32 walking_transfer_penalty = 16 [default=120];
optional int32 direct_path_duration = 17;
optional bool bike_in_pt = 18;
repeated string allowed_id = 19;
optional int32 free_radius_from = 20 [default=0]; // meters
optional int32 free_radius_to = 21 [default=0]; // meters
optional int32 min_nb_journeys = 22;
optional double night_bus_filter_max_factor = 23 [default=1.5];
optional int32 night_bus_filter_base_factor = 24 [default=900]; // seconds
optional uint32 timeframe_duration = 25; // seconds
optional int32 depth = 26 [default = 1];
optional LocationContext isochrone_center = 27; // Needed for isochrone distributed
optional int32 arrival_transfer_penalty = 28 [default=120]; // seconds
optional Criteria criteria = 29;
// inputs that are used by heuristic for am optimized/faster search
optional bool use_heuristic = 30 [default=false];
optional GeographicalCoord departure_coord = 31;
optional GeographicalCoord arrival_coord = 32;
optional float global_max_speed = 33 [default=18.0]; // max speed among all modes of transport
}
message PlacesNearbyRequest {
required string uri = 1;
required double distance = 2;
repeated NavitiaType types = 3;
required int32 depth = 4;
required int32 count = 5;
required int32 start_page = 6;
optional string filter = 7;
optional double stop_points_nearby_radius = 8;
repeated string forbidden_uris = 9;
}
message PlaceUriRequest {
required string uri = 1;
optional int32 depth = 2 [default = 1];
}
message PoiDisruptionRequest {
repeated string pois = 1;
optional uint64 since_datetime = 2;
optional uint64 until_datetime = 3;
}
message PlaceCodeRequest {
enum Type {
StopArea = 0;
Network = 1;
Company = 2;
Line = 3;
Route = 4;
VehicleJourney = 5;
StopPoint = 6;
Calendar = 7;
}
required Type type = 1;
required string type_code = 2;
required string code = 3;
}
message PTRefRequest {
required NavitiaType requested_type = 1;
required string filter = 2;
required int32 depth = 3;
required int32 start_page = 4;
required int32 count = 5;
optional OdtLevel odt_level = 8;
repeated string forbidden_uri = 6;
optional uint64 datetime = 9; // to be removed
optional uint64 since_datetime = 10;
optional uint64 until_datetime = 11;
optional bool disable_geojson = 12;
optional RTLevel realtime_level = 13;
}
message CarCO2EmissionRequest {
optional LocationContext origin = 1;
optional LocationContext destination = 2;
optional float distance = 3;
}
message DirectPathRequest {
optional LocationContext origin = 1;
optional LocationContext destination = 2;
optional uint64 datetime = 3;
required bool clockwise = 4;
optional StreetNetworkParams streetnetwork_params = 5; // still used by kraken
// Use for different streetnetwork profiles(ex bike alternatives)
repeated StreetNetworkParams profiles_params = 6; // used by asgard
optional bool use_excluded_zones = 7 [default=false]; // used by asgard solely
optional int32 default_projection_radius = 8; // used by asgard solely
}
message StreetNetworkRoutingMatrixRequest {
repeated LocationContext origins = 1;
repeated LocationContext destinations = 2;
optional string mode = 3;
optional float speed = 4;
optional int32 max_duration = 5;
optional StreetNetworkParams streetnetwork_params = 6;
optional float asgard_max_walking_duration_coeff = 7 [default=1];
optional float asgard_max_bike_duration_coeff = 8 [default=1];
optional float asgard_max_bss_duration_coeff = 9 [default=1];
optional float asgard_max_car_duration_coeff = 10 [default=1];
optional uint64 datetime = 11;
optional bool use_excluded_zones = 12 [default=false]; // used by asgard solely
optional int32 default_projection_radius = 13; // used by asgard solely
}
message MatchingRoute {
optional string line_uri = 1;
optional string start_stop_point_uri = 2;
optional string destination_code_key = 3;
optional string destination_code = 4;
}
message Request {
required API requested_api = 1;
optional PlacesRequest places = 2;
optional NextStopTimeRequest next_stop_times = 3;
optional PlacesNearbyRequest places_nearby = 4;
optional JourneysRequest journeys = 5;
optional PTRefRequest ptref = 6;
optional PlaceUriRequest place_uri = 7;
optional TrafficReportsRequest traffic_reports = 13;
optional CalendarsRequest calendars = 9;
optional PtobjectRequest pt_objects = 10;
optional PlaceCodeRequest place_code = 11;
optional NearestStopPointsRequest nearest_stop_points = 14;
optional uint64 _current_datetime = 15;
optional GraphicalIsochroneRequest isochrone = 16;
optional CarCO2EmissionRequest car_co2_emission = 17;
optional DirectPathRequest direct_path = 18;
optional HeatMapRequest heat_map = 19;
optional StreetNetworkRoutingMatrixRequest sn_routing_matrix = 20;
optional GeographicalCoord coord = 21;
optional MatchingRoute matching_routes = 23;
optional LineReportsRequest line_reports = 24;
optional string request_id = 12;
optional bool disable_feedpublisher = 22;
optional bool disable_disruption = 25 [default=false];
//after this date the request should be ignored as the caller will have timeouted
//the format of the date is: 20190101T120102,32910
//a string is used to be able to store milliseconds
optional string deadline = 26;
optional EquipmentReportsRequest equipment_reports = 27;
optional VehiclePositionsRequest vehicle_positions = 28;
optional AccessPointsRequest access_points = 29;
optional PtFaresRequest pt_fares = 30;
optional string language = 31;
optional PoiDisruptionRequest poi_disruptions = 32;
}
message NearestStopPointsRequest {
optional string place = 1;
optional string mode = 2;
optional double walking_speed = 3;
optional double bike_speed = 4;
optional double car_speed = 5;
optional double bss_speed = 6;
optional string filter = 7;
optional int32 max_duration = 8;
optional bool reverse = 9;
optional double car_no_park_speed = 10;
}
message GraphicalIsochroneRequest {
optional JourneysRequest journeys_request = 1;
repeated int32 boundary_duration = 2;
}
message HeatMapRequest {
optional JourneysRequest journeys_request = 1;
optional int32 resolution = 2;
}
message PtobjectRequest {
required string q = 1;
repeated NavitiaType types = 2;
required int32 depth = 3;
required int32 count = 4;
repeated string admin_uris = 5;
optional int32 search_type = 6;
optional bool disable_geojson = 7;
optional string filter = 8;
}
message EquipmentReportsRequest {
optional int32 depth = 1;
optional int32 start_page = 2;
optional int32 count = 3;
optional string filter = 4;
repeated string forbidden_uris = 5;
}
message AccessPointsRequest {
optional int32 depth = 1;
optional int32 start_page = 2;
optional int32 count = 3;
optional string filter = 4;
repeated string forbidden_uris = 5;
}
message VehiclePositionsRequest {
optional int32 depth = 1;
optional int32 start_page = 2;
optional int32 count = 3;
optional string filter = 4;
repeated string forbidden_uris = 5;
}
message PtFaresRequest {
message PtSection {
optional string id = 1;
optional string network_uri = 2;
optional string start_stop_area_uri = 3;
optional string end_stop_area_uri = 4;
optional string line_uri = 5;
optional uint64 begin_date_time = 6;
optional uint64 end_date_time = 7;
optional string first_stop_point_uri = 9;
optional string last_stop_point_uri = 10;
optional string physical_mode = 11;
}
message PtJourney {
optional string id = 1; // to be able to attach computed fare to journey in response.PtJourneyFare.journey_id
repeated PtSection pt_sections = 2;
}
repeated PtJourney pt_journeys = 1;
}