Skip to content

Commit 99b489f

Browse files
feat: [routing] add API for shorter distance reference routes (#5842)
* 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>
1 parent 1a3f99f commit 99b489f

28 files changed

Lines changed: 78 additions & 47 deletions

packages/google-maps-routing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4444
1. [Select or create a Cloud Platform project][projects].
4545
1. [Enable billing for your project][billing].
4646
1. [Enable the Google Maps Routing API][enable_api].
47-
1. [Set up authentication with a service account][auth] so you can access the
47+
1. [Set up authentication][auth] so you can access the
4848
API from your local workstation.
4949

5050
### Installing the client library
@@ -233,4 +233,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
233233
[projects]: https://console.cloud.google.com/project
234234
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
235235
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=routes.googleapis.com
236-
[auth]: https://cloud.google.com/docs/authentication/getting-started
236+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-maps-routing/protos/google/maps/routing/v2/fallback_info.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ syntax = "proto3";
1616

1717
package google.maps.routing.v2;
1818

19-
option cc_enable_arenas = true;
2019
option csharp_namespace = "Google.Maps.Routing.V2";
2120
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2221
option java_multiple_files = true;

packages/google-maps-routing/protos/google/maps/routing/v2/geocoding_results.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
1818

1919
import "google/rpc/status.proto";
2020

21-
option cc_enable_arenas = true;
2221
option csharp_namespace = "Google.Maps.Routing.V2";
2322
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2423
option java_multiple_files = true;

packages/google-maps-routing/protos/google/maps/routing/v2/localized_time.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
1818

1919
import "google/type/localized_text.proto";
2020

21-
option cc_enable_arenas = true;
2221
option csharp_namespace = "Google.Maps.Routing.V2";
2322
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2423
option java_multiple_files = true;

packages/google-maps-routing/protos/google/maps/routing/v2/location.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package google.maps.routing.v2;
1919
import "google/protobuf/wrappers.proto";
2020
import "google/type/latlng.proto";
2121

22-
option cc_enable_arenas = true;
2322
option csharp_namespace = "Google.Maps.Routing.V2";
2423
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2524
option java_multiple_files = true;

packages/google-maps-routing/protos/google/maps/routing/v2/maneuver.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ syntax = "proto3";
1616

1717
package google.maps.routing.v2;
1818

19-
option cc_enable_arenas = true;
2019
option csharp_namespace = "Google.Maps.Routing.V2";
2120
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2221
option java_multiple_files = true;

packages/google-maps-routing/protos/google/maps/routing/v2/navigation_instruction.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
1818

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

21-
option cc_enable_arenas = true;
2221
option csharp_namespace = "Google.Maps.Routing.V2";
2322
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2423
option java_multiple_files = true;

packages/google-maps-routing/protos/google/maps/routing/v2/polyline.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
1818

1919
import "google/protobuf/struct.proto";
2020

21-
option cc_enable_arenas = true;
2221
option csharp_namespace = "Google.Maps.Routing.V2";
2322
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2423
option java_multiple_files = true;

packages/google-maps-routing/protos/google/maps/routing/v2/route.proto

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import "google/protobuf/timestamp.proto";
3131
import "google/type/localized_text.proto";
3232
import "google/type/money.proto";
3333

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

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

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

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

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

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

390393
// The text that appears in schedules and sign boards to identify a transit

packages/google-maps-routing/protos/google/maps/routing/v2/route_label.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ syntax = "proto3";
1616

1717
package google.maps.routing.v2;
1818

19-
option cc_enable_arenas = true;
2019
option csharp_namespace = "Google.Maps.Routing.V2";
2120
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
2221
option java_multiple_files = true;
@@ -44,4 +43,7 @@ enum RouteLabel {
4443
// Fuel efficient route. Routes labeled with this value are determined to be
4544
// optimized for Eco parameters such as fuel consumption.
4645
FUEL_EFFICIENT = 3;
46+
47+
// Shorter travel distance route. This is an experimental feature.
48+
SHORTER_DISTANCE = 4;
4749
}

0 commit comments

Comments
 (0)