-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [places] add
routing_parameters
to SearchNearbyRequest and Se…
…archTextRequest (#5688) * feat: add `routing_parameters` to SearchNearbyRequest and SearchTextRequest feat: add `search_along_route_parameters` to SearchTextRequest feat: add `routing_summaries` to SearchNearbyResponse and SearchTextResponse docs: A comment for field `contextual_contents` in message `.google.maps.places.v1.SearchTextResponse` is changed to be more assertive docs: A comment for field `open_now` in message `.google.maps.places.v1.Place` is changed to clarify what it means with new-since-previous-comment current and secondary opening hours fields Introduces search along route and trip time features. PiperOrigin-RevId: 675760040 Source-Link: googleapis/googleapis@4221919 Source-Link: googleapis/googleapis-gen@9caa94e Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI5Y2FhOTRlNmEzOTJhZWQ5ZmNjYTgxY2I4MDkxZmZlOWNkZmNlMDMzIn0= * 🦉 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
1 parent
8661267
commit 02aeffb
Showing
15 changed files
with
2,931 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
packages/google-maps-places/protos/google/maps/places/v1/polyline.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2024 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.maps.places.v1; | ||
|
||
option cc_enable_arenas = true; | ||
option csharp_namespace = "Google.Maps.Places.V1"; | ||
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "PolylineProto"; | ||
option java_package = "com.google.maps.places.v1"; | ||
option objc_class_prefix = "GMPSV1"; | ||
option php_namespace = "Google\\Maps\\Places\\V1"; | ||
|
||
// A route polyline. Only supports an [encoded | ||
// polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm), | ||
// which can be passed as a string and includes compression with minimal | ||
// lossiness. This is the Routes API default output. | ||
message Polyline { | ||
// Encapsulates the type of polyline. Routes API output defaults to | ||
// `encoded_polyline`. | ||
oneof polyline_type { | ||
// An [encoded | ||
// polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm), | ||
// as returned by the [Routes API by | ||
// default](https://developers.google.com/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes#polylineencoding). | ||
// See the | ||
// [encoder](https://developers.google.com/maps/documentation/utilities/polylineutility) | ||
// and | ||
// [decoder](https://developers.google.com/maps/documentation/routes/polylinedecoder) | ||
// tools. | ||
string encoded_polyline = 1; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
packages/google-maps-places/protos/google/maps/places/v1/route_modifiers.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2024 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.maps.places.v1; | ||
|
||
import "google/api/field_behavior.proto"; | ||
|
||
option cc_enable_arenas = true; | ||
option csharp_namespace = "Google.Maps.Places.V1"; | ||
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "RouteModifiersProto"; | ||
option java_package = "com.google.maps.places.v1"; | ||
option objc_class_prefix = "GMPSV1"; | ||
option php_namespace = "Google\\Maps\\Places\\V1"; | ||
|
||
// Encapsulates a set of optional conditions to satisfy when calculating the | ||
// routes. | ||
message RouteModifiers { | ||
// Optional. When set to true, avoids toll roads where reasonable, giving | ||
// preference to routes not containing toll roads. Applies only to the `DRIVE` | ||
// and `TWO_WHEELER` [`TravelMode`][google.maps.places.v1.TravelMode]. | ||
bool avoid_tolls = 1 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. When set to true, avoids highways where reasonable, giving | ||
// preference to routes not containing highways. Applies only to the `DRIVE` | ||
// and `TWO_WHEELER` [`TravelMode`][google.maps.places.v1.TravelMode]. | ||
bool avoid_highways = 2 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. When set to true, avoids ferries where reasonable, giving | ||
// preference to routes not containing ferries. Applies only to the `DRIVE` | ||
// and `TWO_WHEELER` [`TravelMode`][google.maps.places.v1.TravelMode]. | ||
bool avoid_ferries = 3 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. When set to true, avoids navigating indoors where reasonable, | ||
// giving preference to routes not containing indoor navigation. Applies only | ||
// to the `WALK` [`TravelMode`][google.maps.places.v1.TravelMode]. | ||
bool avoid_indoor = 4 [(google.api.field_behavior) = OPTIONAL]; | ||
} |
57 changes: 57 additions & 0 deletions
57
packages/google-maps-places/protos/google/maps/places/v1/routing_preference.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2024 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.maps.places.v1; | ||
|
||
option cc_enable_arenas = true; | ||
option csharp_namespace = "Google.Maps.Places.V1"; | ||
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "RoutingPreferenceProto"; | ||
option java_package = "com.google.maps.places.v1"; | ||
option objc_class_prefix = "GMPSV1"; | ||
option php_namespace = "Google\\Maps\\Places\\V1"; | ||
|
||
// A set of values that specify factors to take into consideration when | ||
// calculating the route. | ||
enum RoutingPreference { | ||
// No routing preference specified. Default to `TRAFFIC_UNAWARE`. | ||
ROUTING_PREFERENCE_UNSPECIFIED = 0; | ||
|
||
// 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 [`TravelMode`][google.maps.places.v1.TravelMode] | ||
// `DRIVE` and `TWO_WHEELER`, the route and duration chosen are based on road | ||
// network and average time-independent traffic conditions, not current road | ||
// conditions. Consequently, routes may include roads that are temporarily | ||
// closed. 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. | ||
// In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to | ||
// significantly reduce latency. | ||
TRAFFIC_AWARE = 2; | ||
|
||
// Calculates the routes taking live traffic conditions into consideration, | ||
// without applying most performance optimizations. Using this value produces | ||
// the highest latency. | ||
TRAFFIC_AWARE_OPTIMAL = 3; | ||
} |
54 changes: 54 additions & 0 deletions
54
packages/google-maps-places/protos/google/maps/places/v1/routing_summary.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2024 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.maps.places.v1; | ||
|
||
import "google/protobuf/duration.proto"; | ||
|
||
option cc_enable_arenas = true; | ||
option csharp_namespace = "Google.Maps.Places.V1"; | ||
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "RoutingSummaryProto"; | ||
option java_package = "com.google.maps.places.v1"; | ||
option objc_class_prefix = "GMPSV1"; | ||
option php_namespace = "Google\\Maps\\Places\\V1"; | ||
|
||
// The duration and distance from the routing origin to a place in the | ||
// response, and a second leg from that place to the destination, if requested. | ||
// Note: Adding `routingSummaries` in the field mask without also including | ||
// either the `routingParameters.origin` parameter or the | ||
// `searchAlongRouteParameters.polyline.encodedPolyline` parameter in the | ||
// request causes an error. | ||
message RoutingSummary { | ||
// A leg is a single portion of a journey from one location to another. | ||
message Leg { | ||
// The time it takes to complete this leg of the trip. | ||
google.protobuf.Duration duration = 1; | ||
|
||
// The distance of this leg of the trip. | ||
int32 distance_meters = 2; | ||
} | ||
|
||
// The legs of the trip. | ||
// | ||
// When you calculate travel duration and distance from a set origin, `legs` | ||
// contains a single leg containing the duration and distance from the origin | ||
// to the destination. When you do a search along route, `legs` contains two | ||
// legs: one from the origin to place, and one from the place to the | ||
// destination. | ||
repeated Leg legs = 1; | ||
} |
Oops, something went wrong.