@googlemaps/places 1.5.0 → 1.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.0](https://github.com/googleapis/google-cloud-node/compare/places-v1.6.0...places-v1.7.0) (2024-09-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * [places] add `routing_parameters` to SearchNearbyRequest and SearchTextRequest ([#5688](https://github.com/googleapis/google-cloud-node/issues/5688)) ([02aeffb](https://github.com/googleapis/google-cloud-node/commit/02aeffb9d539fb6612c53887f61f398bdd12aaab))
9
+
10
+ ## [1.6.0](https://github.com/googleapis/google-cloud-node/compare/places-v1.5.0...places-v1.6.0) (2024-05-23)
11
+
12
+
13
+ ### Features
14
+
15
+ * [places] add `generative_summary` and `area_summary` for place summaries ([#5364](https://github.com/googleapis/google-cloud-node/issues/5364)) ([b0fbf7b](https://github.com/googleapis/google-cloud-node/commit/b0fbf7b73894284dd46aea5faa0a91f97123a194))
16
+
3
17
  ## [1.5.0](https://github.com/googleapis/google-cloud-node/compare/places-v1.4.0...places-v1.5.0) (2024-05-21)
4
18
 
5
19
 
package/README.md CHANGED
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
44
44
  1. [Select or create a Cloud Platform project][projects].
45
45
  1. [Enable billing for your project][billing].
46
46
  1. [Enable the Places API (New) 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
48
48
  API from your local workstation.
49
49
 
50
50
  ### Installing the client library
@@ -167,4 +167,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
167
167
  [projects]: https://console.cloud.google.com/project
168
168
  [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
169
169
  [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=places.googleapis.com
170
- [auth]: https://cloud.google.com/docs/authentication/getting-started
170
+ [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
@@ -0,0 +1,45 @@
1
+ // Copyright 2024 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.places.v1;
18
+
19
+ import "google/maps/places/v1/reference.proto";
20
+ import "google/type/localized_text.proto";
21
+
22
+ option cc_enable_arenas = true;
23
+ option csharp_namespace = "Google.Maps.Places.V1";
24
+ option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "ContentBlockProto";
27
+ option java_package = "com.google.maps.places.v1";
28
+ option objc_class_prefix = "GMPSV1";
29
+ option php_namespace = "Google\\Maps\\Places\\V1";
30
+
31
+ // A block of content that can be served individually.
32
+ message ContentBlock {
33
+ // The topic of the content, for example "overview" or "restaurant".
34
+ string topic = 1;
35
+
36
+ // Content related to the topic.
37
+ google.type.LocalizedText content = 2;
38
+
39
+ // Experimental: See
40
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
41
+ // for more details.
42
+ //
43
+ // References that are related to this block of content.
44
+ References references = 3;
45
+ }
@@ -0,0 +1,120 @@
1
+ // Copyright 2024 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.places.v1;
18
+
19
+ import "google/maps/places/v1/photo.proto";
20
+ import "google/maps/places/v1/review.proto";
21
+
22
+ option cc_enable_arenas = true;
23
+ option csharp_namespace = "Google.Maps.Places.V1";
24
+ option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "ContextualContentProto";
27
+ option java_package = "com.google.maps.places.v1";
28
+ option objc_class_prefix = "GMPSV1";
29
+ option php_namespace = "Google\\Maps\\Places\\V1";
30
+
31
+ // Experimental: See
32
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
33
+ // for more details.
34
+ //
35
+ // Content that is contextual to the place query.
36
+ message ContextualContent {
37
+ // Experimental: See
38
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
39
+ // for more details.
40
+ //
41
+ // Justifications for the place. Justifications answers the question of why a
42
+ // place could interest an end user.
43
+ message Justification {
44
+ // Experimental: See
45
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
46
+ // for more details.
47
+ //
48
+ // User review justifications. This highlights a section of the user review
49
+ // that would interest an end user. For instance, if the search query is
50
+ // "firewood pizza", the review justification highlights the text relevant
51
+ // to the search query.
52
+ message ReviewJustification {
53
+ // The text highlighted by the justification. This is a subset of the
54
+ // review itself. The exact word to highlight is marked by the
55
+ // HighlightedTextRange. There could be several words in the text being
56
+ // highlighted.
57
+ message HighlightedText {
58
+ // The range of highlighted text.
59
+ message HighlightedTextRange {
60
+ int32 start_index = 1;
61
+
62
+ int32 end_index = 2;
63
+ }
64
+
65
+ string text = 1;
66
+
67
+ // The list of the ranges of the highlighted text.
68
+ repeated HighlightedTextRange highlighted_text_ranges = 2;
69
+ }
70
+
71
+ HighlightedText highlighted_text = 1;
72
+
73
+ // The review that the highlighted text is generated from.
74
+ Review review = 2;
75
+ }
76
+
77
+ // Experimental: See
78
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
79
+ // for more details.
80
+ // BusinessAvailabilityAttributes justifications. This shows some attributes
81
+ // a business has that could interest an end user.
82
+ message BusinessAvailabilityAttributesJustification {
83
+ // If a place provides takeout.
84
+ bool takeout = 1;
85
+
86
+ // If a place provides delivery.
87
+ bool delivery = 2;
88
+
89
+ // If a place provides dine-in.
90
+ bool dine_in = 3;
91
+ }
92
+
93
+ oneof justification {
94
+ // Experimental: See
95
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
96
+ // for more details.
97
+ ReviewJustification review_justification = 1;
98
+
99
+ // Experimental: See
100
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
101
+ // for more details.
102
+ BusinessAvailabilityAttributesJustification
103
+ business_availability_attributes_justification = 2;
104
+ }
105
+ }
106
+
107
+ // List of reviews about this place, contexual to the place query.
108
+ repeated Review reviews = 1;
109
+
110
+ // Information (including references) about photos of this place, contexual to
111
+ // the place query.
112
+ repeated Photo photos = 2;
113
+
114
+ // Experimental: See
115
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
116
+ // for more details.
117
+ //
118
+ // Justifications for the place.
119
+ repeated Justification justifications = 3;
120
+ }
@@ -18,9 +18,11 @@ package google.maps.places.v1;
18
18
 
19
19
  import "google/api/resource.proto";
20
20
  import "google/geo/type/viewport.proto";
21
+ import "google/maps/places/v1/content_block.proto";
21
22
  import "google/maps/places/v1/ev_charging.proto";
22
23
  import "google/maps/places/v1/fuel_options.proto";
23
24
  import "google/maps/places/v1/photo.proto";
25
+ import "google/maps/places/v1/reference.proto";
24
26
  import "google/maps/places/v1/review.proto";
25
27
  import "google/type/date.proto";
26
28
  import "google/type/latlng.proto";
@@ -165,8 +167,10 @@ message Place {
165
167
  google.type.Date date = 1;
166
168
  }
167
169
 
168
- // Is this place open right now? Always present unless we lack time-of-day
169
- // or timezone data for these opening hours.
170
+ // Whether the opening hours period is currently active. For regular opening
171
+ // hours and current opening hours, this field means whether the place is
172
+ // open. For secondary opening hours and current secondary opening hours,
173
+ // this field means whether the secondary hours of this place is active.
170
174
  optional bool open_now = 1;
171
175
 
172
176
  // The periods that this place is open during the week. The periods are in
@@ -283,6 +287,33 @@ message Place {
283
287
  optional bool wheelchair_accessible_seating = 4;
284
288
  }
285
289
 
290
+ // Experimental: See
291
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
292
+ // for more details.
293
+ //
294
+ // AI-generated summary of the place.
295
+ message GenerativeSummary {
296
+ // The overview of the place.
297
+ google.type.LocalizedText overview = 1;
298
+
299
+ // The detailed description of the place.
300
+ google.type.LocalizedText description = 2;
301
+
302
+ // References that are used to generate the summary description.
303
+ References references = 3;
304
+ }
305
+
306
+ // Experimental: See
307
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
308
+ // for more details.
309
+ //
310
+ // AI-generated summary of the area that the place is in.
311
+ message AreaSummary {
312
+ // Content blocks that compose the area summary. Each block has a separate
313
+ // topic about the area.
314
+ repeated ContentBlock content_blocks = 4;
315
+ }
316
+
286
317
  // This Place's resource name, in `places/{place_id}` format. Can be used to
287
318
  // look up the Place.
288
319
  string name = 1;
@@ -517,6 +548,20 @@ message Place {
517
548
 
518
549
  // Information of ev charging options.
519
550
  EVChargeOptions ev_charge_options = 79;
551
+
552
+ // Experimental: See
553
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
554
+ // for more details.
555
+ //
556
+ // AI-generated summary of the place.
557
+ GenerativeSummary generative_summary = 80;
558
+
559
+ // Experimental: See
560
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
561
+ // for more details.
562
+ //
563
+ // AI-generated summary of the area that the place is in.
564
+ AreaSummary area_summary = 81;
520
565
  }
521
566
 
522
567
  // Price level of the place.
@@ -21,9 +21,15 @@ import "google/api/client.proto";
21
21
  import "google/api/field_behavior.proto";
22
22
  import "google/api/resource.proto";
23
23
  import "google/geo/type/viewport.proto";
24
+ import "google/maps/places/v1/contextual_content.proto";
24
25
  import "google/maps/places/v1/ev_charging.proto";
25
26
  import "google/maps/places/v1/geometry.proto";
26
27
  import "google/maps/places/v1/place.proto";
28
+ import "google/maps/places/v1/polyline.proto";
29
+ import "google/maps/places/v1/route_modifiers.proto";
30
+ import "google/maps/places/v1/routing_preference.proto";
31
+ import "google/maps/places/v1/routing_summary.proto";
32
+ import "google/maps/places/v1/travel_mode.proto";
27
33
  import "google/type/latlng.proto";
28
34
 
29
35
  option cc_enable_arenas = true;
@@ -86,6 +92,28 @@ service Places {
86
92
  }
87
93
  }
88
94
 
95
+ // Parameters to configure the routing calculations to the places in the
96
+ // response, both along a route (where result ranking will be influenced) and
97
+ // for calculating travel times on results.
98
+ message RoutingParameters {
99
+ // Optional. An explicit routing origin that overrides the origin defined in
100
+ // the polyline. By default, the polyline origin is used.
101
+ google.type.LatLng origin = 1 [(google.api.field_behavior) = OPTIONAL];
102
+
103
+ // Optional. The travel mode.
104
+ TravelMode travel_mode = 2 [(google.api.field_behavior) = OPTIONAL];
105
+
106
+ // Optional. The route modifiers.
107
+ RouteModifiers route_modifiers = 3 [(google.api.field_behavior) = OPTIONAL];
108
+
109
+ // Optional. Specifies how to compute the routing summaries. The server
110
+ // attempts to use the selected routing preference to compute the route. The
111
+ // traffic aware routing preference is only available for the `DRIVE` or
112
+ // `TWO_WHEELER` `travelMode`.
113
+ RoutingPreference routing_preference = 4
114
+ [(google.api.field_behavior) = OPTIONAL];
115
+ }
116
+
89
117
  // Request proto for Search Nearby.
90
118
  //
91
119
  //
@@ -221,6 +249,10 @@ message SearchNearbyRequest {
221
249
 
222
250
  // How results will be ranked in the response.
223
251
  RankPreference rank_preference = 9;
252
+
253
+ // Optional. Parameters that affect the routing to the search results.
254
+ RoutingParameters routing_parameters = 10
255
+ [(google.api.field_behavior) = OPTIONAL];
224
256
  }
225
257
 
226
258
  // Response proto for Search Nearby.
@@ -229,6 +261,13 @@ message SearchNearbyResponse {
229
261
  // A list of places that meets user's requirements like places
230
262
  // types, number of places and specific location restriction.
231
263
  repeated Place places = 1;
264
+
265
+ // A list of routing summaries where each entry associates to the
266
+ // corresponding place in the same index in the places field. If the routing
267
+ // summary is not available for one of the places, it will contain an empty
268
+ // entry. This list should have as many entries as the list of places if
269
+ // requested.
270
+ repeated RoutingSummary routing_summaries = 2;
232
271
  }
233
272
 
234
273
  // Request proto for SearchText.
@@ -294,6 +333,25 @@ message SearchTextRequest {
294
333
  [(google.api.field_behavior) = OPTIONAL];
295
334
  }
296
335
 
336
+ // Specifies a precalculated polyline from the [Routes
337
+ // API](https://developers.google.com/maps/documentation/routes) defining the
338
+ // route to search. Searching along a route is similar to using the
339
+ // `locationBias` or `locationRestriction` request option to bias the search
340
+ // results. However, while the `locationBias` and `locationRestriction`
341
+ // options let you specify a region to bias the search results, this option
342
+ // lets you bias the results along a trip route.
343
+ //
344
+ // Results are not guaranteed to be along the route provided, but rather are
345
+ // ranked within the search area defined by the polyline and, optionally, by
346
+ // the `locationBias` or `locationRestriction` based on minimal detour times
347
+ // from origin to destination. The results might be along an alternate route,
348
+ // especially if the provided polyline does not define an optimal route from
349
+ // origin to destination.
350
+ message SearchAlongRouteParameters {
351
+ // Required. The route polyline.
352
+ Polyline polyline = 1 [(google.api.field_behavior) = REQUIRED];
353
+ }
354
+
297
355
  // Required. The text query for textual search.
298
356
  string text_query = 1 [(google.api.field_behavior) = REQUIRED];
299
357
 
@@ -364,6 +422,14 @@ message SearchTextRequest {
364
422
 
365
423
  // Optional. Set the searchable EV options of a place search request.
366
424
  EVOptions ev_options = 15 [(google.api.field_behavior) = OPTIONAL];
425
+
426
+ // Optional. Additional parameters for routing to results.
427
+ RoutingParameters routing_parameters = 16
428
+ [(google.api.field_behavior) = OPTIONAL];
429
+
430
+ // Optional. Additional parameters proto for searching along a route.
431
+ SearchAlongRouteParameters search_along_route_parameters = 17
432
+ [(google.api.field_behavior) = OPTIONAL];
367
433
  }
368
434
 
369
435
  // Response proto for SearchText.
@@ -371,6 +437,26 @@ message SearchTextRequest {
371
437
  message SearchTextResponse {
372
438
  // A list of places that meet the user's text search criteria.
373
439
  repeated Place places = 1;
440
+
441
+ // A list of routing summaries where each entry associates to the
442
+ // corresponding place in the same index in the places field. If the routing
443
+ // summary is not available for one of the places, it will contain an empty
444
+ // entry. This list will have as many entries as the list of places if
445
+ // requested.
446
+ repeated RoutingSummary routing_summaries = 2;
447
+
448
+ // Experimental: See
449
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
450
+ // for more details.
451
+ //
452
+ // A list of contextual contents where each entry associates to the
453
+ // corresponding place in the same index in the places field. The contents
454
+ // that are relevant to the `text_query` in the request are preferred. If the
455
+ // contextual content is not available for one of the places, it will return
456
+ // non-contextual content. It will be empty only when the content is
457
+ // unavailable for this place. This list will have as many entries as the
458
+ // list of places if requested.
459
+ repeated ContextualContent contextual_contents = 3;
374
460
  }
375
461
 
376
462
  // Request for fetching a photo of a place using a photo resource name.
@@ -542,11 +628,11 @@ message AutocompletePlacesRequest {
542
628
  [(google.api.field_behavior) = OPTIONAL];
543
629
 
544
630
  // Optional. Included primary Place type (for example, "restaurant" or
545
- // "gas_station") from
546
- // https://developers.google.com/maps/documentation/places/web-service/place-types.
547
- // A Place is only returned if its primary type is included in this list. Up
548
- // to 5 values can be specified. If no types are specified, all Place types
549
- // are returned.
631
+ // "gas_station") in Place Types
632
+ // (https://developers.google.com/maps/documentation/places/web-service/place-types),
633
+ // or only `(regions)`, or only `(cities)`. A Place is only returned if its
634
+ // primary type is included in this list. Up to 5 values can be specified. If
635
+ // no types are specified, all Place types are returned.
550
636
  repeated string included_primary_types = 4
551
637
  [(google.api.field_behavior) = OPTIONAL];
552
638
 
@@ -0,0 +1,47 @@
1
+ // Copyright 2024 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.places.v1;
18
+
19
+ option cc_enable_arenas = true;
20
+ option csharp_namespace = "Google.Maps.Places.V1";
21
+ option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "PolylineProto";
24
+ option java_package = "com.google.maps.places.v1";
25
+ option objc_class_prefix = "GMPSV1";
26
+ option php_namespace = "Google\\Maps\\Places\\V1";
27
+
28
+ // A route polyline. Only supports an [encoded
29
+ // polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm),
30
+ // which can be passed as a string and includes compression with minimal
31
+ // lossiness. This is the Routes API default output.
32
+ message Polyline {
33
+ // Encapsulates the type of polyline. Routes API output defaults to
34
+ // `encoded_polyline`.
35
+ oneof polyline_type {
36
+ // An [encoded
37
+ // polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm),
38
+ // as returned by the [Routes API by
39
+ // default](https://developers.google.com/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes#polylineencoding).
40
+ // See the
41
+ // [encoder](https://developers.google.com/maps/documentation/utilities/polylineutility)
42
+ // and
43
+ // [decoder](https://developers.google.com/maps/documentation/routes/polylinedecoder)
44
+ // tools.
45
+ string encoded_polyline = 1;
46
+ }
47
+ }
@@ -0,0 +1,45 @@
1
+ // Copyright 2024 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.places.v1;
18
+
19
+ import "google/api/resource.proto";
20
+ import "google/maps/places/v1/review.proto";
21
+
22
+ option cc_enable_arenas = true;
23
+ option csharp_namespace = "Google.Maps.Places.V1";
24
+ option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "ReferenceProto";
27
+ option java_package = "com.google.maps.places.v1";
28
+ option objc_class_prefix = "GMPSV1";
29
+ option php_namespace = "Google\\Maps\\Places\\V1";
30
+
31
+ // Experimental: See
32
+ // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative
33
+ // for more details.
34
+ //
35
+ // Reference that the generative content is related to.
36
+ message References {
37
+ // Reviews that serve as references.
38
+ repeated Review reviews = 1;
39
+
40
+ // The list of resource names of the referenced places. This name can be used
41
+ // in other APIs that accept Place resource names.
42
+ repeated string places = 2 [
43
+ (google.api.resource_reference) = { type: "places.googleapis.com/Place" }
44
+ ];
45
+ }
@@ -0,0 +1,52 @@
1
+ // Copyright 2024 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.places.v1;
18
+
19
+ import "google/api/field_behavior.proto";
20
+
21
+ option cc_enable_arenas = true;
22
+ option csharp_namespace = "Google.Maps.Places.V1";
23
+ option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
24
+ option java_multiple_files = true;
25
+ option java_outer_classname = "RouteModifiersProto";
26
+ option java_package = "com.google.maps.places.v1";
27
+ option objc_class_prefix = "GMPSV1";
28
+ option php_namespace = "Google\\Maps\\Places\\V1";
29
+
30
+ // Encapsulates a set of optional conditions to satisfy when calculating the
31
+ // routes.
32
+ message RouteModifiers {
33
+ // Optional. When set to true, avoids toll roads where reasonable, giving
34
+ // preference to routes not containing toll roads. Applies only to the `DRIVE`
35
+ // and `TWO_WHEELER` [`TravelMode`][google.maps.places.v1.TravelMode].
36
+ bool avoid_tolls = 1 [(google.api.field_behavior) = OPTIONAL];
37
+
38
+ // Optional. When set to true, avoids highways where reasonable, giving
39
+ // preference to routes not containing highways. Applies only to the `DRIVE`
40
+ // and `TWO_WHEELER` [`TravelMode`][google.maps.places.v1.TravelMode].
41
+ bool avoid_highways = 2 [(google.api.field_behavior) = OPTIONAL];
42
+
43
+ // Optional. When set to true, avoids ferries where reasonable, giving
44
+ // preference to routes not containing ferries. Applies only to the `DRIVE`
45
+ // and `TWO_WHEELER` [`TravelMode`][google.maps.places.v1.TravelMode].
46
+ bool avoid_ferries = 3 [(google.api.field_behavior) = OPTIONAL];
47
+
48
+ // Optional. When set to true, avoids navigating indoors where reasonable,
49
+ // giving preference to routes not containing indoor navigation. Applies only
50
+ // to the `WALK` [`TravelMode`][google.maps.places.v1.TravelMode].
51
+ bool avoid_indoor = 4 [(google.api.field_behavior) = OPTIONAL];
52
+ }
@@ -0,0 +1,57 @@
1
+ // Copyright 2024 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.places.v1;
18
+
19
+ option cc_enable_arenas = true;
20
+ option csharp_namespace = "Google.Maps.Places.V1";
21
+ option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "RoutingPreferenceProto";
24
+ option java_package = "com.google.maps.places.v1";
25
+ option objc_class_prefix = "GMPSV1";
26
+ option php_namespace = "Google\\Maps\\Places\\V1";
27
+
28
+ // A set of values that specify factors to take into consideration when
29
+ // calculating the route.
30
+ enum RoutingPreference {
31
+ // No routing preference specified. Default to `TRAFFIC_UNAWARE`.
32
+ ROUTING_PREFERENCE_UNSPECIFIED = 0;
33
+
34
+ // Computes routes without taking live traffic conditions into consideration.
35
+ // Suitable when traffic conditions don't matter or are not applicable.
36
+ // Using this value produces the lowest latency.
37
+ // Note: For [`TravelMode`][google.maps.places.v1.TravelMode]
38
+ // `DRIVE` and `TWO_WHEELER`, the route and duration chosen are based on road
39
+ // network and average time-independent traffic conditions, not current road
40
+ // conditions. Consequently, routes may include roads that are temporarily
41
+ // closed. Results for a given
42
+ // request may vary over time due to changes in the road network, updated
43
+ // average traffic conditions, and the distributed nature of the service.
44
+ // Results may also vary between nearly-equivalent routes at any time or
45
+ // frequency.
46
+ TRAFFIC_UNAWARE = 1;
47
+
48
+ // Calculates routes taking live traffic conditions into consideration.
49
+ // In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to
50
+ // significantly reduce latency.
51
+ TRAFFIC_AWARE = 2;
52
+
53
+ // Calculates the routes taking live traffic conditions into consideration,
54
+ // without applying most performance optimizations. Using this value produces
55
+ // the highest latency.
56
+ TRAFFIC_AWARE_OPTIMAL = 3;
57
+ }