forked from hove-io/navitia-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype.proto
613 lines (538 loc) · 15.7 KB
/
type.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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
syntax = "proto2";
package pbnavitia;
enum NavitiaType {
LINE = 1;
JOURNEY_PATTERN = 2;
VEHICLE_JOURNEY = 3;
STOP_POINT = 4;
STOP_AREA = 5;
NETWORK = 6;
PHYSICAL_MODE = 7;
COMMERCIAL_MODE = 8;
CONNECTION = 9;
JOURNEY_PATTERN_POINT = 10;
COMPANY = 11;
ROUTE = 12;
POI = 13;
CONTRIBUTOR = 16;
ADDRESS = 18;
POITYPE = 23;
ADMINISTRATIVE_REGION = 22;
CALENDAR = 25;
LINE_GROUP = 26;
IMPACT = 27;
DATASET = 28;
TRIP = 29;
}
enum API {
places = 1;
PTREFERENTIAL = 2;
PLANNER = 4;
places_nearby = 6;
STATUS = 7;
NEXT_DEPARTURES = 8;
NEXT_ARRIVALS = 9;
DEPARTURE_BOARDS = 10;
ROUTE_SCHEDULES = 11;
ISOCHRONE = 13;
METADATAS = 14;
place_uri = 15;
UNKNOWN_API = 16;
traffic_reports = 26;
calendars = 18;
NMPLANNER = 19;
pt_objects = 20;
place_code = 21;
disruptions = 25;
nearest_stop_points = 27;
pt_planner = 28;
graphical_isochrone = 29;
geo_status = 30;
car_co2_emission = 31;
direct_path = 32;
heat_map = 33;
street_network_routing_matrix = 34;
odt_stop_points = 35;
matching_routes = 36;
line_reports = 37;
}
enum ResponseStatus{
none = 0;
no_departure_this_day = 1;
no_active_mode_this_day = 2;
no_active_circulation_this_day = 3;
terminus = 6;
date_out_of_bound = 7;
partial_terminus = 8;
ok = 9;
active_disruption = 10;
}
message Code {
required string type = 1;
required string value = 2;
}
message Period {
optional uint64 begin = 1;
optional uint64 end = 2;
}
enum ActiveStatus {
past = 0;
active = 1;
future = 2;
}
message Property {
optional string name = 1;
optional string value = 2;
}
message Channel {
enum ChannelType {
web = 1;
sms = 2;
email = 3;
mobile = 4;
notification = 5;
twitter = 6;
facebook = 7;
unknown_type = 8;
title = 9;
beacon = 10;
}
optional string id = 1;
optional string name = 2;
optional string content_type = 3;
repeated ChannelType channel_types = 4;
}
message MessageContent {
optional string text = 1;
optional Channel channel = 4;
}
//message are the old disruption, remove as soon as possible
enum MessageStatus {
information = 0;
warning = 1;
disrupt = 2;
}
message Message {
optional string uri = 1;
optional string message = 2;
optional string title = 3;
optional uint64 start_application_date = 4;
optional uint64 end_application_date = 5;
optional string start_application_daily_hour = 6;
optional string end_application_daily_hour = 7;
optional MessageStatus message_status = 8;
}
message Severity {
// copied from chaos-proto/gtfs-realtime.proto
enum Effect {
NO_SERVICE = 1;
REDUCED_SERVICE = 2;
// We don't care about INsignificant delays: they are hard to detect, have
// little impact on the user, and would clutter the results as they are too
// frequent.
SIGNIFICANT_DELAYS = 3;
DETOUR = 4;
ADDITIONAL_SERVICE = 5;
MODIFIED_SERVICE = 6;
OTHER_EFFECT = 7;
UNKNOWN_EFFECT = 8;
STOP_MOVED = 9;
}
optional string name = 1;
optional string color = 2;
optional Effect effect = 3 [default = UNKNOWN_EFFECT];
optional int32 priority = 4;
}
enum StopTimeUpdateStatus {
DELAYED = 0;
ADDED = 1;
DELETED = 2;
UNCHANGED = 3;
}
message StopTimeUpdate {
optional StopTime amended_stop_time = 1;
optional StopTime base_stop_time = 2;
optional string cause = 3;
optional StopTimeUpdateStatus effect = 4;
optional StopPoint stop_point = 5;
optional StopTimeUpdateStatus departure_status = 6;
optional StopTimeUpdateStatus arrival_status = 7;
}
message LineSectionImpact {
optional PtObject from = 1;
optional PtObject to = 2;
repeated Route routes = 3;
}
message ImpactedObject {
optional PtObject pt_object = 1;
repeated StopTimeUpdate impacted_stops = 2;
optional LineSectionImpact impacted_section = 3;
}
message DisruptionProperty {
required string key = 1;
required string type = 2;
required string value = 3;
}
message Impact {
optional string uri = 1;
optional string disruption_uri = 2;
repeated Period application_periods = 10;
optional ActiveStatus status = 11;
optional uint64 updated_at = 12;
repeated string tags = 13;
optional string cause = 14;
repeated MessageContent messages = 15;
optional Severity severity = 16;
optional string contributor = 17;
repeated ImpactedObject impacted_objects = 18;
optional string category = 19;
repeated DisruptionProperty properties = 20;
}
message GeographicalCoord {
required double lon = 1;
required double lat = 2;
}
message AdministrativeRegion {
optional string uri = 2;
optional string name = 3;
optional string zip_code = 4;
optional int32 level = 5;
optional GeographicalCoord coord = 6;
optional string label = 7;
optional string insee = 8;
repeated StopArea main_stop_areas = 9;
}
message Comment {
optional string value = 1;
optional string type = 2;
}
message StopArea {
optional string name = 3;
optional string uri = 4;
optional GeographicalCoord coord = 5;
repeated AdministrativeRegion administrative_regions = 10;
repeated StopPoint stop_points = 8;
repeated Message messages = 9;
repeated string impact_uris = 25;
repeated Comment comments = 23;
repeated Code codes = 12;
optional string timezone = 15;
optional string label = 16;
repeated CommercialMode commercial_modes = 21;
repeated PhysicalMode physical_modes = 22;
}
message StopPoint {
optional string name = 3;
repeated AdministrativeRegion administrative_regions = 10;
optional string uri = 5;
optional GeographicalCoord coord = 6;
optional StopArea stop_area = 7;
optional hasEquipments has_equipments = 8;
repeated Message messages = 9;
repeated string impact_uris = 22;
repeated Comment comments = 16;
repeated Code codes = 12;
optional Address address = 13;
optional string platform_code = 14;
optional string label = 15;
repeated CommercialMode commercial_modes = 17;
repeated PhysicalMode physical_modes = 18;
optional FareZone fare_zone = 19;
}
enum OdtLevel{
scheduled = 0;
with_stops = 1;
zonal = 2;
all = 3;
}
message LineString {
repeated GeographicalCoord coordinates = 1;
}
message MultiLineString {
repeated LineString lines = 1;
optional double length = 2;
}
message Line {
optional string name = 3;
optional string uri = 4;
optional string code = 5;
optional string color = 9;
repeated Route routes = 10;
optional CommercialMode commercial_mode = 11;
repeated PhysicalMode physical_modes = 12;
optional Network network = 13;
repeated Message messages = 14;
repeated string impact_uris = 26;
repeated Comment comments = 22;
repeated Code codes = 16;
optional MultiLineString geojson = 17;
optional uint32 opening_time = 18;
optional uint32 closing_time = 19;
repeated Property properties = 21;
repeated LineGroup line_groups = 23;
optional string text_color = 24;
}
message LineGroup {
optional string name = 1;
optional string uri = 2;
repeated Comment comments = 3;
repeated Line lines = 4;
optional Line main_line = 5;
}
message Route {
optional string name = 3;
optional string uri = 4;
optional bool is_frequence = 5;
optional Line line = 7;
repeated JourneyPattern journey_patterns = 8;
repeated Message messages = 9;
repeated string impact_uris = 18;
repeated Code codes = 10;
repeated StopPoint stop_points = 1;
optional PtObject direction = 12;
optional MultiLineString geojson = 13;
repeated PhysicalMode physical_modes = 14;
repeated Comment comments = 15;
optional string direction_type = 17;
}
message JourneyPattern {
optional string name = 3;
optional string uri = 4;
optional bool is_frequence = 5;
optional PhysicalMode physical_mode = 6;
optional Route route = 7;
repeated JourneyPatternPoint journey_pattern_points = 8;
repeated Message messages = 9;
repeated string impact_uris = 22;
}
message Destination{
required string uri = 1;
optional string destination = 2;
}
message Note{
required string uri = 1;
optional string note = 2;
}
message Properties{
enum AdditionalInformation{
pick_up_only = 1;
drop_off_only = 2;
on_demand_transport = 3;
date_time_estimated = 4;
}
repeated AdditionalInformation additional_informations= 1;
repeated Note notes = 5;
repeated CalendarException exceptions = 6;
optional Destination destination = 7;
optional string vehicle_journey_id = 8;
}
message hasEquipments{
enum Equipment{
has_wheelchair_accessibility = 1;
has_bike_accepted = 2;
has_air_conditioned = 3;
has_visual_announcement = 4;
has_audible_announcement = 5;
has_appropriate_escort = 6;
has_appropriate_signage = 7;
has_school_vehicle = 8;
has_wheelchair_boarding = 9;
has_sheltered = 10;
has_elevator = 11;
has_escalator = 12;
has_bike_depot = 13;
}
repeated Equipment has_equipments = 1;
}
message StopDateTime {
optional uint64 arrival_date_time = 1; //posix time
optional uint64 departure_date_time = 2;
optional uint64 base_arrival_date_time = 5;
optional uint64 base_departure_date_time = 6;
optional StopPoint stop_point = 3;
optional Properties properties = 4;
optional RTLevel data_freshness = 7;
optional MessageStatus departure_status = 8;
optional MessageStatus arrival_status = 9;
}
message StopTime {
optional uint64 arrival_time = 1; // Local arrival
optional uint64 utc_arrival_time = 10; // UTC arrival
optional uint64 departure_time = 3; // Local departure
optional uint64 utc_departure_time = 11; // UTC departure
optional VehicleJourney vehicle_journey = 4;
optional JourneyPatternPoint journey_pattern_point = 5;
optional bool pickup_allowed = 6;
optional bool drop_off_allowed = 7;
optional string headsign = 8;
optional StopPoint stop_point = 9;
}
message VehicleJourney {
optional string name = 3;
optional string uri = 4;
repeated StopTime stop_times = 6;
optional Route route = 7;
optional JourneyPattern journey_pattern = 8;
optional Trip trip = 9;
repeated Message messages = 10;
repeated string impact_uris = 32;
optional bool is_adapted = 11;
optional ValidityPattern validity_pattern = 12;
optional ValidityPattern adapted_validity_pattern = 13;
optional string odt_message = 14;
optional bool wheelchair_accessible = 16;
optional bool bike_accepted = 17;
optional bool air_conditioned = 18;
optional bool visual_announcement = 19;
optional bool audible_announcement = 20;
optional bool appropriate_escort = 21;
optional bool appropriate_signage = 22;
optional bool school_vehicle = 23;
repeated Comment comments = 27;
repeated Code codes = 25;
repeated Calendar calendars = 26;
}
message Trip {
optional string uri = 1;
optional string name = 2;
}
message JourneyPatternPoint{
optional string uri = 3;
optional int32 order = 4;
optional StopPoint stop_point = 5;
optional JourneyPattern journey_pattern = 6;
repeated Message messages = 7;
repeated string impact_uris = 22;
}
message Contributor {
optional string uri = 1;
optional string name = 2;
optional string website = 3;
optional string license = 4;
}
enum RTLevel {
BASE_SCHEDULE = 1;
ADAPTED_SCHEDULE = 2;
REALTIME = 3;
}
message Dataset {
required string uri = 1;
required Contributor contributor = 2;
required uint64 start_validation_date = 3;
required uint64 end_validation_date = 4;
required RTLevel realtime_level = 5;
optional string desc = 6;
optional string system = 7;
}
message PoiType {
optional string uri = 1;
optional string name = 2;
}
message Poi {
optional string uri = 3;
optional string name = 4;
optional GeographicalCoord coord = 6;
optional PoiType poi_type = 7;
repeated AdministrativeRegion administrative_regions = 10;
optional Address address = 11;
repeated Code properties = 12;
optional string label = 13;
}
message Network {
optional string uri = 3;
optional string name = 4;
repeated Message messages = 6;
repeated string impact_uris = 22;
repeated Code codes = 7;
}
message PhysicalMode {
optional string uri = 3;
optional string name = 4;
}
message CommercialMode {
optional string uri = 3;
optional string name = 4;
}
message Connection {
optional StopPoint origin = 1;
optional StopPoint destination = 2;
optional int32 duration = 3;
optional int32 display_duration = 4;
optional int32 max_duration = 5;
}
message Company {
optional string uri = 3;
optional string name = 4;
repeated Code codes = 8;
}
message Address {
optional string uri = 3;
optional string name = 4;
optional GeographicalCoord coord = 6;
repeated AdministrativeRegion administrative_regions = 10;
optional int32 house_number = 2;
optional string label = 16;
}
enum ExceptionType {
Add = 0;
Remove = 1;
}
message CalendarException {
optional string uri = 1;
optional string date = 2;
optional ExceptionType type = 3;
}
message CalendarPeriod {
optional string begin = 1;
optional string end = 2;
}
message WeekPattern {
optional bool monday = 1;
optional bool tuesday = 2;
optional bool wednesday = 3;
optional bool thursday = 4;
optional bool friday = 5;
optional bool saturday = 6;
optional bool sunday = 7;
}
message Calendar{
optional string uri = 1;
optional string name = 2;
optional WeekPattern week_pattern = 3;
repeated CalendarPeriod active_periods = 4;
repeated CalendarException exceptions = 5;
optional ValidityPattern validity_pattern = 6;
}
message ValidityPattern {
optional string beginning_date = 1;
optional string days = 2;
}
message LocationContext {
required string place = 1;
required int32 access_duration = 2;
}
message PtObject {
required string name = 1;
required string uri = 2;
optional NavitiaType embedded_type = 3;
optional StopArea stop_area = 4;
optional Poi poi = 5;
optional StopPoint stop_point = 6;
optional Address address = 7;
optional Line line = 9;
optional Network network = 10;
optional CommercialMode commercial_mode = 11;
optional Route route = 12;
optional AdministrativeRegion administrative_region = 13;
optional int32 distance = 14;
optional int32 quality = 15;
optional Company company = 16;
optional VehicleJourney vehicle_journey = 17;
optional Calendar calendar = 18;
optional int32 score = 19; // DEPRECATED
optional Trip trip = 20;
repeated int32 scores = 21;
}
message FareZone {
optional string name = 1;
}