@googlemaps/routing 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +4 -5
  3. package/build/protos/google/maps/routing/v2/fallback_info.proto +6 -5
  4. package/build/protos/google/maps/routing/v2/geocoding_results.proto +72 -0
  5. package/build/protos/google/maps/routing/v2/location.proto +3 -2
  6. package/build/protos/google/maps/routing/v2/maneuver.proto +1 -1
  7. package/build/protos/google/maps/routing/v2/navigation_instruction.proto +1 -1
  8. package/build/protos/google/maps/routing/v2/polyline.proto +1 -1
  9. package/build/protos/google/maps/routing/v2/route.proto +11 -19
  10. package/build/protos/google/maps/routing/v2/route_label.proto +6 -5
  11. package/build/protos/google/maps/routing/v2/route_modifiers.proto +9 -6
  12. package/build/protos/google/maps/routing/v2/route_travel_mode.proto +3 -3
  13. package/build/protos/google/maps/routing/v2/routes_service.proto +36 -11
  14. package/build/protos/google/maps/routing/v2/routing_preference.proto +8 -7
  15. package/build/protos/google/maps/routing/v2/speed_reading_interval.proto +5 -3
  16. package/build/protos/google/maps/routing/v2/toll_info.proto +10 -8
  17. package/build/protos/google/maps/routing/v2/toll_passes.proto +4 -1
  18. package/build/protos/google/maps/routing/v2/units.proto +1 -1
  19. package/build/protos/google/maps/routing/v2/vehicle_emission_type.proto +4 -3
  20. package/build/protos/google/maps/routing/v2/vehicle_info.proto +2 -2
  21. package/build/protos/google/maps/routing/v2/waypoint.proto +17 -12
  22. package/build/protos/protos.d.ts +533 -266
  23. package/build/protos/protos.js +9070 -8303
  24. package/build/protos/protos.json +130 -42
  25. package/build/src/v2/routes_client.d.ts +23 -6
  26. package/build/src/v2/routes_client.js +11 -0
  27. package/build/src/v2/routes_client.js.map +1 -1
  28. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/routing-v0.4.0...routing-v0.5.0) (2023-03-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * [routing] adds support for specifying region_code in the ComputeRoutesRequest ([#4103](https://github.com/googleapis/google-cloud-node/issues/4103)) ([1106a82](https://github.com/googleapis/google-cloud-node/commit/1106a824dbddc7296f069a0a3e063b0ec9fc914f))
9
+ * [routing] moved speed in SpeedReadingInterval into a oneof speed_type, this is a breaking change for Go client libraries ([#4121](https://github.com/googleapis/google-cloud-node/issues/4121)) ([9878d72](https://github.com/googleapis/google-cloud-node/commit/9878d722f634f356590014ea8f2f035bb1b134db))
10
+
11
+ ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/routing-v0.3.1...routing-v0.4.0) (2023-03-13)
12
+
13
+
14
+ ### Features
15
+
16
+ * [routing] added support for specifying waypoints as addresses ([#4065](https://github.com/googleapis/google-cloud-node/issues/4065)) ([e325ac5](https://github.com/googleapis/google-cloud-node/commit/e325ac51cf2550cc9d9dba6a8145d4affe766930))
17
+
3
18
  ## [0.3.1](https://github.com/googleapis/google-cloud-node/compare/routing-v0.3.0...routing-v0.3.1) (2023-02-15)
4
19
 
5
20
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # [Google Maps Routing: Node.js Client](https://github.com/googleapis/google-cloud-node)
6
6
 
7
- [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
7
+ [![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
8
8
  [![npm version](https://img.shields.io/npm/v/@googlemaps/routing.svg)](https://www.npmjs.org/package/@googlemaps/routing)
9
9
 
10
10
 
@@ -200,13 +200,12 @@ This library follows [Semantic Versioning](http://semver.org/).
200
200
 
201
201
 
202
202
 
203
- This library is considered to be in **beta**. This means it is expected to be
204
- mostly stable while we work toward a general availability release; however,
205
- complete stability is not guaranteed. We will address issues and requests
206
- against beta libraries with a high priority.
207
203
 
208
204
 
209
205
 
206
+ This library is considered to be in **preview**. This means it is still a
207
+ work-in-progress and under active development. Any release is subject to
208
+ backwards-incompatible changes at any time.
210
209
 
211
210
 
212
211
  More Information: [Google Cloud Platform Launch Stages][launch_stages]
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -62,11 +62,12 @@ enum FallbackRoutingMode {
62
62
  // Not used.
63
63
  FALLBACK_ROUTING_MODE_UNSPECIFIED = 0;
64
64
 
65
- // Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the
66
- // response.
65
+ // Indicates the `TRAFFIC_UNAWARE` [google.maps.routing.v2.RoutingPreference]
66
+ // was used to compute the response.
67
67
  FALLBACK_TRAFFIC_UNAWARE = 1;
68
68
 
69
- // Indicates the "TRAFFIC_AWARE" routing mode was used to compute the
70
- // response.
69
+ // Indicates the `TRAFFIC_AWARE`
70
+ // [RoutingPreference][google.maps.routing.v2.RoutingPreference] was used to
71
+ // compute the response.
71
72
  FALLBACK_TRAFFIC_AWARE = 2;
72
73
  }
@@ -0,0 +1,72 @@
1
+ // Copyright 2023 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ import "google/rpc/status.proto";
20
+
21
+ option cc_enable_arenas = true;
22
+ option csharp_namespace = "Google.Maps.Routing.V2";
23
+ option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
24
+ option java_multiple_files = true;
25
+ option java_outer_classname = "GeocodingResultsProto";
26
+ option java_package = "com.google.maps.routing.v2";
27
+ option objc_class_prefix = "GMRV2";
28
+ option php_namespace = "Google\\Maps\\Routing\\V2";
29
+ option ruby_package = "Google::Maps::Routing::V2";
30
+
31
+ // Contains [GeocodedWaypoints][google.maps.routing.v2.GeocodedWaypoint] for
32
+ // origin, destination and intermediate waypoints. Only populated for address
33
+ // waypoints.
34
+ message GeocodingResults {
35
+ // Origin geocoded waypoint.
36
+ GeocodedWaypoint origin = 1;
37
+
38
+ // Destination geocoded waypoint.
39
+ GeocodedWaypoint destination = 2;
40
+
41
+ // A list of intermediate geocoded waypoints each containing an index field
42
+ // that corresponds to the zero-based position of the waypoint in the order
43
+ // they were specified in the request.
44
+ repeated GeocodedWaypoint intermediates = 3;
45
+ }
46
+
47
+ // Details about the locations used as waypoints. Only populated for address
48
+ // waypoints. Includes details about the geocoding results for the purposes of
49
+ // determining what the address was geocoded to.
50
+ message GeocodedWaypoint {
51
+ // Indicates the status code resulting from the geocoding operation.
52
+ google.rpc.Status geocoder_status = 1;
53
+
54
+ // The index of the corresponding intermediate waypoint in the request.
55
+ // Only populated if the corresponding waypoint is an intermediate
56
+ // waypoint.
57
+ optional int32 intermediate_waypoint_request_index = 2;
58
+
59
+ // The type(s) of the result, in the form of zero or more type tags.
60
+ // Supported types:
61
+ // https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
62
+ repeated string type = 3;
63
+
64
+ // Indicates that the geocoder did not return an exact match for the original
65
+ // request, though it was able to match part of the requested address. You may
66
+ // wish to examine the original request for misspellings and/or an incomplete
67
+ // address.
68
+ bool partial_match = 4;
69
+
70
+ // The place ID for this result.
71
+ string place_id = 5;
72
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@ message Location {
38
38
  // This value is used to specify the side of the road to use for pickup and
39
39
  // drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
40
40
  // of due North, 90 specifies a heading of due East, etc. You can use this
41
- // field only for `DRIVE` and `TWO_WHEELER` travel modes.
41
+ // field only for `DRIVE` and `TWO_WHEELER`
42
+ // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
42
43
  google.protobuf.Int32Value heading = 2;
43
44
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -43,12 +43,12 @@ message Route {
43
43
  repeated RouteLabel route_labels = 13;
44
44
 
45
45
  // A collection of legs (path segments between waypoints) that make-up the
46
- // route. Each leg corresponds to the trip between two non-`via` Waypoints.
47
- // For example, a route with no intermediate waypoints has only one leg. A
48
- // route that includes one non-`via` intermediate waypoint has two legs. A
49
- // route that includes one `via` intermediate waypoint has one leg. The order
50
- // of the legs matches the order of Waypoints from `origin` to `intermediates`
51
- // to `destination`.
46
+ // route. Each leg corresponds to the trip between two non-`via`
47
+ // [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
48
+ // intermediate waypoints has only one leg. A route that includes one
49
+ // non-`via` intermediate waypoint has two legs. A route that includes one
50
+ // `via` intermediate waypoint has one leg. The order of the legs matches the
51
+ // order of Waypoints from `origin` to `intermediates` to `destination`.
52
52
  repeated RouteLeg legs = 1;
53
53
 
54
54
  // The travel distance of the route, in meters.
@@ -145,16 +145,7 @@ message RouteLegTravelAdvisory {
145
145
  // Encapsulates the additional information that the user should be informed
146
146
  // about, such as possible traffic zone restriction on a leg step.
147
147
  message RouteLegStepTravelAdvisory {
148
- // Speed reading intervals detailing traffic density. Applicable in case of
149
- // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
150
- // The intervals cover the entire polyline of the RouteLegStep without
151
- // overlap. The start point of a specified interval is the same as the end
152
- // point of the preceding interval.
153
- //
154
- // Example:
155
- //
156
- // polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
157
- // speed_reading_intervals: [A,C), [C,D), [D,G).
148
+ // NOTE: This field is not currently populated.
158
149
  repeated SpeedReadingInterval speed_reading_intervals = 1;
159
150
  }
160
151
 
@@ -197,8 +188,9 @@ message RouteLeg {
197
188
  RouteLegTravelAdvisory travel_advisory = 8;
198
189
  }
199
190
 
200
- // Encapsulates a segment of a `RouteLeg`. A step corresponds to a single
201
- // navigation instruction. Route legs are made up of steps.
191
+ // Encapsulates a segment of a [RouteLeg][google.maps.routing.v2.RouteLeg]. A
192
+ // step corresponds to a single navigation instruction. Route legs are made up
193
+ // of steps.
202
194
  message RouteLegStep {
203
195
  // The travel distance of this step, in meters. In some circumstances, this
204
196
  // field might not have a value.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@ option objc_class_prefix = "GMRV2";
26
26
  option php_namespace = "Google\\Maps\\Routing\\V2";
27
27
  option ruby_package = "Google::Maps::Routing::V2";
28
28
 
29
- // Labels for the `Route` that are useful to identify specific properties
30
- // of the route to compare against others.
29
+ // Labels for the [Route][google.maps.routing.v2.Route] that are useful to
30
+ // identify specific properties of the route to compare against others.
31
31
  enum RouteLabel {
32
32
  // Default - not used.
33
33
  ROUTE_LABEL_UNSPECIFIED = 0;
@@ -36,8 +36,9 @@ enum RouteLabel {
36
36
  DEFAULT_ROUTE = 1;
37
37
 
38
38
  // An alternative to the default "best" route. Routes like this will be
39
- // returned when `ComputeRoutesRequest.compute_alternative_routes` is
40
- // specified.
39
+ // returned when
40
+ // [compute_alternative_routes][google.maps.routing.v2.ComputeRoutesRequest.compute_alternative_routes]
41
+ // is specified.
41
42
  DEFAULT_ROUTE_ALTERNATE = 2;
42
43
 
43
44
  // Fuel efficient route. Routes labeled with this value are determined to be
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -34,22 +34,24 @@ option ruby_package = "Google::Maps::Routing::V2";
34
34
  message RouteModifiers {
35
35
  // Specifies whether to avoid toll roads where reasonable. Preference will be
36
36
  // given to routes not containing toll roads. Applies only to the `DRIVE` and
37
- // `TWO_WHEELER` travel modes.
37
+ // `TWO_WHEELER` [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
38
38
  bool avoid_tolls = 1;
39
39
 
40
40
  // Specifies whether to avoid highways where reasonable. Preference will be
41
41
  // given to routes not containing highways. Applies only to the `DRIVE` and
42
- // `TWO_WHEELER` travel modes.
42
+ // `TWO_WHEELER` [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
43
43
  bool avoid_highways = 2;
44
44
 
45
45
  // Specifies whether to avoid ferries where reasonable. Preference will be
46
46
  // given to routes not containing travel by ferries.
47
- // Applies only to the `DRIVE` and`TWO_WHEELER` travel modes.
47
+ // Applies only to the `DRIVE` and`TWO_WHEELER`
48
+ // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
48
49
  bool avoid_ferries = 3;
49
50
 
50
51
  // Specifies whether to avoid navigating indoors where reasonable. Preference
51
52
  // will be given to routes not containing indoor navigation.
52
- // Applies only to the `WALK` travel mode.
53
+ // Applies only to the `WALK`
54
+ // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
53
55
  bool avoid_indoor = 4;
54
56
 
55
57
  // Specifies the vehicle information.
@@ -59,6 +61,7 @@ message RouteModifiers {
59
61
  // If toll passes are provided, the API tries to return the pass price. If
60
62
  // toll passes are not provided, the API treats the toll pass as unknown and
61
63
  // tries to return the cash price.
62
- // Applies only to the DRIVE and TWO_WHEELER travel modes.
64
+ // Applies only to the `DRIVE` and `TWO_WHEELER`
65
+ // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
63
66
  repeated TollPass toll_passes = 6;
64
67
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -27,8 +27,8 @@ option php_namespace = "Google\\Maps\\Routing\\V2";
27
27
  option ruby_package = "Google::Maps::Routing::V2";
28
28
 
29
29
  // A set of values used to specify the mode of travel.
30
- // NOTE: WALK, BICYCLE, and TWO_WHEELER routes are in beta and might sometimes
31
- // be missing clear sidewalks, pedestrian paths, or bicycling paths.
30
+ // NOTE: `WALK`, `BICYCLE`, and `TWO_WHEELER` routes are in beta and might
31
+ // sometimes be missing clear sidewalks, pedestrian paths, or bicycling paths.
32
32
  // You must display this warning to the user for all walking, bicycling, and
33
33
  // two-wheel routes that you display in your app.
34
34
  enum RouteTravelMode {
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
20
20
  import "google/api/client.proto";
21
21
  import "google/api/field_behavior.proto";
22
22
  import "google/maps/routing/v2/fallback_info.proto";
23
+ import "google/maps/routing/v2/geocoding_results.proto";
23
24
  import "google/maps/routing/v2/polyline.proto";
24
25
  import "google/maps/routing/v2/route.proto";
25
26
  import "google/maps/routing/v2/route_modifiers.proto";
@@ -194,7 +195,8 @@ message ComputeRoutesRequest {
194
195
  [(google.api.field_behavior) = OPTIONAL];
195
196
 
196
197
  // Optional. Specifies whether to calculate alternate routes in addition to
197
- // the route.
198
+ // the route. No alternative routes are returned for requests that have
199
+ // intermediate waypoints.
198
200
  bool compute_alternative_routes = 8 [(google.api.field_behavior) = OPTIONAL];
199
201
 
200
202
  // Optional. A set of conditions to satisfy that affect the way routes are
@@ -209,17 +211,23 @@ message ComputeRoutesRequest {
209
211
  // display language is inferred from the location of the route request.
210
212
  string language_code = 10 [(google.api.field_behavior) = OPTIONAL];
211
213
 
214
+ // Optional. The region code, specified as a ccTLD ("top-level domain")
215
+ // two-character value. For more information see
216
+ // https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
217
+ string region_code = 16 [(google.api.field_behavior) = OPTIONAL];
218
+
212
219
  // Optional. Specifies the units of measure for the display fields. This
213
- // includes the `instruction` field in `NavigationInstruction`. The units of
214
- // measure used for the route, leg, step distance, and duration are not
215
- // affected by this value. If you don't provide this value, then the display
216
- // units are inferred from the location of the request.
220
+ // includes the `instruction` field in
221
+ // [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The
222
+ // units of measure used for the route, leg, step distance, and duration are
223
+ // not affected by this value. If you don't provide this value, then the
224
+ // display units are inferred from the location of the request.
217
225
  Units units = 11 [(google.api.field_behavior) = OPTIONAL];
218
226
 
219
227
  // Optional. Specifies what reference routes to calculate as part of the
220
228
  // request in addition to the default route. A reference route is a route with
221
229
  // a different route calculation objective than the default route. For example
222
- // an FUEL_EFFICIENT reference route calculation takes into account various
230
+ // a `FUEL_EFFICIENT` reference route calculation takes into account various
223
231
  // parameters that would generate an optimal fuel efficient route.
224
232
  repeated ReferenceRoute requested_reference_routes = 14
225
233
  [(google.api.field_behavior) = OPTIONAL];
@@ -246,6 +254,9 @@ message ComputeRoutesResponse {
246
254
  // computation. When fallback mode is used, this field contains detailed info
247
255
  // about the fallback response. Otherwise this field is unset.
248
256
  FallbackInfo fallback_info = 2;
257
+
258
+ // Contains geocoding response info for waypoints specified as addresses.
259
+ GeocodingResults geocoding_results = 3;
249
260
  }
250
261
 
251
262
  // ComputeRouteMatrix request message
@@ -294,6 +305,19 @@ message ComputeRouteMatrixRequest {
294
305
  google.protobuf.Timestamp departure_time = 5
295
306
  [(google.api.field_behavior) = OPTIONAL];
296
307
 
308
+ // Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
309
+ // information, see
310
+ // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See
311
+ // [Language Support](https://developers.google.com/maps/faq#languagesupport)
312
+ // for the list of supported languages. When you don't provide this value, the
313
+ // display language is inferred from the location of the first origin.
314
+ string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
315
+
316
+ // Optional. The region code, specified as a ccTLD ("top-level domain")
317
+ // two-character value. For more information see
318
+ // https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
319
+ string region_code = 9 [(google.api.field_behavior) = OPTIONAL];
320
+
297
321
  // Optional. A list of extra computations which may be used to complete the
298
322
  // request. Note: These extra computations may return extra fields on the
299
323
  // response. These extra fields must also be specified in the field mask to be
@@ -336,10 +360,11 @@ message RouteMatrixElement {
336
360
  int32 distance_meters = 4;
337
361
 
338
362
  // The length of time needed to navigate the route. If you set the
339
- // `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
340
- // `static_duration`. If you set the `routing_preference` to either
341
- // `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
342
- // taking traffic conditions into account.
363
+ // [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
364
+ // to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
365
+ // you set the `routing_preference` to either `TRAFFIC_AWARE` or
366
+ // `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
367
+ // conditions into account.
343
368
  google.protobuf.Duration duration = 5;
344
369
 
345
370
  // The duration of traveling through the route without taking traffic
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -35,12 +35,13 @@ enum RoutingPreference {
35
35
  // Computes routes without taking live traffic conditions into consideration.
36
36
  // Suitable when traffic conditions don't matter or are not applicable.
37
37
  // Using this value produces the lowest latency.
38
- // Note: For `RouteTravelMode` DRIVE and TWO_WHEELER choice of route and
39
- // duration are based on road network and average time-independent traffic
40
- // conditions. Results for a given request may vary over time due to changes
41
- // in the road network, updated average traffic conditions, and the
42
- // distributed nature of the service. Results may also vary between
43
- // nearly-equivalent routes at any time or frequency.
38
+ // Note: For [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] `DRIVE`
39
+ // and `TWO_WHEELER` choice of route and duration are based on road network
40
+ // and average time-independent traffic conditions. Results for a given
41
+ // request may vary over time due to changes in the road network, updated
42
+ // average traffic conditions, and the distributed nature of the service.
43
+ // Results may also vary between nearly-equivalent routes at any time or
44
+ // frequency.
44
45
  TRAFFIC_UNAWARE = 1;
45
46
 
46
47
  // Calculates routes taking live traffic conditions into consideration.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -52,6 +52,8 @@ message SpeedReadingInterval {
52
52
  // The ending index of this interval in the polyline.
53
53
  optional int32 end_polyline_point_index = 2;
54
54
 
55
- // Traffic speed in this interval.
56
- Speed speed = 3;
55
+ oneof speed_type {
56
+ // Traffic speed in this interval.
57
+ Speed speed = 3;
58
+ }
57
59
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -28,13 +28,15 @@ option objc_class_prefix = "GMRV2";
28
28
  option php_namespace = "Google\\Maps\\Routing\\V2";
29
29
  option ruby_package = "Google::Maps::Routing::V2";
30
30
 
31
- // Encapsulates toll information on a `Route` or on a `RouteLeg`.
31
+ // Encapsulates toll information on a [Route][google.maps.routing.v2.Route] or
32
+ // on a [RouteLeg][google.maps.routing.v2.RouteLeg].
32
33
  message TollInfo {
33
- // The monetary amount of tolls for the corresponding Route or RouteLeg.
34
- // This list contains a money amount for each currency that is expected
35
- // to be charged by the toll stations. Typically this list will contain only
36
- // one item for routes with tolls in one currency. For international trips,
37
- // this list may contain multiple items to reflect tolls in different
38
- // currencies.
34
+ // The monetary amount of tolls for the corresponding
35
+ // [Route][google.maps.routing.v2.Route] or
36
+ // [RouteLeg][google.maps.routing.v2.RouteLeg]. This list contains a money
37
+ // amount for each currency that is expected to be charged by the toll
38
+ // stations. Typically this list will contain only one item for routes with
39
+ // tolls in one currency. For international trips, this list may contain
40
+ // multiple items to reflect tolls in different currencies.
39
41
  repeated google.type.Money estimated_price = 1;
40
42
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -211,6 +211,9 @@ enum TollPass {
211
211
  // MI, USA.
212
212
  US_MI_AMBASSADOR_BRIDGE_PREMIER_COMMUTER_CARD = 36;
213
213
 
214
+ // MI, USA.
215
+ US_MI_BCPASS = 94;
216
+
214
217
  // MI, USA.
215
218
  US_MI_GROSSE_ILE_TOLL_BRIDGE_PASS_TAG = 37;
216
219
 
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -27,9 +27,10 @@ option php_namespace = "Google\\Maps\\Routing\\V2";
27
27
  option ruby_package = "Google::Maps::Routing::V2";
28
28
 
29
29
  // A set of values describing the vehicle's emission type.
30
- // Applies only to the DRIVE travel mode.
30
+ // Applies only to the `DRIVE`
31
+ // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
31
32
  enum VehicleEmissionType {
32
- // No emission type specified. Default to GASOLINE.
33
+ // No emission type specified. Default to `GASOLINE`.
33
34
  VEHICLE_EMISSION_TYPE_UNSPECIFIED = 0;
34
35
 
35
36
  // Gasoline/petrol fueled vehicle.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -32,6 +32,6 @@ option ruby_package = "Google::Maps::Routing::V2";
32
32
  // character.
33
33
  message VehicleInfo {
34
34
  // Describes the vehicle's emission type.
35
- // Applies only to the DRIVE travel mode.
35
+ // Applies only to the `DRIVE` travel mode.
36
36
  VehicleEmissionType emission_type = 2;
37
37
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -39,26 +39,31 @@ message Waypoint {
39
39
 
40
40
  // The POI Place ID associated with the waypoint.
41
41
  string place_id = 2;
42
+
43
+ // Human readable address or a plus code.
44
+ // See https://plus.codes for details.
45
+ string address = 7;
42
46
  }
43
47
 
44
48
  // Marks this waypoint as a milestone rather a stopping point. For
45
49
  // each non-via waypoint in the request, the response appends an entry to the
46
- // `legs` array to provide the details for stopovers on that leg of the
47
- // trip. Set this value to true when you want the route to pass through this
48
- // waypoint without stopping over. Via waypoints don't cause an entry to be
49
- // added to the `legs` array, but they do route the journey through the
50
- // waypoint. You can only set this value on waypoints that are intermediates.
51
- // The request fails if you set this field on terminal waypoints.
52
- // If `ComputeRoutesRequest.optimize_waypoint_order`
53
- // is set to true then this field cannot be set to
54
- // true; otherwise, the request fails.
50
+ // [legs][google.maps.routing.v2.Route.legs]
51
+ // array to provide the details for stopovers on that leg of the trip. Set
52
+ // this value to true when you want the route to pass through this waypoint
53
+ // without stopping over. Via waypoints don't cause an entry to be added to
54
+ // the `legs` array, but they do route the journey through the waypoint. You
55
+ // can only set this value on waypoints that are intermediates. The request
56
+ // fails if you set this field on terminal waypoints. If
57
+ // `ComputeRoutesRequest.optimize_waypoint_order` is set to true then this
58
+ // field cannot be set to true; otherwise, the request fails.
55
59
  bool via = 3;
56
60
 
57
61
  // Indicates that the waypoint is meant for vehicles to stop at, where the
58
62
  // intention is to either pickup or drop-off. When you set this value, the
59
63
  // calculated route won't include non-`via` waypoints on roads that are
60
64
  // unsuitable for pickup and drop-off. This option works only for `DRIVE` and
61
- // `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
65
+ // `TWO_WHEELER` travel modes, and when the `location_type` is
66
+ // [Location][google.maps.routing.v2.Location].
62
67
  bool vehicle_stopover = 4;
63
68
 
64
69
  // Indicates that the location of this waypoint is meant to have a preference
@@ -66,6 +71,6 @@ message Waypoint {
66
71
  // value, the route will pass through the location so that the vehicle can
67
72
  // stop at the side of road that the location is biased towards from the
68
73
  // center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
69
- // travel modes.
74
+ // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
70
75
  bool side_of_road = 5;
71
76
  }