xref: /aosp_15_r20/external/googleapis/google/maps/routing/v2/route.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 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.routing.v2;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/geo/type/viewport.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/localized_time.proto";
21*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/location.proto";
22*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/navigation_instruction.proto";
23*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/polyline.proto";
24*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/route_label.proto";
25*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/route_travel_mode.proto";
26*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/speed_reading_interval.proto";
27*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/toll_info.proto";
28*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/transit.proto";
29*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/duration.proto";
30*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto";
31*d5c09012SAndroid Build Coastguard Workerimport "google/type/localized_text.proto";
32*d5c09012SAndroid Build Coastguard Workerimport "google/type/money.proto";
33*d5c09012SAndroid Build Coastguard Worker
34*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
35*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Maps.Routing.V2";
36*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
37*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
38*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "RouteProto";
39*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.maps.routing.v2";
40*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GMRV2";
41*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Maps\\Routing\\V2";
42*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Maps::Routing::V2";
43*d5c09012SAndroid Build Coastguard Worker
44*d5c09012SAndroid Build Coastguard Worker// Contains a route, which consists of a series of connected road segments
45*d5c09012SAndroid Build Coastguard Worker// that join beginning, ending, and intermediate waypoints.
46*d5c09012SAndroid Build Coastguard Workermessage Route {
47*d5c09012SAndroid Build Coastguard Worker  // Text representations of certain properties.
48*d5c09012SAndroid Build Coastguard Worker  message RouteLocalizedValues {
49*d5c09012SAndroid Build Coastguard Worker    // Travel distance represented in text form.
50*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText distance = 1;
51*d5c09012SAndroid Build Coastguard Worker
52*d5c09012SAndroid Build Coastguard Worker    // Duration taking traffic conditions into consideration, represented in
53*d5c09012SAndroid Build Coastguard Worker    // text form. Note: If you did not request traffic information, this value
54*d5c09012SAndroid Build Coastguard Worker    // will be the same value as `static_duration`.
55*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText duration = 2;
56*d5c09012SAndroid Build Coastguard Worker
57*d5c09012SAndroid Build Coastguard Worker    // Duration without taking traffic conditions into consideration,
58*d5c09012SAndroid Build Coastguard Worker    // represented in text form.
59*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText static_duration = 3;
60*d5c09012SAndroid Build Coastguard Worker
61*d5c09012SAndroid Build Coastguard Worker    // Transit fare represented in text form.
62*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText transit_fare = 4;
63*d5c09012SAndroid Build Coastguard Worker  }
64*d5c09012SAndroid Build Coastguard Worker
65*d5c09012SAndroid Build Coastguard Worker  // Labels for the `Route` that are useful to identify specific properties
66*d5c09012SAndroid Build Coastguard Worker  // of the route to compare against others.
67*d5c09012SAndroid Build Coastguard Worker  repeated RouteLabel route_labels = 13;
68*d5c09012SAndroid Build Coastguard Worker
69*d5c09012SAndroid Build Coastguard Worker  // A collection of legs (path segments between waypoints) that make up the
70*d5c09012SAndroid Build Coastguard Worker  // route. Each leg corresponds to the trip between two non-`via`
71*d5c09012SAndroid Build Coastguard Worker  // [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with
72*d5c09012SAndroid Build Coastguard Worker  // no intermediate waypoints has only one leg. A route that includes one
73*d5c09012SAndroid Build Coastguard Worker  // non-`via` intermediate waypoint has two legs. A route that includes one
74*d5c09012SAndroid Build Coastguard Worker  // `via` intermediate waypoint has one leg. The order of the legs matches the
75*d5c09012SAndroid Build Coastguard Worker  // order of waypoints from `origin` to `intermediates` to `destination`.
76*d5c09012SAndroid Build Coastguard Worker  repeated RouteLeg legs = 1;
77*d5c09012SAndroid Build Coastguard Worker
78*d5c09012SAndroid Build Coastguard Worker  // The travel distance of the route, in meters.
79*d5c09012SAndroid Build Coastguard Worker  int32 distance_meters = 2;
80*d5c09012SAndroid Build Coastguard Worker
81*d5c09012SAndroid Build Coastguard Worker  // The length of time needed to navigate the route. If you set the
82*d5c09012SAndroid Build Coastguard Worker  // `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
83*d5c09012SAndroid Build Coastguard Worker  // `static_duration`. If you set the `routing_preference` to either
84*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
85*d5c09012SAndroid Build Coastguard Worker  // taking traffic conditions into account.
86*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration duration = 3;
87*d5c09012SAndroid Build Coastguard Worker
88*d5c09012SAndroid Build Coastguard Worker  // The duration of travel through the route without taking traffic
89*d5c09012SAndroid Build Coastguard Worker  // conditions into consideration.
90*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration static_duration = 4;
91*d5c09012SAndroid Build Coastguard Worker
92*d5c09012SAndroid Build Coastguard Worker  // The overall route polyline. This polyline is the combined polyline of
93*d5c09012SAndroid Build Coastguard Worker  // all `legs`.
94*d5c09012SAndroid Build Coastguard Worker  Polyline polyline = 5;
95*d5c09012SAndroid Build Coastguard Worker
96*d5c09012SAndroid Build Coastguard Worker  // A description of the route.
97*d5c09012SAndroid Build Coastguard Worker  string description = 6;
98*d5c09012SAndroid Build Coastguard Worker
99*d5c09012SAndroid Build Coastguard Worker  // An array of warnings to show when displaying the route.
100*d5c09012SAndroid Build Coastguard Worker  repeated string warnings = 7;
101*d5c09012SAndroid Build Coastguard Worker
102*d5c09012SAndroid Build Coastguard Worker  // The viewport bounding box of the polyline.
103*d5c09012SAndroid Build Coastguard Worker  google.geo.type.Viewport viewport = 8;
104*d5c09012SAndroid Build Coastguard Worker
105*d5c09012SAndroid Build Coastguard Worker  // Additional information about the route.
106*d5c09012SAndroid Build Coastguard Worker  RouteTravelAdvisory travel_advisory = 9;
107*d5c09012SAndroid Build Coastguard Worker
108*d5c09012SAndroid Build Coastguard Worker  // If you set
109*d5c09012SAndroid Build Coastguard Worker  // [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
110*d5c09012SAndroid Build Coastguard Worker  // to true, this field contains the optimized ordering of intermediate
111*d5c09012SAndroid Build Coastguard Worker  // waypoints. Otherwise, this field is empty.
112*d5c09012SAndroid Build Coastguard Worker  // For example, if you give an input of Origin: LA; Intermediate waypoints:
113*d5c09012SAndroid Build Coastguard Worker  // Dallas, Bangor, Phoenix; Destination: New York; and the optimized
114*d5c09012SAndroid Build Coastguard Worker  // intermediate waypoint order is Phoenix, Dallas, Bangor, then this field
115*d5c09012SAndroid Build Coastguard Worker  // contains the values [2, 0, 1]. The index starts with 0 for the first
116*d5c09012SAndroid Build Coastguard Worker  // intermediate waypoint provided in the input.
117*d5c09012SAndroid Build Coastguard Worker  repeated int32 optimized_intermediate_waypoint_index = 10;
118*d5c09012SAndroid Build Coastguard Worker
119*d5c09012SAndroid Build Coastguard Worker  // Text representations of properties of the `Route`.
120*d5c09012SAndroid Build Coastguard Worker  RouteLocalizedValues localized_values = 11;
121*d5c09012SAndroid Build Coastguard Worker
122*d5c09012SAndroid Build Coastguard Worker  // A web-safe, base64-encoded route token that can be passed to the Navigation
123*d5c09012SAndroid Build Coastguard Worker  // SDK, that allows the Navigation SDK to reconstruct the route during
124*d5c09012SAndroid Build Coastguard Worker  // navigation, and, in the event of rerouting, honor the original intention
125*d5c09012SAndroid Build Coastguard Worker  // when you created the route by calling ComputeRoutes. Customers should treat
126*d5c09012SAndroid Build Coastguard Worker  // this token as an opaque blob. It is not meant for reading or mutating.
127*d5c09012SAndroid Build Coastguard Worker  // NOTE: `Route.route_token` is only available for requests that have set
128*d5c09012SAndroid Build Coastguard Worker  // `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or
129*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests
130*d5c09012SAndroid Build Coastguard Worker  // that have Via waypoints.
131*d5c09012SAndroid Build Coastguard Worker  string route_token = 12;
132*d5c09012SAndroid Build Coastguard Worker}
133*d5c09012SAndroid Build Coastguard Worker
134*d5c09012SAndroid Build Coastguard Worker// Contains the additional information that the user should be informed
135*d5c09012SAndroid Build Coastguard Worker// about, such as possible traffic zone restrictions.
136*d5c09012SAndroid Build Coastguard Workermessage RouteTravelAdvisory {
137*d5c09012SAndroid Build Coastguard Worker  // Contains information about tolls on the route. This field is only populated
138*d5c09012SAndroid Build Coastguard Worker  // if tolls are expected on the route. If this field is set, but the
139*d5c09012SAndroid Build Coastguard Worker  // `estimatedPrice` subfield is not populated, then the route contains tolls,
140*d5c09012SAndroid Build Coastguard Worker  // but the estimated price is unknown. If this field is not set, then there
141*d5c09012SAndroid Build Coastguard Worker  // are no tolls expected on the route.
142*d5c09012SAndroid Build Coastguard Worker  TollInfo toll_info = 2;
143*d5c09012SAndroid Build Coastguard Worker
144*d5c09012SAndroid Build Coastguard Worker  // Speed reading intervals detailing traffic density. Applicable in case of
145*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
146*d5c09012SAndroid Build Coastguard Worker  // The intervals cover the entire polyline of the route without overlap.
147*d5c09012SAndroid Build Coastguard Worker  // The start point of a specified interval is the same as the end point of the
148*d5c09012SAndroid Build Coastguard Worker  // preceding interval.
149*d5c09012SAndroid Build Coastguard Worker  //
150*d5c09012SAndroid Build Coastguard Worker  // Example:
151*d5c09012SAndroid Build Coastguard Worker  //
152*d5c09012SAndroid Build Coastguard Worker  //     polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
153*d5c09012SAndroid Build Coastguard Worker  //     speed_reading_intervals: [A,C), [C,D), [D,G).
154*d5c09012SAndroid Build Coastguard Worker  repeated SpeedReadingInterval speed_reading_intervals = 3;
155*d5c09012SAndroid Build Coastguard Worker
156*d5c09012SAndroid Build Coastguard Worker  // The predicted fuel consumption in microliters.
157*d5c09012SAndroid Build Coastguard Worker  int64 fuel_consumption_microliters = 5;
158*d5c09012SAndroid Build Coastguard Worker
159*d5c09012SAndroid Build Coastguard Worker  // Returned route may have restrictions that are not suitable for requested
160*d5c09012SAndroid Build Coastguard Worker  // travel mode or route modifiers.
161*d5c09012SAndroid Build Coastguard Worker  bool route_restrictions_partially_ignored = 6;
162*d5c09012SAndroid Build Coastguard Worker
163*d5c09012SAndroid Build Coastguard Worker  // If present, contains the total fare or ticket costs on this route
164*d5c09012SAndroid Build Coastguard Worker  // This property is only returned for `TRANSIT` requests and only
165*d5c09012SAndroid Build Coastguard Worker  // for routes where fare information is available for all transit steps.
166*d5c09012SAndroid Build Coastguard Worker  google.type.Money transit_fare = 7;
167*d5c09012SAndroid Build Coastguard Worker}
168*d5c09012SAndroid Build Coastguard Worker
169*d5c09012SAndroid Build Coastguard Worker// Contains the additional information that the user should be informed
170*d5c09012SAndroid Build Coastguard Worker// about on a leg step, such as possible traffic zone restrictions.
171*d5c09012SAndroid Build Coastguard Workermessage RouteLegTravelAdvisory {
172*d5c09012SAndroid Build Coastguard Worker  // Contains information about tolls on the specific `RouteLeg`.
173*d5c09012SAndroid Build Coastguard Worker  // This field is only populated if we expect there are tolls on the
174*d5c09012SAndroid Build Coastguard Worker  // `RouteLeg`. If this field is set but the estimated_price subfield is not
175*d5c09012SAndroid Build Coastguard Worker  // populated, we expect that road contains tolls but we do not know an
176*d5c09012SAndroid Build Coastguard Worker  // estimated price. If this field does not exist, then there is no toll on the
177*d5c09012SAndroid Build Coastguard Worker  // `RouteLeg`.
178*d5c09012SAndroid Build Coastguard Worker  TollInfo toll_info = 1;
179*d5c09012SAndroid Build Coastguard Worker
180*d5c09012SAndroid Build Coastguard Worker  // Speed reading intervals detailing traffic density. Applicable in case of
181*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
182*d5c09012SAndroid Build Coastguard Worker  // The intervals cover the entire polyline of the `RouteLeg` without overlap.
183*d5c09012SAndroid Build Coastguard Worker  // The start point of a specified interval is the same as the end point of the
184*d5c09012SAndroid Build Coastguard Worker  // preceding interval.
185*d5c09012SAndroid Build Coastguard Worker  //
186*d5c09012SAndroid Build Coastguard Worker  // Example:
187*d5c09012SAndroid Build Coastguard Worker  //
188*d5c09012SAndroid Build Coastguard Worker  //     polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
189*d5c09012SAndroid Build Coastguard Worker  //     speed_reading_intervals: [A,C), [C,D), [D,G).
190*d5c09012SAndroid Build Coastguard Worker  repeated SpeedReadingInterval speed_reading_intervals = 2;
191*d5c09012SAndroid Build Coastguard Worker}
192*d5c09012SAndroid Build Coastguard Worker
193*d5c09012SAndroid Build Coastguard Worker// Contains the additional information that the user should be informed
194*d5c09012SAndroid Build Coastguard Worker// about, such as possible traffic zone restrictions on a leg step.
195*d5c09012SAndroid Build Coastguard Workermessage RouteLegStepTravelAdvisory {
196*d5c09012SAndroid Build Coastguard Worker  // NOTE: This field is not currently populated.
197*d5c09012SAndroid Build Coastguard Worker  repeated SpeedReadingInterval speed_reading_intervals = 1;
198*d5c09012SAndroid Build Coastguard Worker}
199*d5c09012SAndroid Build Coastguard Worker
200*d5c09012SAndroid Build Coastguard Worker// Contains a segment between non-`via` waypoints.
201*d5c09012SAndroid Build Coastguard Workermessage RouteLeg {
202*d5c09012SAndroid Build Coastguard Worker  // Text representations of certain properties.
203*d5c09012SAndroid Build Coastguard Worker  message RouteLegLocalizedValues {
204*d5c09012SAndroid Build Coastguard Worker    // Travel distance represented in text form.
205*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText distance = 1;
206*d5c09012SAndroid Build Coastguard Worker
207*d5c09012SAndroid Build Coastguard Worker    // Duration taking traffic conditions into consideration represented in text
208*d5c09012SAndroid Build Coastguard Worker    // form. Note: If you did not request traffic information, this value will
209*d5c09012SAndroid Build Coastguard Worker    // be the same value as static_duration.
210*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText duration = 2;
211*d5c09012SAndroid Build Coastguard Worker
212*d5c09012SAndroid Build Coastguard Worker    // Duration without taking traffic conditions into
213*d5c09012SAndroid Build Coastguard Worker    // consideration, represented in text form.
214*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText static_duration = 3;
215*d5c09012SAndroid Build Coastguard Worker  }
216*d5c09012SAndroid Build Coastguard Worker
217*d5c09012SAndroid Build Coastguard Worker  // Provides overview information about a list of `RouteLegStep`s.
218*d5c09012SAndroid Build Coastguard Worker  message StepsOverview {
219*d5c09012SAndroid Build Coastguard Worker    // Provides summarized information about different multi-modal segments of
220*d5c09012SAndroid Build Coastguard Worker    // the `RouteLeg.steps`. A multi-modal segment is defined as one or more
221*d5c09012SAndroid Build Coastguard Worker    // contiguous `RouteLegStep` that have the same `RouteTravelMode`.
222*d5c09012SAndroid Build Coastguard Worker    // This field is not populated if the `RouteLeg` does not contain any
223*d5c09012SAndroid Build Coastguard Worker    // multi-modal segments in the steps.
224*d5c09012SAndroid Build Coastguard Worker    message MultiModalSegment {
225*d5c09012SAndroid Build Coastguard Worker      // The corresponding `RouteLegStep` index that is the start of a
226*d5c09012SAndroid Build Coastguard Worker      // multi-modal segment.
227*d5c09012SAndroid Build Coastguard Worker      optional int32 step_start_index = 1;
228*d5c09012SAndroid Build Coastguard Worker
229*d5c09012SAndroid Build Coastguard Worker      // The corresponding `RouteLegStep` index that is the end of a
230*d5c09012SAndroid Build Coastguard Worker      // multi-modal segment.
231*d5c09012SAndroid Build Coastguard Worker      optional int32 step_end_index = 2;
232*d5c09012SAndroid Build Coastguard Worker
233*d5c09012SAndroid Build Coastguard Worker      // NavigationInstruction for the multi-modal segment.
234*d5c09012SAndroid Build Coastguard Worker      NavigationInstruction navigation_instruction = 3;
235*d5c09012SAndroid Build Coastguard Worker
236*d5c09012SAndroid Build Coastguard Worker      // The travel mode of the multi-modal segment.
237*d5c09012SAndroid Build Coastguard Worker      RouteTravelMode travel_mode = 4;
238*d5c09012SAndroid Build Coastguard Worker    }
239*d5c09012SAndroid Build Coastguard Worker
240*d5c09012SAndroid Build Coastguard Worker    // Summarized information about different multi-modal segments of
241*d5c09012SAndroid Build Coastguard Worker    // the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
242*d5c09012SAndroid Build Coastguard Worker    // not contain any multi-modal segments in the steps.
243*d5c09012SAndroid Build Coastguard Worker    repeated MultiModalSegment multi_modal_segments = 1;
244*d5c09012SAndroid Build Coastguard Worker  }
245*d5c09012SAndroid Build Coastguard Worker
246*d5c09012SAndroid Build Coastguard Worker  // The travel distance of the route leg, in meters.
247*d5c09012SAndroid Build Coastguard Worker  int32 distance_meters = 1;
248*d5c09012SAndroid Build Coastguard Worker
249*d5c09012SAndroid Build Coastguard Worker  // The length of time needed to navigate the leg. If the `route_preference`
250*d5c09012SAndroid Build Coastguard Worker  // is set to `TRAFFIC_UNAWARE`, then this value is the same as
251*d5c09012SAndroid Build Coastguard Worker  // `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
252*d5c09012SAndroid Build Coastguard Worker  // `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
253*d5c09012SAndroid Build Coastguard Worker  // conditions into account.
254*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration duration = 2;
255*d5c09012SAndroid Build Coastguard Worker
256*d5c09012SAndroid Build Coastguard Worker  // The duration of travel through the leg, calculated without taking
257*d5c09012SAndroid Build Coastguard Worker  // traffic conditions into consideration.
258*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration static_duration = 3;
259*d5c09012SAndroid Build Coastguard Worker
260*d5c09012SAndroid Build Coastguard Worker  // The overall polyline for this leg that includes each `step`'s
261*d5c09012SAndroid Build Coastguard Worker  // polyline.
262*d5c09012SAndroid Build Coastguard Worker  Polyline polyline = 4;
263*d5c09012SAndroid Build Coastguard Worker
264*d5c09012SAndroid Build Coastguard Worker  // The start location of this leg. This location might be different from the
265*d5c09012SAndroid Build Coastguard Worker  // provided `origin`. For example, when the provided `origin` is not near a
266*d5c09012SAndroid Build Coastguard Worker  // road, this is a point on the road.
267*d5c09012SAndroid Build Coastguard Worker  Location start_location = 5;
268*d5c09012SAndroid Build Coastguard Worker
269*d5c09012SAndroid Build Coastguard Worker  // The end location of this leg. This location might be different from the
270*d5c09012SAndroid Build Coastguard Worker  // provided `destination`. For example, when the provided `destination` is not
271*d5c09012SAndroid Build Coastguard Worker  // near a road, this is a point on the road.
272*d5c09012SAndroid Build Coastguard Worker  Location end_location = 6;
273*d5c09012SAndroid Build Coastguard Worker
274*d5c09012SAndroid Build Coastguard Worker  // An array of steps denoting segments within this leg. Each step represents
275*d5c09012SAndroid Build Coastguard Worker  // one navigation instruction.
276*d5c09012SAndroid Build Coastguard Worker  repeated RouteLegStep steps = 7;
277*d5c09012SAndroid Build Coastguard Worker
278*d5c09012SAndroid Build Coastguard Worker  // Contains the additional information that the user should be informed
279*d5c09012SAndroid Build Coastguard Worker  // about, such as possible traffic zone restrictions, on a route leg.
280*d5c09012SAndroid Build Coastguard Worker  RouteLegTravelAdvisory travel_advisory = 8;
281*d5c09012SAndroid Build Coastguard Worker
282*d5c09012SAndroid Build Coastguard Worker  // Text representations of properties of the `RouteLeg`.
283*d5c09012SAndroid Build Coastguard Worker  RouteLegLocalizedValues localized_values = 9;
284*d5c09012SAndroid Build Coastguard Worker
285*d5c09012SAndroid Build Coastguard Worker  // Overview information about the steps in this `RouteLeg`. This field is only
286*d5c09012SAndroid Build Coastguard Worker  // populated for TRANSIT routes.
287*d5c09012SAndroid Build Coastguard Worker  StepsOverview steps_overview = 10;
288*d5c09012SAndroid Build Coastguard Worker}
289*d5c09012SAndroid Build Coastguard Worker
290*d5c09012SAndroid Build Coastguard Worker// Contains a segment of a [`RouteLeg`][google.maps.routing.v2.RouteLeg]. A
291*d5c09012SAndroid Build Coastguard Worker// step corresponds to a single navigation instruction. Route legs are made up
292*d5c09012SAndroid Build Coastguard Worker// of steps.
293*d5c09012SAndroid Build Coastguard Workermessage RouteLegStep {
294*d5c09012SAndroid Build Coastguard Worker  // Text representations of certain properties.
295*d5c09012SAndroid Build Coastguard Worker  message RouteLegStepLocalizedValues {
296*d5c09012SAndroid Build Coastguard Worker    // Travel distance represented in text form.
297*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText distance = 1;
298*d5c09012SAndroid Build Coastguard Worker
299*d5c09012SAndroid Build Coastguard Worker    // Duration without taking traffic conditions into
300*d5c09012SAndroid Build Coastguard Worker    // consideration, represented in text form.
301*d5c09012SAndroid Build Coastguard Worker    google.type.LocalizedText static_duration = 3;
302*d5c09012SAndroid Build Coastguard Worker  }
303*d5c09012SAndroid Build Coastguard Worker
304*d5c09012SAndroid Build Coastguard Worker  // The travel distance of this step, in meters. In some circumstances, this
305*d5c09012SAndroid Build Coastguard Worker  // field might not have a value.
306*d5c09012SAndroid Build Coastguard Worker  int32 distance_meters = 1;
307*d5c09012SAndroid Build Coastguard Worker
308*d5c09012SAndroid Build Coastguard Worker  // The duration of travel through this step without taking traffic conditions
309*d5c09012SAndroid Build Coastguard Worker  // into consideration. In some circumstances, this field might not have a
310*d5c09012SAndroid Build Coastguard Worker  // value.
311*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration static_duration = 2;
312*d5c09012SAndroid Build Coastguard Worker
313*d5c09012SAndroid Build Coastguard Worker  // The polyline associated with this step.
314*d5c09012SAndroid Build Coastguard Worker  Polyline polyline = 3;
315*d5c09012SAndroid Build Coastguard Worker
316*d5c09012SAndroid Build Coastguard Worker  // The start location of this step.
317*d5c09012SAndroid Build Coastguard Worker  Location start_location = 4;
318*d5c09012SAndroid Build Coastguard Worker
319*d5c09012SAndroid Build Coastguard Worker  // The end location of this step.
320*d5c09012SAndroid Build Coastguard Worker  Location end_location = 5;
321*d5c09012SAndroid Build Coastguard Worker
322*d5c09012SAndroid Build Coastguard Worker  // Navigation instructions.
323*d5c09012SAndroid Build Coastguard Worker  NavigationInstruction navigation_instruction = 6;
324*d5c09012SAndroid Build Coastguard Worker
325*d5c09012SAndroid Build Coastguard Worker  // Contains the additional information that the user should be informed
326*d5c09012SAndroid Build Coastguard Worker  // about, such as possible traffic zone restrictions, on a leg step.
327*d5c09012SAndroid Build Coastguard Worker  RouteLegStepTravelAdvisory travel_advisory = 7;
328*d5c09012SAndroid Build Coastguard Worker
329*d5c09012SAndroid Build Coastguard Worker  // Text representations of properties of the `RouteLegStep`.
330*d5c09012SAndroid Build Coastguard Worker  RouteLegStepLocalizedValues localized_values = 8;
331*d5c09012SAndroid Build Coastguard Worker
332*d5c09012SAndroid Build Coastguard Worker  // Details pertaining to this step if the travel mode is `TRANSIT`.
333*d5c09012SAndroid Build Coastguard Worker  RouteLegStepTransitDetails transit_details = 9;
334*d5c09012SAndroid Build Coastguard Worker
335*d5c09012SAndroid Build Coastguard Worker  // The travel mode used for this step.
336*d5c09012SAndroid Build Coastguard Worker  RouteTravelMode travel_mode = 10;
337*d5c09012SAndroid Build Coastguard Worker}
338*d5c09012SAndroid Build Coastguard Worker
339*d5c09012SAndroid Build Coastguard Worker// Additional information for the `RouteLegStep` related to `TRANSIT` routes.
340*d5c09012SAndroid Build Coastguard Workermessage RouteLegStepTransitDetails {
341*d5c09012SAndroid Build Coastguard Worker  // Details about the transit stops for the `RouteLegStep`.
342*d5c09012SAndroid Build Coastguard Worker  message TransitStopDetails {
343*d5c09012SAndroid Build Coastguard Worker    // Information about the arrival stop for the step.
344*d5c09012SAndroid Build Coastguard Worker    TransitStop arrival_stop = 1;
345*d5c09012SAndroid Build Coastguard Worker
346*d5c09012SAndroid Build Coastguard Worker    // The estimated time of arrival for the step.
347*d5c09012SAndroid Build Coastguard Worker    google.protobuf.Timestamp arrival_time = 2;
348*d5c09012SAndroid Build Coastguard Worker
349*d5c09012SAndroid Build Coastguard Worker    // Information about the departure stop for the step.
350*d5c09012SAndroid Build Coastguard Worker    TransitStop departure_stop = 3;
351*d5c09012SAndroid Build Coastguard Worker
352*d5c09012SAndroid Build Coastguard Worker    // The estimated time of departure for the step.
353*d5c09012SAndroid Build Coastguard Worker    google.protobuf.Timestamp departure_time = 4;
354*d5c09012SAndroid Build Coastguard Worker  }
355*d5c09012SAndroid Build Coastguard Worker
356*d5c09012SAndroid Build Coastguard Worker  // Localized descriptions of values for `RouteTransitDetails`.
357*d5c09012SAndroid Build Coastguard Worker  message TransitDetailsLocalizedValues {
358*d5c09012SAndroid Build Coastguard Worker    // Time in its formatted text representation with a corresponding time zone.
359*d5c09012SAndroid Build Coastguard Worker    LocalizedTime arrival_time = 1;
360*d5c09012SAndroid Build Coastguard Worker
361*d5c09012SAndroid Build Coastguard Worker    // Time in its formatted text representation with a corresponding time zone.
362*d5c09012SAndroid Build Coastguard Worker    LocalizedTime departure_time = 2;
363*d5c09012SAndroid Build Coastguard Worker  }
364*d5c09012SAndroid Build Coastguard Worker
365*d5c09012SAndroid Build Coastguard Worker  // Information about the arrival and departure stops for the step.
366*d5c09012SAndroid Build Coastguard Worker  TransitStopDetails stop_details = 1;
367*d5c09012SAndroid Build Coastguard Worker
368*d5c09012SAndroid Build Coastguard Worker  // Text representations of properties of the `RouteLegStepTransitDetails`.
369*d5c09012SAndroid Build Coastguard Worker  TransitDetailsLocalizedValues localized_values = 2;
370*d5c09012SAndroid Build Coastguard Worker
371*d5c09012SAndroid Build Coastguard Worker  // Specifies the direction in which to travel on this line as marked on
372*d5c09012SAndroid Build Coastguard Worker  // the vehicle or at the departure stop. The direction is often the terminus
373*d5c09012SAndroid Build Coastguard Worker  // station.
374*d5c09012SAndroid Build Coastguard Worker  string headsign = 3;
375*d5c09012SAndroid Build Coastguard Worker
376*d5c09012SAndroid Build Coastguard Worker  // Specifies the expected time as a duration between departures from the same
377*d5c09012SAndroid Build Coastguard Worker  // stop at this time. For example, with a headway seconds value of 600, you
378*d5c09012SAndroid Build Coastguard Worker  // would expect a ten minute wait if you should miss your bus.
379*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration headway = 4;
380*d5c09012SAndroid Build Coastguard Worker
381*d5c09012SAndroid Build Coastguard Worker  // Information about the transit line used in this step.
382*d5c09012SAndroid Build Coastguard Worker  TransitLine transit_line = 5;
383*d5c09012SAndroid Build Coastguard Worker
384*d5c09012SAndroid Build Coastguard Worker  // The number of stops from the departure to the arrival stop. This count
385*d5c09012SAndroid Build Coastguard Worker  // includes the arrival stop, but excludes the departure stop. For example, if
386*d5c09012SAndroid Build Coastguard Worker  // your route leaves from Stop A, passes through stops B and C, and arrives at
387*d5c09012SAndroid Build Coastguard Worker  // stop D, stop_count will return 3.
388*d5c09012SAndroid Build Coastguard Worker  int32 stop_count = 6;
389*d5c09012SAndroid Build Coastguard Worker
390*d5c09012SAndroid Build Coastguard Worker  // The text that appears in schedules and sign boards to identify a transit
391*d5c09012SAndroid Build Coastguard Worker  // trip to passengers. The text should uniquely identify a trip within a
392*d5c09012SAndroid Build Coastguard Worker  // service day. For example, "538" is the `trip_short_text` of the Amtrak
393*d5c09012SAndroid Build Coastguard Worker  // train that leaves San Jose, CA at 15:10 on weekdays to Sacramento, CA.
394*d5c09012SAndroid Build Coastguard Worker  string trip_short_text = 7;
395*d5c09012SAndroid Build Coastguard Worker}
396