Skip to content

feat: Add ExtraComputations feature to ComputeRoutes and ComputeRouteMatrix #3868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,21 @@ message ComputeRoutesRequest {
FUEL_EFFICIENT = 1;
}

// Extra computations to perform while completing the request.
enum ExtraComputation {
// Not used. Requests containing this value will fail.
EXTRA_COMPUTATION_UNSPECIFIED = 0;

// Toll information for the route(s).
TOLLS = 1;

// Estimated fuel consumption for the route(s).
FUEL_CONSUMPTION = 2;

// Traffic aware polylines for the route(s).
TRAFFIC_ON_POLYLINE = 3;
}

// Required. Origin waypoint.
Waypoint origin = 1 [(google.api.field_behavior) = REQUIRED];

Expand Down Expand Up @@ -208,6 +223,13 @@ message ComputeRoutesRequest {
// parameters that would generate an optimal fuel efficient route.
repeated ReferenceRoute requested_reference_routes = 14
[(google.api.field_behavior) = OPTIONAL];

// Optional. A list of extra computations which may be used to complete the
// request. Note: These extra computations may return extra fields on the
// response. These extra fields must also be specified in the field mask to be
// returned in the response.
repeated ExtraComputation extra_computations = 15
[(google.api.field_behavior) = OPTIONAL];
}

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

// ComputeRouteMatrix request message
message ComputeRouteMatrixRequest {
// Extra computations to perform while completing the request.
enum ExtraComputation {
// Not used. Requests containing this value will fail.
EXTRA_COMPUTATION_UNSPECIFIED = 0;

// Toll information for the matrix element(s).
TOLLS = 1;
}

// Required. Array of origins, which determines the rows of the response
// matrix. Several size restrictions apply to the cardinality of origins and
// destinations:
Expand Down Expand Up @@ -262,6 +293,13 @@ message ComputeRouteMatrixRequest {
// has already occurred, the request fails.
google.protobuf.Timestamp departure_time = 5
[(google.api.field_behavior) = OPTIONAL];

// Optional. A list of extra computations which may be used to complete the
// request. Note: These extra computations may return extra fields on the
// response. These extra fields must also be specified in the field mask to be
// returned in the response.
repeated ExtraComputation extra_computations = 8
[(google.api.field_behavior) = OPTIONAL];
}

// A single origin for ComputeRouteMatrixRequest
Expand Down
29 changes: 29 additions & 0 deletions packages/google-maps-routing/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading