-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathresponse.proto
More file actions
196 lines (163 loc) · 4.61 KB
/
response.proto
File metadata and controls
196 lines (163 loc) · 4.61 KB
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
message Error {
enum ErrorId {
ITINERARY_FOUND = 1;
DATE_OUT_OF_BOUNDS = 2;
NO_ORIGIN_POINT = 3;
NO_DESTINATION_POINT = 4;
NO_ORIGIN_NOR_DESTINATION_POINT = 5;
NO_SOLUTION = 7;
UNKNOWN_URI = 10;
SERVICE_UNAVAILABLE = 11;
CORRUPTED_REQUEST = 12;
}
optional ErrorId id = 1;
optional string detailed_message = 2;
}
message GeographicalCoord {
required double lon = 1;
required double lat = 2;
}
enum SectionType {
PUBLIC_TRANSPORT = 1;
STREET_NETWORK = 2;
WAITING = 3;
TRANSFER = 4;
// Airplanes, ferries, border control for eurostar…
// Time to get from the station to the vehicle
BOARDING = 6;
LANDING = 7;
// Bicycle share system
BSS_RENT = 8;
BSS_PUT_BACK = 9;
}
enum TransferType {
WALKING = 1;
GUARANTEED = 2;
// Interlining
STAY_IN = 3;
}
enum VehicleJourneyType{
regular = 0; // ligne régulière
virtual_with_stop_time = 1; // TAD virtuel avec horaires
virtual_without_stop_time = 2; // TAD virtuel sans horaires
stop_point_to_stop_point = 3; // TAD rabattement arrêt à arrêt
address_to_stop_point = 4; // TAD rabattement adresse à arrêt
odt_point_to_point = 5; // TAD point à point (Commune à Commune)
//regular = 0;
//odt_with_stop_time = 1;
//odt_with_zone = 2;
}
message StopPoint {
optional string name = 3;
optional string uri = 5;
optional GeographicalCoord coord = 6;
optional string platform_code = 14;
}
message Place {
required string name = 1;
required string uri = 2;
optional StopPoint stop_point = 6;
}
message PathItem {
optional string name = 1;
optional double length = 2;
optional int32 direction = 3;
optional double duration = 4;
}
enum StreetNetworkMode {
WALK = 0;
BIKE = 1;
CAR = 3;
BIKE_SHARE = 4;
// Car sharing?
// Various car modes: park’n’ride kiss’n’ride…
}
message StreetNetwork {
optional StreetNetworkMode mode = 3;
repeated PathItem path_items = 4;
}
// Leg? Look at transmodel
message Section {
optional SectionType type = 1;
optional Place origin = 2;
optional Place destination = 3;
optional VehicleJourney vehicle_journey = 9;
optional StreetNetwork street_network = 12;
optional TransferType transfer_type = 13;
repeated GeographicalCoord polyline = 14;
optional int32 duration = 15;
// Timezones?
optional int32 begin_date_time = 16;
optional int32 end_date_time = 17;
optional int32 length = 19;
// Can be used for fare computation
optional string id = 20;
}
message Journey {
optional int32 nb_transfers = 2;
// Timezones?
optional int32 departure_date_time = 3;
optional int32 arrival_date_time = 4;
repeated Section sections = 6;
optional Place origin = 7;
optional Place destination = 8;
}
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;
}
message JourneyPatternPoint{
optional string uri = 3;
optional int32 order = 4;
optional StopPoint stop_point = 5;
optional JourneyPattern journey_pattern = 6;
}
message Response {
// required API requested_api = 1;
optional Error error = 2;
repeated Journey journey_response = 3;
}
message PhysicalMode {
optional string uri = 3;
optional string name = 4;
repeated CommercialMode commercial_modes = 5;
}
message CommercialMode {
optional string uri = 3;
optional string name = 4;
repeated PhysicalMode physical_modes = 5;
}
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_mode = 12;
}
message Route {
optional string name = 3;
optional string uri = 4;
optional bool is_frequence = 5;
optional Line line = 7;
repeated JourneyPattern journey_patterns = 8;
}
message StopTime {
optional string arrival_time = 1;
optional string departure_time = 3;
optional VehicleJourney vehicle_journey = 4;
optional JourneyPatternPoint journey_pattern_point = 5;
optional bool pickup_allowed = 6;
optional bool drop_off_allowed = 7;
}
message VehicleJourney {
optional string name = 3;
optional string uri = 4;
repeated StopTime stop_times = 6;
optional JourneyPattern journey_pattern = 8;
}