Skip to content

Commit

Permalink
feat: [routing] moved speed in SpeedReadingInterval into a oneof spee…
Browse files Browse the repository at this point in the history
…d_type, this is a breaking change for Go client libraries (#4121)

* feat: moved speed in SpeedReadingInterval into a oneof speed_type, this is a breaking change for Go client libraries
docs: update proto comments to contain concrete references to other proto messages

PiperOrigin-RevId: 518398192

Source-Link: googleapis/googleapis@5dbc2b2

Source-Link: googleapis/googleapis-gen@e6636a8
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiZTY2MzZhODYzZTM2MjJjOTYyY2ViY2I2ZmJiZWMxYTk4NjMxNTg2NyJ9

* 🦉 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>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Mar 23, 2023
1 parent 269a7e4 commit 9878d72
Show file tree
Hide file tree
Showing 25 changed files with 153 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,11 +62,12 @@ enum FallbackRoutingMode {
// Not used.
FALLBACK_ROUTING_MODE_UNSPECIFIED = 0;

// Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the
// response.
// Indicates the `TRAFFIC_UNAWARE` [google.maps.routing.v2.RoutingPreference]
// was used to compute the response.
FALLBACK_TRAFFIC_UNAWARE = 1;

// Indicates the "TRAFFIC_AWARE" routing mode was used to compute the
// response.
// Indicates the `TRAFFIC_AWARE`
// [RoutingPreference][google.maps.routing.v2.RoutingPreference] was used to
// compute the response.
FALLBACK_TRAFFIC_AWARE = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ option objc_class_prefix = "GMRV2";
option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// Contains GeocodedWaypoints for origin, destination and intermediate
// waypoints. Only populated for address waypoints.
// Contains [GeocodedWaypoints][google.maps.routing.v2.GeocodedWaypoint] for
// origin, destination and intermediate waypoints. Only populated for address
// waypoints.
message GeocodingResults {
// Origin geocoded waypoint.
GeocodedWaypoint origin = 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,6 +38,7 @@ message Location {
// This value is used to specify the side of the road to use for pickup and
// drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
// of due North, 90 specifies a heading of due East, etc. You can use this
// field only for `DRIVE` and `TWO_WHEELER` travel modes.
// field only for `DRIVE` and `TWO_WHEELER`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
google.protobuf.Int32Value heading = 2;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,12 +43,12 @@ message Route {
repeated RouteLabel route_labels = 13;

// A collection of legs (path segments between waypoints) that make-up the
// route. Each leg corresponds to the trip between two non-`via` Waypoints.
// For example, a route with no intermediate waypoints has only one leg. A
// route that includes one non-`via` intermediate waypoint has two legs. A
// route that includes one `via` intermediate waypoint has one leg. The order
// of the legs matches the order of Waypoints from `origin` to `intermediates`
// to `destination`.
// route. Each leg corresponds to the trip between two non-`via`
// [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
// intermediate waypoints has only one leg. A route that includes one
// non-`via` intermediate waypoint has two legs. A route that includes one
// `via` intermediate waypoint has one leg. The order of the legs matches the
// order of Waypoints from `origin` to `intermediates` to `destination`.
repeated RouteLeg legs = 1;

// The travel distance of the route, in meters.
Expand Down Expand Up @@ -188,8 +188,9 @@ message RouteLeg {
RouteLegTravelAdvisory travel_advisory = 8;
}

// Encapsulates a segment of a `RouteLeg`. A step corresponds to a single
// navigation instruction. Route legs are made up of steps.
// Encapsulates a segment of a [RouteLeg][google.maps.routing.v2.RouteLeg]. A
// step corresponds to a single navigation instruction. Route legs are made up
// of steps.
message RouteLegStep {
// The travel distance of this step, in meters. In some circumstances, this
// field might not have a value.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -26,8 +26,8 @@ option objc_class_prefix = "GMRV2";
option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// Labels for the `Route` that are useful to identify specific properties
// of the route to compare against others.
// Labels for the [Route][google.maps.routing.v2.Route] that are useful to
// identify specific properties of the route to compare against others.
enum RouteLabel {
// Default - not used.
ROUTE_LABEL_UNSPECIFIED = 0;
Expand All @@ -36,8 +36,9 @@ enum RouteLabel {
DEFAULT_ROUTE = 1;

// An alternative to the default "best" route. Routes like this will be
// returned when `ComputeRoutesRequest.compute_alternative_routes` is
// specified.
// returned when
// [compute_alternative_routes][google.maps.routing.v2.ComputeRoutesRequest.compute_alternative_routes]
// is specified.
DEFAULT_ROUTE_ALTERNATE = 2;

// Fuel efficient route. Routes labeled with this value are determined to be
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,22 +34,24 @@ option ruby_package = "Google::Maps::Routing::V2";
message RouteModifiers {
// Specifies whether to avoid toll roads where reasonable. Preference will be
// given to routes not containing toll roads. Applies only to the `DRIVE` and
// `TWO_WHEELER` travel modes.
// `TWO_WHEELER` [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
bool avoid_tolls = 1;

// Specifies whether to avoid highways where reasonable. Preference will be
// given to routes not containing highways. Applies only to the `DRIVE` and
// `TWO_WHEELER` travel modes.
// `TWO_WHEELER` [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
bool avoid_highways = 2;

// Specifies whether to avoid ferries where reasonable. Preference will be
// given to routes not containing travel by ferries.
// Applies only to the `DRIVE` and`TWO_WHEELER` travel modes.
// Applies only to the `DRIVE` and`TWO_WHEELER`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
bool avoid_ferries = 3;

// Specifies whether to avoid navigating indoors where reasonable. Preference
// will be given to routes not containing indoor navigation.
// Applies only to the `WALK` travel mode.
// Applies only to the `WALK`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
bool avoid_indoor = 4;

// Specifies the vehicle information.
Expand All @@ -59,6 +61,7 @@ message RouteModifiers {
// If toll passes are provided, the API tries to return the pass price. If
// toll passes are not provided, the API treats the toll pass as unknown and
// tries to return the cash price.
// Applies only to the DRIVE and TWO_WHEELER travel modes.
// Applies only to the `DRIVE` and `TWO_WHEELER`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
repeated TollPass toll_passes = 6;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,8 +27,8 @@ option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// A set of values used to specify the mode of travel.
// NOTE: WALK, BICYCLE, and TWO_WHEELER routes are in beta and might sometimes
// be missing clear sidewalks, pedestrian paths, or bicycling paths.
// NOTE: `WALK`, `BICYCLE`, and `TWO_WHEELER` routes are in beta and might
// sometimes be missing clear sidewalks, pedestrian paths, or bicycling paths.
// You must display this warning to the user for all walking, bicycling, and
// two-wheel routes that you display in your app.
enum RouteTravelMode {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -217,16 +217,17 @@ message ComputeRoutesRequest {
string region_code = 16 [(google.api.field_behavior) = OPTIONAL];

// Optional. Specifies the units of measure for the display fields. This
// includes the `instruction` field in `NavigationInstruction`. The units of
// measure used for the route, leg, step distance, and duration are not
// affected by this value. If you don't provide this value, then the display
// units are inferred from the location of the request.
// includes the `instruction` field in
// [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The
// units of measure used for the route, leg, step distance, and duration are
// not affected by this value. If you don't provide this value, then the
// display units are inferred from the location of the request.
Units units = 11 [(google.api.field_behavior) = OPTIONAL];

// Optional. Specifies what reference routes to calculate as part of the
// 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
// an FUEL_EFFICIENT reference route calculation takes into account various
// a `FUEL_EFFICIENT` reference route calculation takes into account various
// parameters that would generate an optimal fuel efficient route.
repeated ReferenceRoute requested_reference_routes = 14
[(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -359,10 +360,11 @@ message RouteMatrixElement {
int32 distance_meters = 4;

// The length of time needed to navigate the route. If you set the
// `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
// `static_duration`. If you set the `routing_preference` to either
// `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
// taking traffic conditions into account.
// [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
// to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
// you set the `routing_preference` to either `TRAFFIC_AWARE` or
// `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
// conditions into account.
google.protobuf.Duration duration = 5;

// The duration of traveling through the route without taking traffic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,12 +35,13 @@ enum RoutingPreference {
// Computes routes without taking live traffic conditions into consideration.
// Suitable when traffic conditions don't matter or are not applicable.
// Using this value produces the lowest latency.
// Note: For `RouteTravelMode` DRIVE and TWO_WHEELER choice of route and
// duration are based on road network and average time-independent traffic
// conditions. Results for a given request may vary over time due to changes
// in the road network, updated average traffic conditions, and the
// distributed nature of the service. Results may also vary between
// nearly-equivalent routes at any time or frequency.
// Note: For [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] `DRIVE`
// and `TWO_WHEELER` choice of route and duration are based on road network
// and average time-independent traffic conditions. Results for a given
// request may vary over time due to changes in the road network, updated
// average traffic conditions, and the distributed nature of the service.
// Results may also vary between nearly-equivalent routes at any time or
// frequency.
TRAFFIC_UNAWARE = 1;

// Calculates routes taking live traffic conditions into consideration.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,6 +52,8 @@ message SpeedReadingInterval {
// The ending index of this interval in the polyline.
optional int32 end_polyline_point_index = 2;

// Traffic speed in this interval.
Speed speed = 3;
oneof speed_type {
// Traffic speed in this interval.
Speed speed = 3;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,13 +28,15 @@ option objc_class_prefix = "GMRV2";
option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// Encapsulates toll information on a `Route` or on a `RouteLeg`.
// Encapsulates toll information on a [Route][google.maps.routing.v2.Route] or
// on a [RouteLeg][google.maps.routing.v2.RouteLeg].
message TollInfo {
// The monetary amount of tolls for the corresponding Route or RouteLeg.
// This list contains a money amount for each currency that is expected
// to be charged by the toll stations. Typically this list will contain only
// one item for routes with tolls in one currency. For international trips,
// this list may contain multiple items to reflect tolls in different
// currencies.
// The monetary amount of tolls for the corresponding
// [Route][google.maps.routing.v2.Route] or
// [RouteLeg][google.maps.routing.v2.RouteLeg]. This list contains a money
// amount for each currency that is expected to be charged by the toll
// stations. Typically this list will contain only one item for routes with
// tolls in one currency. For international trips, this list may contain
// multiple items to reflect tolls in different currencies.
repeated google.type.Money estimated_price = 1;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -211,6 +211,9 @@ enum TollPass {
// MI, USA.
US_MI_AMBASSADOR_BRIDGE_PREMIER_COMMUTER_CARD = 36;

// MI, USA.
US_MI_BCPASS = 94;

// MI, USA.
US_MI_GROSSE_ILE_TOLL_BRIDGE_PASS_TAG = 37;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,9 +27,10 @@ option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// A set of values describing the vehicle's emission type.
// Applies only to the DRIVE travel mode.
// Applies only to the `DRIVE`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
enum VehicleEmissionType {
// No emission type specified. Default to GASOLINE.
// No emission type specified. Default to `GASOLINE`.
VEHICLE_EMISSION_TYPE_UNSPECIFIED = 0;

// Gasoline/petrol fueled vehicle.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,6 +32,6 @@ option ruby_package = "Google::Maps::Routing::V2";
// character.
message VehicleInfo {
// Describes the vehicle's emission type.
// Applies only to the DRIVE travel mode.
// Applies only to the `DRIVE` travel mode.
VehicleEmissionType emission_type = 2;
}
Loading

0 comments on commit 9878d72

Please sign in to comment.