Skip to content

Commit 23dc63c

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add ExtraComputations feature to ComputeRoutes and ComputeRouteMatrix
PiperOrigin-RevId: 503020999
1 parent 77cd8f1 commit 23dc63c

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

google/maps/routing/v2/routes_service.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,21 @@ message ComputeRoutesRequest {
143143
FUEL_EFFICIENT = 1;
144144
}
145145

146+
// Extra computations to perform while completing the request.
147+
enum ExtraComputation {
148+
// Not used. Requests containing this value will fail.
149+
EXTRA_COMPUTATION_UNSPECIFIED = 0;
150+
151+
// Toll information for the route(s).
152+
TOLLS = 1;
153+
154+
// Estimated fuel consumption for the route(s).
155+
FUEL_CONSUMPTION = 2;
156+
157+
// Traffic aware polylines for the route(s).
158+
TRAFFIC_ON_POLYLINE = 3;
159+
}
160+
146161
// Required. Origin waypoint.
147162
Waypoint origin = 1 [(google.api.field_behavior) = REQUIRED];
148163

@@ -208,6 +223,13 @@ message ComputeRoutesRequest {
208223
// parameters that would generate an optimal fuel efficient route.
209224
repeated ReferenceRoute requested_reference_routes = 14
210225
[(google.api.field_behavior) = OPTIONAL];
226+
227+
// Optional. A list of extra computations which may be used to complete the
228+
// request. Note: These extra computations may return extra fields on the
229+
// response. These extra fields must also be specified in the field mask to be
230+
// returned in the response.
231+
repeated ExtraComputation extra_computations = 15
232+
[(google.api.field_behavior) = OPTIONAL];
211233
}
212234

213235
// ComputeRoutes the response message.
@@ -228,6 +250,15 @@ message ComputeRoutesResponse {
228250

229251
// ComputeRouteMatrix request message
230252
message ComputeRouteMatrixRequest {
253+
// Extra computations to perform while completing the request.
254+
enum ExtraComputation {
255+
// Not used. Requests containing this value will fail.
256+
EXTRA_COMPUTATION_UNSPECIFIED = 0;
257+
258+
// Toll information for the matrix element(s).
259+
TOLLS = 1;
260+
}
261+
231262
// Required. Array of origins, which determines the rows of the response
232263
// matrix. Several size restrictions apply to the cardinality of origins and
233264
// destinations:
@@ -262,6 +293,13 @@ message ComputeRouteMatrixRequest {
262293
// has already occurred, the request fails.
263294
google.protobuf.Timestamp departure_time = 5
264295
[(google.api.field_behavior) = OPTIONAL];
296+
297+
// Optional. A list of extra computations which may be used to complete the
298+
// request. Note: These extra computations may return extra fields on the
299+
// response. These extra fields must also be specified in the field mask to be
300+
// returned in the response.
301+
repeated ExtraComputation extra_computations = 8
302+
[(google.api.field_behavior) = OPTIONAL];
265303
}
266304

267305
// A single origin for ComputeRouteMatrixRequest

0 commit comments

Comments
 (0)