xref: /aosp_15_r20/external/googleapis/google/maps/routes/v1/route.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2022 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.maps.routes.v1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/geo/type/viewport.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routes/v1/polyline.proto";
21*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routes/v1/waypoint.proto";
22*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/duration.proto";
23*d5c09012SAndroid Build Coastguard Workerimport "google/type/money.proto";
24*d5c09012SAndroid Build Coastguard Worker
25*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
26*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Maps.Routes.V1";
27*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/maps/routes/apiv1/routespb;routespb";
28*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
29*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "RouteProto";
30*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.maps.routes.v1";
31*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GMRS";
32*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Maps\\Routes\\V1";
33*d5c09012SAndroid Build Coastguard Worker
34*d5c09012SAndroid Build Coastguard Worker// Encapsulates a route, which consists of a series of connected road segments
35*d5c09012SAndroid Build Coastguard Worker// that join beginning, ending, and intermediate waypoints.
36*d5c09012SAndroid Build Coastguard Workermessage Route {
37*d5c09012SAndroid Build Coastguard Worker  // A collection of legs (path segments between waypoints) that make-up the
38*d5c09012SAndroid Build Coastguard Worker  // route. Each leg corresponds to the trip between two non-`via` Waypoints.
39*d5c09012SAndroid Build Coastguard Worker  // For example, a route with no intermediate waypoints has only one leg. A
40*d5c09012SAndroid Build Coastguard Worker  // route that includes one non-`via` intermediate waypoint has two legs. A
41*d5c09012SAndroid Build Coastguard Worker  // route that includes one `via` intermediate waypoint has one leg. The order
42*d5c09012SAndroid Build Coastguard Worker  // of the legs matches the order of Waypoints from `origin` to `intermediates`
43*d5c09012SAndroid Build Coastguard Worker  // to `destination`.
44*d5c09012SAndroid Build Coastguard Worker  repeated RouteLeg legs = 1;
45*d5c09012SAndroid Build Coastguard Worker
46*d5c09012SAndroid Build Coastguard Worker  // The travel distance of the route, in meters.
47*d5c09012SAndroid Build Coastguard Worker  int32 distance_meters = 2;
48*d5c09012SAndroid Build Coastguard Worker
49*d5c09012SAndroid Build Coastguard Worker  // The length of time needed to navigate the route. If you set the
50*d5c09012SAndroid Build Coastguard Worker  // `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
51*d5c09012SAndroid Build Coastguard Worker  // `static_duration`. If you set the `routing_preference` to either
52*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
53*d5c09012SAndroid Build Coastguard Worker  // taking traffic conditions into account.
54*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration duration = 3;
55*d5c09012SAndroid Build Coastguard Worker
56*d5c09012SAndroid Build Coastguard Worker  // The duration of traveling through the route without taking traffic
57*d5c09012SAndroid Build Coastguard Worker  // conditions into consideration.
58*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration static_duration = 4;
59*d5c09012SAndroid Build Coastguard Worker
60*d5c09012SAndroid Build Coastguard Worker  // The overall route polyline. This polyline will be the combined polyline of
61*d5c09012SAndroid Build Coastguard Worker  // all `legs`.
62*d5c09012SAndroid Build Coastguard Worker  Polyline polyline = 5;
63*d5c09012SAndroid Build Coastguard Worker
64*d5c09012SAndroid Build Coastguard Worker  // A description of the route.
65*d5c09012SAndroid Build Coastguard Worker  string description = 6;
66*d5c09012SAndroid Build Coastguard Worker
67*d5c09012SAndroid Build Coastguard Worker  // An array of warnings to show when displaying the route.
68*d5c09012SAndroid Build Coastguard Worker  repeated string warnings = 7;
69*d5c09012SAndroid Build Coastguard Worker
70*d5c09012SAndroid Build Coastguard Worker  // The viewport bounding box of the polyline.
71*d5c09012SAndroid Build Coastguard Worker  google.geo.type.Viewport viewport = 8;
72*d5c09012SAndroid Build Coastguard Worker
73*d5c09012SAndroid Build Coastguard Worker  // Additional information about the route.
74*d5c09012SAndroid Build Coastguard Worker  RouteTravelAdvisory travel_advisory = 9;
75*d5c09012SAndroid Build Coastguard Worker
76*d5c09012SAndroid Build Coastguard Worker  // If ComputeRoutesRequest.optimize_waypoint_order is set to true, this field
77*d5c09012SAndroid Build Coastguard Worker  // contains the optimized ordering of intermediates waypoints.
78*d5c09012SAndroid Build Coastguard Worker  // otherwise, this field is empty.
79*d5c09012SAndroid Build Coastguard Worker  // For example, suppose the input is Origin: LA; Intermediates: Dallas,
80*d5c09012SAndroid Build Coastguard Worker  // Bangor, Phoenix;  Destination: New York; and the optimized intermediate
81*d5c09012SAndroid Build Coastguard Worker  // waypoint order is:  Phoenix, Dallas, Bangor. Then this field contains the
82*d5c09012SAndroid Build Coastguard Worker  // values [2, 0, 1]. The index starts with 0 for the first intermediate
83*d5c09012SAndroid Build Coastguard Worker  // waypoint.
84*d5c09012SAndroid Build Coastguard Worker  repeated int32 optimized_intermediate_waypoint_index = 10;
85*d5c09012SAndroid Build Coastguard Worker}
86*d5c09012SAndroid Build Coastguard Worker
87*d5c09012SAndroid Build Coastguard Worker// Encapsulates the additional information that the user should be informed
88*d5c09012SAndroid Build Coastguard Worker// about, such as possible traffic zone restriction etc.
89*d5c09012SAndroid Build Coastguard Workermessage RouteTravelAdvisory {
90*d5c09012SAndroid Build Coastguard Worker  // The traffic restriction that applies to the route. A vehicle that is
91*d5c09012SAndroid Build Coastguard Worker  // subject to the restriction is not allowed to travel on the route. As of
92*d5c09012SAndroid Build Coastguard Worker  // October 2019, only Jakarta, Indonesia takes into consideration.
93*d5c09012SAndroid Build Coastguard Worker  TrafficRestriction traffic_restriction = 1;
94*d5c09012SAndroid Build Coastguard Worker
95*d5c09012SAndroid Build Coastguard Worker  // Encapsulates information about tolls on the Route.
96*d5c09012SAndroid Build Coastguard Worker  // This field is only populated if we expect there are tolls on the Route.
97*d5c09012SAndroid Build Coastguard Worker  // If this field is set but the estimated_price subfield is not populated,
98*d5c09012SAndroid Build Coastguard Worker  // we expect that road contains tolls but we do not know an estimated price.
99*d5c09012SAndroid Build Coastguard Worker  // If this field is not set, then we expect there is no toll on the Route.
100*d5c09012SAndroid Build Coastguard Worker  TollInfo toll_info = 2;
101*d5c09012SAndroid Build Coastguard Worker
102*d5c09012SAndroid Build Coastguard Worker  // Speed reading intervals detailing traffic density. Applicable in case of
103*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
104*d5c09012SAndroid Build Coastguard Worker  // The intervals cover the entire polyline of the route without overlap.
105*d5c09012SAndroid Build Coastguard Worker  // The start point of a specified interval is the same as the end point of the
106*d5c09012SAndroid Build Coastguard Worker  // preceding interval.
107*d5c09012SAndroid Build Coastguard Worker  //
108*d5c09012SAndroid Build Coastguard Worker  // Example:
109*d5c09012SAndroid Build Coastguard Worker  //
110*d5c09012SAndroid Build Coastguard Worker  //     polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
111*d5c09012SAndroid Build Coastguard Worker  //     speed_reading_intervals: [A,C), [C,D), [D,G).
112*d5c09012SAndroid Build Coastguard Worker  repeated SpeedReadingInterval speed_reading_intervals = 3;
113*d5c09012SAndroid Build Coastguard Worker
114*d5c09012SAndroid Build Coastguard Worker  // Information related to the custom layer data that the customer specified
115*d5c09012SAndroid Build Coastguard Worker  // (e.g. time spent in a customer specified area).
116*d5c09012SAndroid Build Coastguard Worker  CustomLayerInfo custom_layer_info = 4;
117*d5c09012SAndroid Build Coastguard Worker}
118*d5c09012SAndroid Build Coastguard Worker
119*d5c09012SAndroid Build Coastguard Worker// Encapsulates the additional information that the user should be informed
120*d5c09012SAndroid Build Coastguard Worker// about, such as possible traffic zone restriction etc. on a route leg.
121*d5c09012SAndroid Build Coastguard Workermessage RouteLegTravelAdvisory {
122*d5c09012SAndroid Build Coastguard Worker  // Encapsulates information about tolls on the specific RouteLeg.
123*d5c09012SAndroid Build Coastguard Worker  // This field is only populated if we expect there are tolls on the RouteLeg.
124*d5c09012SAndroid Build Coastguard Worker  // If this field is set but the estimated_price subfield is not populated,
125*d5c09012SAndroid Build Coastguard Worker  // we expect that road contains tolls but we do not know an estimated price.
126*d5c09012SAndroid Build Coastguard Worker  // If this field does not exist, then there is no toll on the RouteLeg.
127*d5c09012SAndroid Build Coastguard Worker  TollInfo toll_info = 1;
128*d5c09012SAndroid Build Coastguard Worker
129*d5c09012SAndroid Build Coastguard Worker  // Speed reading intervals detailing traffic density. Applicable in case of
130*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
131*d5c09012SAndroid Build Coastguard Worker  // The intervals cover the entire polyline of the RouteLg without overlap.
132*d5c09012SAndroid Build Coastguard Worker  // The start point of a specified interval is the same as the end point of the
133*d5c09012SAndroid Build Coastguard Worker  // preceding interval.
134*d5c09012SAndroid Build Coastguard Worker  //
135*d5c09012SAndroid Build Coastguard Worker  // Example:
136*d5c09012SAndroid Build Coastguard Worker  //
137*d5c09012SAndroid Build Coastguard Worker  //     polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
138*d5c09012SAndroid Build Coastguard Worker  //     speed_reading_intervals: [A,C), [C,D), [D,G).
139*d5c09012SAndroid Build Coastguard Worker  repeated SpeedReadingInterval speed_reading_intervals = 2;
140*d5c09012SAndroid Build Coastguard Worker
141*d5c09012SAndroid Build Coastguard Worker  // Information related to the custom layer data that the customer specified
142*d5c09012SAndroid Build Coastguard Worker  // (e.g. time spent in a customer specified area).
143*d5c09012SAndroid Build Coastguard Worker  CustomLayerInfo custom_layer_info = 3;
144*d5c09012SAndroid Build Coastguard Worker}
145*d5c09012SAndroid Build Coastguard Worker
146*d5c09012SAndroid Build Coastguard Worker// Encapsulates the additional information that the user should be informed
147*d5c09012SAndroid Build Coastguard Worker// about, such as possible traffic zone restriction on a leg step.
148*d5c09012SAndroid Build Coastguard Workermessage RouteLegStepTravelAdvisory {
149*d5c09012SAndroid Build Coastguard Worker  // Speed reading intervals detailing traffic density. Applicable in case of
150*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
151*d5c09012SAndroid Build Coastguard Worker  // The intervals cover the entire polyline of the RouteLegStep without
152*d5c09012SAndroid Build Coastguard Worker  // overlap. The start point of a specified interval is the same as the end
153*d5c09012SAndroid Build Coastguard Worker  // point of the preceding interval.
154*d5c09012SAndroid Build Coastguard Worker  //
155*d5c09012SAndroid Build Coastguard Worker  // Example:
156*d5c09012SAndroid Build Coastguard Worker  //
157*d5c09012SAndroid Build Coastguard Worker  //     polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
158*d5c09012SAndroid Build Coastguard Worker  //     speed_reading_intervals: [A,C), [C,D), [D,G).
159*d5c09012SAndroid Build Coastguard Worker  repeated SpeedReadingInterval speed_reading_intervals = 1;
160*d5c09012SAndroid Build Coastguard Worker}
161*d5c09012SAndroid Build Coastguard Worker
162*d5c09012SAndroid Build Coastguard Worker// Encapsulates the traffic restriction applied to the route. As of October
163*d5c09012SAndroid Build Coastguard Worker// 2019, only Jakarta, Indonesia takes into consideration.
164*d5c09012SAndroid Build Coastguard Workermessage TrafficRestriction {
165*d5c09012SAndroid Build Coastguard Worker  // The restriction based on the vehicle's license plate last character. If
166*d5c09012SAndroid Build Coastguard Worker  // this field does not exist, then no restriction on route.
167*d5c09012SAndroid Build Coastguard Worker  LicensePlateLastCharacterRestriction
168*d5c09012SAndroid Build Coastguard Worker      license_plate_last_character_restriction = 1;
169*d5c09012SAndroid Build Coastguard Worker}
170*d5c09012SAndroid Build Coastguard Worker
171*d5c09012SAndroid Build Coastguard Worker// Encapsulates the license plate last character restriction.
172*d5c09012SAndroid Build Coastguard Workermessage LicensePlateLastCharacterRestriction {
173*d5c09012SAndroid Build Coastguard Worker  // The allowed last character of a license plate of a vehicle. Only vehicles
174*d5c09012SAndroid Build Coastguard Worker  // whose license plate's last characters match these are allowed to travel on
175*d5c09012SAndroid Build Coastguard Worker  // the route. If empty, no vehicle is allowed.
176*d5c09012SAndroid Build Coastguard Worker  repeated string allowed_last_characters = 1;
177*d5c09012SAndroid Build Coastguard Worker}
178*d5c09012SAndroid Build Coastguard Worker
179*d5c09012SAndroid Build Coastguard Worker// Encapsulates a segment between non-`via` waypoints.
180*d5c09012SAndroid Build Coastguard Workermessage RouteLeg {
181*d5c09012SAndroid Build Coastguard Worker  // The travel distance of the route leg, in meters.
182*d5c09012SAndroid Build Coastguard Worker  int32 distance_meters = 1;
183*d5c09012SAndroid Build Coastguard Worker
184*d5c09012SAndroid Build Coastguard Worker  // The length of time needed to navigate the leg. If the `route_preference`
185*d5c09012SAndroid Build Coastguard Worker  // is set to `TRAFFIC_UNAWARE`, then this value is the same as
186*d5c09012SAndroid Build Coastguard Worker  // `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
187*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
188*d5c09012SAndroid Build Coastguard Worker  // conditions into account.
189*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration duration = 2;
190*d5c09012SAndroid Build Coastguard Worker
191*d5c09012SAndroid Build Coastguard Worker  // The duration of traveling through the leg, calculated without taking
192*d5c09012SAndroid Build Coastguard Worker  // traffic conditions into consideration.
193*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration static_duration = 3;
194*d5c09012SAndroid Build Coastguard Worker
195*d5c09012SAndroid Build Coastguard Worker  // The overall polyline for this leg. This includes that each `step`'s
196*d5c09012SAndroid Build Coastguard Worker  // polyline.
197*d5c09012SAndroid Build Coastguard Worker  Polyline polyline = 4;
198*d5c09012SAndroid Build Coastguard Worker
199*d5c09012SAndroid Build Coastguard Worker  // The start location of this leg. This might be different from the provided
200*d5c09012SAndroid Build Coastguard Worker  // `origin`. For example, when the provided `origin` is not near a road, this
201*d5c09012SAndroid Build Coastguard Worker  // is a point on the road.
202*d5c09012SAndroid Build Coastguard Worker  Location start_location = 5;
203*d5c09012SAndroid Build Coastguard Worker
204*d5c09012SAndroid Build Coastguard Worker  // The end location of this leg. This might be different from the provided
205*d5c09012SAndroid Build Coastguard Worker  // `destination`. For example, when the provided `destination` is not near a
206*d5c09012SAndroid Build Coastguard Worker  // road, this is a point on the road.
207*d5c09012SAndroid Build Coastguard Worker  Location end_location = 6;
208*d5c09012SAndroid Build Coastguard Worker
209*d5c09012SAndroid Build Coastguard Worker  // An array of steps denoting segments within this leg. Each step represents
210*d5c09012SAndroid Build Coastguard Worker  // one navigation instruction.
211*d5c09012SAndroid Build Coastguard Worker  repeated RouteLegStep steps = 7;
212*d5c09012SAndroid Build Coastguard Worker
213*d5c09012SAndroid Build Coastguard Worker  // Encapsulates the additional information that the user should be informed
214*d5c09012SAndroid Build Coastguard Worker  // about, such as possible traffic zone restriction etc. on a route leg.
215*d5c09012SAndroid Build Coastguard Worker  RouteLegTravelAdvisory travel_advisory = 8;
216*d5c09012SAndroid Build Coastguard Worker}
217*d5c09012SAndroid Build Coastguard Worker
218*d5c09012SAndroid Build Coastguard Worker// Encapsulates toll information on a `Route` or on a `RouteLeg`.
219*d5c09012SAndroid Build Coastguard Workermessage TollInfo {
220*d5c09012SAndroid Build Coastguard Worker  // The monetary amount of tolls for the corresponding Route or RouteLeg.
221*d5c09012SAndroid Build Coastguard Worker  // This list contains a money amount for each currency that is expected
222*d5c09012SAndroid Build Coastguard Worker  // to be charged by the toll stations. Typically this list will contain only
223*d5c09012SAndroid Build Coastguard Worker  // one item for routes with tolls in one currency. For international trips,
224*d5c09012SAndroid Build Coastguard Worker  // this list may contain multiple items to reflect tolls in different
225*d5c09012SAndroid Build Coastguard Worker  // currencies.
226*d5c09012SAndroid Build Coastguard Worker  repeated google.type.Money estimated_price = 1;
227*d5c09012SAndroid Build Coastguard Worker}
228*d5c09012SAndroid Build Coastguard Worker
229*d5c09012SAndroid Build Coastguard Worker// Encapsulates a segment of a `RouteLeg`. A step corresponds to a single
230*d5c09012SAndroid Build Coastguard Worker// navigation instruction. Route legs are made up of steps.
231*d5c09012SAndroid Build Coastguard Workermessage RouteLegStep {
232*d5c09012SAndroid Build Coastguard Worker  // The travel distance of this step, in meters. In some circumstances, this
233*d5c09012SAndroid Build Coastguard Worker  // field might not have a value.
234*d5c09012SAndroid Build Coastguard Worker  int32 distance_meters = 1;
235*d5c09012SAndroid Build Coastguard Worker
236*d5c09012SAndroid Build Coastguard Worker  // The duration of travel through this step without taking traffic conditions
237*d5c09012SAndroid Build Coastguard Worker  // into consideration. In some circumstances, this field might not have a
238*d5c09012SAndroid Build Coastguard Worker  // value.
239*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration static_duration = 2;
240*d5c09012SAndroid Build Coastguard Worker
241*d5c09012SAndroid Build Coastguard Worker  // The polyline associated with this step.
242*d5c09012SAndroid Build Coastguard Worker  Polyline polyline = 3;
243*d5c09012SAndroid Build Coastguard Worker
244*d5c09012SAndroid Build Coastguard Worker  // The start location of this step.
245*d5c09012SAndroid Build Coastguard Worker  Location start_location = 4;
246*d5c09012SAndroid Build Coastguard Worker
247*d5c09012SAndroid Build Coastguard Worker  // The end location of this step.
248*d5c09012SAndroid Build Coastguard Worker  Location end_location = 5;
249*d5c09012SAndroid Build Coastguard Worker
250*d5c09012SAndroid Build Coastguard Worker  // Navigation instructions.
251*d5c09012SAndroid Build Coastguard Worker  NavigationInstruction navigation_instruction = 6;
252*d5c09012SAndroid Build Coastguard Worker
253*d5c09012SAndroid Build Coastguard Worker  // Encapsulates the additional information that the user should be informed
254*d5c09012SAndroid Build Coastguard Worker  // about, such as possible traffic zone restriction on a leg step.
255*d5c09012SAndroid Build Coastguard Worker  RouteLegStepTravelAdvisory travel_advisory = 7;
256*d5c09012SAndroid Build Coastguard Worker}
257*d5c09012SAndroid Build Coastguard Worker
258*d5c09012SAndroid Build Coastguard Workermessage NavigationInstruction {
259*d5c09012SAndroid Build Coastguard Worker  // Encapsulates the navigation instructions for the current step (e.g., turn
260*d5c09012SAndroid Build Coastguard Worker  // left, merge, straight, etc.). This field determines which icon to display.
261*d5c09012SAndroid Build Coastguard Worker  Maneuver maneuver = 1;
262*d5c09012SAndroid Build Coastguard Worker
263*d5c09012SAndroid Build Coastguard Worker  // Instructions for navigating this step.
264*d5c09012SAndroid Build Coastguard Worker  string instructions = 2;
265*d5c09012SAndroid Build Coastguard Worker}
266*d5c09012SAndroid Build Coastguard Worker
267*d5c09012SAndroid Build Coastguard Worker// A set of values that specify the navigation action to take for the current
268*d5c09012SAndroid Build Coastguard Worker// step (e.g., turn left, merge, straight, etc.).
269*d5c09012SAndroid Build Coastguard Workerenum Maneuver {
270*d5c09012SAndroid Build Coastguard Worker  // Not used.
271*d5c09012SAndroid Build Coastguard Worker  MANEUVER_UNSPECIFIED = 0;
272*d5c09012SAndroid Build Coastguard Worker
273*d5c09012SAndroid Build Coastguard Worker  // Turn slightly to the left.
274*d5c09012SAndroid Build Coastguard Worker  TURN_SLIGHT_LEFT = 1;
275*d5c09012SAndroid Build Coastguard Worker
276*d5c09012SAndroid Build Coastguard Worker  // Turn sharply to the left.
277*d5c09012SAndroid Build Coastguard Worker  TURN_SHARP_LEFT = 2;
278*d5c09012SAndroid Build Coastguard Worker
279*d5c09012SAndroid Build Coastguard Worker  // Make a left u-turn.
280*d5c09012SAndroid Build Coastguard Worker  UTURN_LEFT = 3;
281*d5c09012SAndroid Build Coastguard Worker
282*d5c09012SAndroid Build Coastguard Worker  // Turn left.
283*d5c09012SAndroid Build Coastguard Worker  TURN_LEFT = 4;
284*d5c09012SAndroid Build Coastguard Worker
285*d5c09012SAndroid Build Coastguard Worker  // Turn slightly to the right.
286*d5c09012SAndroid Build Coastguard Worker  TURN_SLIGHT_RIGHT = 5;
287*d5c09012SAndroid Build Coastguard Worker
288*d5c09012SAndroid Build Coastguard Worker  // Turn sharply to the right.
289*d5c09012SAndroid Build Coastguard Worker  TURN_SHARP_RIGHT = 6;
290*d5c09012SAndroid Build Coastguard Worker
291*d5c09012SAndroid Build Coastguard Worker  // Make a right u-turn.
292*d5c09012SAndroid Build Coastguard Worker  UTURN_RIGHT = 7;
293*d5c09012SAndroid Build Coastguard Worker
294*d5c09012SAndroid Build Coastguard Worker  // Turn right.
295*d5c09012SAndroid Build Coastguard Worker  TURN_RIGHT = 8;
296*d5c09012SAndroid Build Coastguard Worker
297*d5c09012SAndroid Build Coastguard Worker  // Go straight.
298*d5c09012SAndroid Build Coastguard Worker  STRAIGHT = 9;
299*d5c09012SAndroid Build Coastguard Worker
300*d5c09012SAndroid Build Coastguard Worker  // Take the left ramp.
301*d5c09012SAndroid Build Coastguard Worker  RAMP_LEFT = 10;
302*d5c09012SAndroid Build Coastguard Worker
303*d5c09012SAndroid Build Coastguard Worker  // Take the right ramp.
304*d5c09012SAndroid Build Coastguard Worker  RAMP_RIGHT = 11;
305*d5c09012SAndroid Build Coastguard Worker
306*d5c09012SAndroid Build Coastguard Worker  // Merge into traffic.
307*d5c09012SAndroid Build Coastguard Worker  MERGE = 12;
308*d5c09012SAndroid Build Coastguard Worker
309*d5c09012SAndroid Build Coastguard Worker  // Take the left fork.
310*d5c09012SAndroid Build Coastguard Worker  FORK_LEFT = 13;
311*d5c09012SAndroid Build Coastguard Worker
312*d5c09012SAndroid Build Coastguard Worker  // Take the right fork.
313*d5c09012SAndroid Build Coastguard Worker  FORK_RIGHT = 14;
314*d5c09012SAndroid Build Coastguard Worker
315*d5c09012SAndroid Build Coastguard Worker  // Take the ferry.
316*d5c09012SAndroid Build Coastguard Worker  FERRY = 15;
317*d5c09012SAndroid Build Coastguard Worker
318*d5c09012SAndroid Build Coastguard Worker  // Take the train leading onto the ferry.
319*d5c09012SAndroid Build Coastguard Worker  FERRY_TRAIN = 16;
320*d5c09012SAndroid Build Coastguard Worker
321*d5c09012SAndroid Build Coastguard Worker  // Turn left at the roundabout.
322*d5c09012SAndroid Build Coastguard Worker  ROUNDABOUT_LEFT = 17;
323*d5c09012SAndroid Build Coastguard Worker
324*d5c09012SAndroid Build Coastguard Worker  // Turn right at the roundabout.
325*d5c09012SAndroid Build Coastguard Worker  ROUNDABOUT_RIGHT = 18;
326*d5c09012SAndroid Build Coastguard Worker}
327*d5c09012SAndroid Build Coastguard Worker
328*d5c09012SAndroid Build Coastguard Worker// Traffic density indicator on a contiguous segment of a polyline or path.
329*d5c09012SAndroid Build Coastguard Worker// Given a path with points P_0, P_1, ... , P_N (zero-based index), the
330*d5c09012SAndroid Build Coastguard Worker// SpeedReadingInterval defines an interval and describes its traffic using the
331*d5c09012SAndroid Build Coastguard Worker// following categories.
332*d5c09012SAndroid Build Coastguard Workermessage SpeedReadingInterval {
333*d5c09012SAndroid Build Coastguard Worker  // The classification of polyline speed based on traffic data.
334*d5c09012SAndroid Build Coastguard Worker  enum Speed {
335*d5c09012SAndroid Build Coastguard Worker    // Default value. This value is unused.
336*d5c09012SAndroid Build Coastguard Worker    SPEED_UNSPECIFIED = 0;
337*d5c09012SAndroid Build Coastguard Worker
338*d5c09012SAndroid Build Coastguard Worker    // Normal speed, no slowdown is detected.
339*d5c09012SAndroid Build Coastguard Worker    NORMAL = 1;
340*d5c09012SAndroid Build Coastguard Worker
341*d5c09012SAndroid Build Coastguard Worker    // Slowdown detected, but no traffic jam formed.
342*d5c09012SAndroid Build Coastguard Worker    SLOW = 2;
343*d5c09012SAndroid Build Coastguard Worker
344*d5c09012SAndroid Build Coastguard Worker    // Traffic jam detected.
345*d5c09012SAndroid Build Coastguard Worker    TRAFFIC_JAM = 3;
346*d5c09012SAndroid Build Coastguard Worker  }
347*d5c09012SAndroid Build Coastguard Worker
348*d5c09012SAndroid Build Coastguard Worker  // The starting index of this interval in the polyline.
349*d5c09012SAndroid Build Coastguard Worker  // In JSON, when the index is 0, the field appears to be unpopulated.
350*d5c09012SAndroid Build Coastguard Worker  int32 start_polyline_point_index = 1;
351*d5c09012SAndroid Build Coastguard Worker
352*d5c09012SAndroid Build Coastguard Worker  // The ending index of this interval in the polyline.
353*d5c09012SAndroid Build Coastguard Worker  // In JSON, when the index is 0, the field appears to be unpopulated.
354*d5c09012SAndroid Build Coastguard Worker  int32 end_polyline_point_index = 2;
355*d5c09012SAndroid Build Coastguard Worker
356*d5c09012SAndroid Build Coastguard Worker  // Traffic speed in this interval.
357*d5c09012SAndroid Build Coastguard Worker  Speed speed = 3;
358*d5c09012SAndroid Build Coastguard Worker}
359*d5c09012SAndroid Build Coastguard Worker
360*d5c09012SAndroid Build Coastguard Worker// Encapsulates statistics about the time spent and distance travelled in a
361*d5c09012SAndroid Build Coastguard Worker// custom area.
362*d5c09012SAndroid Build Coastguard Workermessage CustomLayerInfo {
363*d5c09012SAndroid Build Coastguard Worker  // Encapsulates areas related information on a `Route` or on a `RouteLeg`.
364*d5c09012SAndroid Build Coastguard Worker  message AreaInfo {
365*d5c09012SAndroid Build Coastguard Worker    // ID of an area inside a customer provided dataset. An area represents a
366*d5c09012SAndroid Build Coastguard Worker    // collection of polygons on the map that are of concern to the customer.
367*d5c09012SAndroid Build Coastguard Worker    // For example, the customer may be interested in knowing whether a
368*d5c09012SAndroid Build Coastguard Worker    // returned route is traveling through multiple busy city blocks during
369*d5c09012SAndroid Build Coastguard Worker    // a predefined period of time. An area ID is unique within a single
370*d5c09012SAndroid Build Coastguard Worker    // dataset uploaded by a customer. That is, a (customer_id, dataset_id,
371*d5c09012SAndroid Build Coastguard Worker    // area_id) triplet should uniquely identify a set of polygons on the map
372*d5c09012SAndroid Build Coastguard Worker    // that "activates" following a common schedule.
373*d5c09012SAndroid Build Coastguard Worker    string area_id = 1;
374*d5c09012SAndroid Build Coastguard Worker
375*d5c09012SAndroid Build Coastguard Worker    // Total distance traveled in the area (in meters).
376*d5c09012SAndroid Build Coastguard Worker    float distance_in_area_meters = 2;
377*d5c09012SAndroid Build Coastguard Worker
378*d5c09012SAndroid Build Coastguard Worker    // Total time spent in the area.
379*d5c09012SAndroid Build Coastguard Worker    google.protobuf.Duration duration_in_area = 3;
380*d5c09012SAndroid Build Coastguard Worker  }
381*d5c09012SAndroid Build Coastguard Worker
382*d5c09012SAndroid Build Coastguard Worker  // Encapsulates information about areas in the custom layer on the Route.
383*d5c09012SAndroid Build Coastguard Worker  // This field is only populated if a route travels through areas in the
384*d5c09012SAndroid Build Coastguard Worker  // custom layer.
385*d5c09012SAndroid Build Coastguard Worker  repeated AreaInfo area_info = 1;
386*d5c09012SAndroid Build Coastguard Worker}
387