Skip to content

Commit

Permalink
feat: [routing] add API for shorter distance reference routes (#5842)
Browse files Browse the repository at this point in the history
* feat: add API for shorter distance reference routes

PiperOrigin-RevId: 700387857

Source-Link: googleapis/googleapis@4deb95d

Source-Link: googleapis/googleapis-gen@a38a16c
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiYTM4YTE2YzQzYzY4NjgxYmJmNWMwZGU3OTE0YjcyNzkwYTRiNmIyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Dec 2, 2024
1 parent 1a3f99f commit 99b489f
Show file tree
Hide file tree
Showing 28 changed files with 78 additions and 47 deletions.
4 changes: 2 additions & 2 deletions packages/google-maps-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the Google Maps Routing API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
1. [Set up authentication][auth] so you can access the
API from your local workstation.

### Installing the client library
Expand Down Expand Up @@ -233,4 +233,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=routes.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.routing.v2;

import "google/rpc/status.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.routing.v2;

import "google/type/localized_text.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.routing.v2;
import "google/protobuf/wrappers.proto";
import "google/type/latlng.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.routing.v2;

import "google/maps/routing/v2/maneuver.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.routing.v2;

import "google/protobuf/struct.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import "google/protobuf/timestamp.proto";
import "google/type/localized_text.proto";
import "google/type/money.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand All @@ -49,9 +48,10 @@ message Route {
// Travel distance represented in text form.
google.type.LocalizedText distance = 1;

// Duration taking traffic conditions into consideration, represented in
// text form. Note: If you did not request traffic information, this value
// will be the same value as `static_duration`.
// Duration, represented in text form and localized to the region of the
// query. Takes traffic conditions into consideration. Note: If you did not
// request traffic information, this value is the same value as
// `static_duration`.
google.type.LocalizedText duration = 2;

// Duration without taking traffic conditions into consideration,
Expand Down Expand Up @@ -119,11 +119,13 @@ message Route {
// Text representations of properties of the `Route`.
RouteLocalizedValues localized_values = 11;

// A web-safe, base64-encoded route token that can be passed to the Navigation
// SDK, that allows the Navigation SDK to reconstruct the route during
// navigation, and, in the event of rerouting, honor the original intention
// when you created the route by calling ComputeRoutes. Customers should treat
// this token as an opaque blob. It is not meant for reading or mutating.
// An opaque token that can be passed to [Navigation
// SDK](https://developers.google.com/maps/documentation/navigation) to
// reconstruct the route during navigation, and, in the event of rerouting,
// honor the original intention when the route was created. Treat this token
// as an opaque blob. Don't compare its value across requests as its value
// may change even if the service returns the exact same route.
//
// NOTE: `Route.route_token` is only available for requests that have set
// `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or
// `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests
Expand Down Expand Up @@ -204,9 +206,10 @@ message RouteLeg {
// Travel distance represented in text form.
google.type.LocalizedText distance = 1;

// Duration taking traffic conditions into consideration represented in text
// form. Note: If you did not request traffic information, this value will
// be the same value as static_duration.
// Duration, represented in text form and localized to the region of the
// query. Takes traffic conditions into consideration. Note: If you did not
// request traffic information, this value is the same value as
// static_duration.
google.type.LocalizedText duration = 2;

// Duration without taking traffic conditions into
Expand Down Expand Up @@ -384,7 +387,7 @@ message RouteLegStepTransitDetails {
// The number of stops from the departure to the arrival stop. This count
// includes the arrival stop, but excludes the departure stop. For example, if
// your route leaves from Stop A, passes through stops B and C, and arrives at
// stop D, stop_count will return 3.
// stop D, <code>stop_count</code> returns 3.
int32 stop_count = 6;

// The text that appears in schedules and sign boards to identify a transit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down Expand Up @@ -44,4 +43,7 @@ enum RouteLabel {
// Fuel efficient route. Routes labeled with this value are determined to be
// optimized for Eco parameters such as fuel consumption.
FUEL_EFFICIENT = 3;

// Shorter travel distance route. This is an experimental feature.
SHORTER_DISTANCE = 4;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.routing.v2;
import "google/maps/routing/v2/toll_passes.proto";
import "google/maps/routing/v2/vehicle_info.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "google/type/localized_text.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down Expand Up @@ -142,9 +141,24 @@ message ComputeRoutesRequest {
// Not used. Requests containing this value fail.
REFERENCE_ROUTE_UNSPECIFIED = 0;

// Fuel efficient route. Routes labeled with this value are determined to be
// optimized for parameters such as fuel consumption.
// Fuel efficient route.
FUEL_EFFICIENT = 1;

// Route with shorter travel distance. This is an experimental feature.
//
// For `DRIVE` requests, this feature prioritizes shorter distance over
// driving comfort. For example, it may prefer local roads instead of
// highways, take dirt roads, cut through parking lots, etc. This feature
// does not return any maneuvers that Google Maps knows to be illegal.
//
// For `BICYCLE` and `TWO_WHEELER` requests, this feature returns routes
// similar to those returned when you don't specify
// `requested_reference_routes`.
//
// This feature is not compatible with any other travel modes, via
// intermediate waypoints, or `optimize_waypoint_order`; such requests will
// fail. However, you can use it with any `routing_preference`.
SHORTER_DISTANCE = 2;
}

// Extra computations to perform while completing the request.
Expand Down Expand Up @@ -262,7 +276,10 @@ message ComputeRoutesRequest {
// request in addition to the default route. A reference route is a route with
// a different route calculation objective than the default route. For example
// a `FUEL_EFFICIENT` reference route calculation takes into account various
// parameters that would generate an optimal fuel efficient route.
// parameters that would generate an optimal fuel efficient route. When using
// this feature, look for
// [`route_labels`][google.maps.routing.v2.Route.route_labels] on the
// resulting routes.
repeated ReferenceRoute requested_reference_routes = 14
[(google.api.field_behavior) = OPTIONAL];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.routing.v2;
import "google/maps/routing/v2/location.proto";
import "google/type/localized_text.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.routing.v2;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.routing.v2;

import "google/maps/routing/v2/location.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
Expand Down
6 changes: 4 additions & 2 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.

14 changes: 14 additions & 0 deletions packages/google-maps-routing/protos/protos.js

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

Loading

0 comments on commit 99b489f

Please sign in to comment.