@googlemaps/places 1.2.0 → 1.4.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 +14 -0
- package/README.md +1 -0
- package/build/protos/google/maps/places/v1/place.proto +7 -5
- package/build/protos/google/maps/places/v1/places_service.proto +322 -6
- package/build/protos/protos.d.ts +2358 -348
- package/build/protos/protos.js +15820 -9944
- package/build/protos/protos.json +636 -16
- package/build/src/v1/places_client.d.ts +131 -4
- package/build/src/v1/places_client.js +27 -7
- package/build/src/v1/places_client.js.map +1 -1
- package/build/src/v1/places_client_config.json +4 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.0](https://github.com/googleapis/google-cloud-node/compare/places-v1.3.0...places-v1.4.0) (2024-03-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* [Many APIs] add several fields to manage state of database encryption update ([#5193](https://github.com/googleapis/google-cloud-node/issues/5193)) ([333b409](https://github.com/googleapis/google-cloud-node/commit/333b40951a255ecfab249bd6e7ace5877270ec85))
|
|
9
|
+
|
|
10
|
+
## [1.3.0](https://github.com/googleapis/google-cloud-node/compare/places-v1.2.0...places-v1.3.0) (2024-02-22)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* [places] add AutoComplete API ([#5056](https://github.com/googleapis/google-cloud-node/issues/5056)) ([c53c6ea](https://github.com/googleapis/google-cloud-node/commit/c53c6ea8311a921b16a4e3b3c4d3d941afd82245))
|
|
16
|
+
|
|
3
17
|
## [1.2.0](https://github.com/googleapis/google-cloud-node/compare/places-v1.1.0...places-v1.2.0) (2024-02-09)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -93,6 +93,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
|
|
|
93
93
|
|
|
94
94
|
| Sample | Source Code | Try it |
|
|
95
95
|
| --------------------------- | --------------------------------- | ------ |
|
|
96
|
+
| Places.autocomplete_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js,packages/google-maps-places/samples/README.md) |
|
|
96
97
|
| Places.get_photo_media | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_photo_media.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_photo_media.js,packages/google-maps-places/samples/README.md) |
|
|
97
98
|
| Places.get_place | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_place.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_place.js,packages/google-maps-places/samples/README.md) |
|
|
98
99
|
| Places.search_nearby | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_nearby.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_nearby.js,packages/google-maps-places/samples/README.md) |
|
|
@@ -283,8 +283,8 @@ message Place {
|
|
|
283
283
|
optional bool wheelchair_accessible_seating = 4;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
//
|
|
287
|
-
//
|
|
286
|
+
// This Place's resource name, in `places/{place_id}` format. Can be used to
|
|
287
|
+
// look up the Place.
|
|
288
288
|
string name = 1;
|
|
289
289
|
|
|
290
290
|
// The unique identifier of a place.
|
|
@@ -362,7 +362,8 @@ message Place {
|
|
|
362
362
|
// chain.
|
|
363
363
|
string website_uri = 16;
|
|
364
364
|
|
|
365
|
-
// List of reviews about this place, sorted by relevance.
|
|
365
|
+
// List of reviews about this place, sorted by relevance. A maximum of 5
|
|
366
|
+
// reviews can be returned.
|
|
366
367
|
repeated Review reviews = 53;
|
|
367
368
|
|
|
368
369
|
// The regular hours of operation.
|
|
@@ -373,7 +374,8 @@ message Place {
|
|
|
373
374
|
// fractions of an hour, e.g. X hours and 15 minutes.
|
|
374
375
|
optional int32 utc_offset_minutes = 22;
|
|
375
376
|
|
|
376
|
-
// Information (including references) about photos of this place.
|
|
377
|
+
// Information (including references) about photos of this place. A maximum of
|
|
378
|
+
// 10 photos can be returned.
|
|
377
379
|
repeated Photo photos = 54;
|
|
378
380
|
|
|
379
381
|
// The place's address in adr microformat: http://microformats.org/wiki/adr.
|
|
@@ -534,6 +536,6 @@ enum PriceLevel {
|
|
|
534
536
|
// Place provides expensive services.
|
|
535
537
|
PRICE_LEVEL_EXPENSIVE = 4;
|
|
536
538
|
|
|
537
|
-
// Place provides very expensive
|
|
539
|
+
// Place provides very expensive services.
|
|
538
540
|
PRICE_LEVEL_VERY_EXPENSIVE = 5;
|
|
539
541
|
}
|
|
@@ -21,8 +21,10 @@ 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/ev_charging.proto";
|
|
24
25
|
import "google/maps/places/v1/geometry.proto";
|
|
25
26
|
import "google/maps/places/v1/place.proto";
|
|
27
|
+
import "google/type/latlng.proto";
|
|
26
28
|
|
|
27
29
|
option cc_enable_arenas = true;
|
|
28
30
|
option csharp_namespace = "Google.Maps.Places.V1";
|
|
@@ -66,13 +68,23 @@ service Places {
|
|
|
66
68
|
option (google.api.method_signature) = "name";
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
// Get
|
|
71
|
+
// Get the details of a place based on its resource name, which is a string
|
|
72
|
+
// in the `places/{place_id}` format.
|
|
70
73
|
rpc GetPlace(GetPlaceRequest) returns (Place) {
|
|
71
74
|
option (google.api.http) = {
|
|
72
75
|
get: "/v1/{name=places/*}"
|
|
73
76
|
};
|
|
74
77
|
option (google.api.method_signature) = "name";
|
|
75
78
|
}
|
|
79
|
+
|
|
80
|
+
// Returns predictions for the given input.
|
|
81
|
+
rpc AutocompletePlaces(AutocompletePlacesRequest)
|
|
82
|
+
returns (AutocompletePlacesResponse) {
|
|
83
|
+
option (google.api.http) = {
|
|
84
|
+
post: "/v1/places:autocomplete"
|
|
85
|
+
body: "*"
|
|
86
|
+
};
|
|
87
|
+
}
|
|
76
88
|
}
|
|
77
89
|
|
|
78
90
|
// Request proto for Search Nearby.
|
|
@@ -214,7 +226,6 @@ message SearchNearbyRequest {
|
|
|
214
226
|
|
|
215
227
|
// Response proto for Search Nearby.
|
|
216
228
|
//
|
|
217
|
-
//
|
|
218
229
|
message SearchNearbyResponse {
|
|
219
230
|
// A list of places that meets user's requirements like places
|
|
220
231
|
// types, number of places and specific location restriction.
|
|
@@ -269,6 +280,19 @@ message SearchTextRequest {
|
|
|
269
280
|
}
|
|
270
281
|
}
|
|
271
282
|
|
|
283
|
+
// Searchable EV options of a place search request.
|
|
284
|
+
message EVOptions {
|
|
285
|
+
// Optional. Filtering places by minimum charging rate. Any places with
|
|
286
|
+
// charging a rate less than the minimum charging rate are filtered out.
|
|
287
|
+
double minimum_charging_rate_kw = 1
|
|
288
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
289
|
+
|
|
290
|
+
// Optional. The list of preferred EV connector types. A place that does not
|
|
291
|
+
// support any of the listed connector types are filter out.
|
|
292
|
+
repeated EVConnectorType connector_types = 2
|
|
293
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
294
|
+
}
|
|
295
|
+
|
|
272
296
|
// Required. The text query for textual search.
|
|
273
297
|
string text_query = 1 [(google.api.field_behavior) = REQUIRED];
|
|
274
298
|
|
|
@@ -336,6 +360,9 @@ message SearchTextRequest {
|
|
|
336
360
|
// results outside given location will not be returned. Cannot be set along
|
|
337
361
|
// with location_bias.
|
|
338
362
|
LocationRestriction location_restriction = 14;
|
|
363
|
+
|
|
364
|
+
// Optional. Set the searchable EV options of a place search request.
|
|
365
|
+
EVOptions ev_options = 15 [(google.api.field_behavior) = OPTIONAL];
|
|
339
366
|
}
|
|
340
367
|
|
|
341
368
|
// Response proto for SearchText.
|
|
@@ -411,11 +438,10 @@ message PhotoMedia {
|
|
|
411
438
|
string photo_uri = 2;
|
|
412
439
|
}
|
|
413
440
|
|
|
414
|
-
// Request for fetching a Place
|
|
441
|
+
// Request for fetching a Place based on its resource name, which is a string in
|
|
442
|
+
// the `places/{place_id}` format.
|
|
415
443
|
message GetPlaceRequest {
|
|
416
|
-
// Required.
|
|
417
|
-
// equivalently the name in the same Place. Format:
|
|
418
|
-
// `places/{place_id}`.
|
|
444
|
+
// Required. The resource name of a place, in the `places/{place_id}` format.
|
|
419
445
|
string name = 1 [
|
|
420
446
|
(google.api.field_behavior) = REQUIRED,
|
|
421
447
|
(google.api.resource_reference) = { type: "places.googleapis.com/Place" }
|
|
@@ -438,4 +464,294 @@ message GetPlaceRequest {
|
|
|
438
464
|
//
|
|
439
465
|
// Note that 3-digit region codes are not currently supported.
|
|
440
466
|
string region_code = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
467
|
+
|
|
468
|
+
// Optional. A string which identifies an Autocomplete session for billing
|
|
469
|
+
// purposes. Must be a URL and filename safe base64 string with at most 36
|
|
470
|
+
// ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
|
|
471
|
+
// returned.
|
|
472
|
+
//
|
|
473
|
+
// The session begins when the user starts typing a query, and concludes when
|
|
474
|
+
// they select a place and a call to Place Details or Address Validation is
|
|
475
|
+
// made. Each session can have multiple queries, followed by one Place Details
|
|
476
|
+
// or Address Validation request. The credentials used for each request within
|
|
477
|
+
// a session must belong to the same Google Cloud Console project. Once a
|
|
478
|
+
// session has concluded, the token is no longer valid; your app must generate
|
|
479
|
+
// a fresh token for each session. If the `session_token` parameter is
|
|
480
|
+
// omitted, or if you reuse a session token, the session is charged as if no
|
|
481
|
+
// session token was provided (each request is billed separately).
|
|
482
|
+
//
|
|
483
|
+
// We recommend the following guidelines:
|
|
484
|
+
//
|
|
485
|
+
// * Use session tokens for all Place Autocomplete calls.
|
|
486
|
+
// * Generate a fresh token for each session. Using a version 4 UUID is
|
|
487
|
+
// recommended.
|
|
488
|
+
// * Ensure that the credentials used for all Place Autocomplete, Place
|
|
489
|
+
// Details, and Address Validation requests within a session belong to the
|
|
490
|
+
// same Cloud Console project.
|
|
491
|
+
// * Be sure to pass a unique session token for each new session. Using the
|
|
492
|
+
// same token for more than one session will result in each request being
|
|
493
|
+
// billed individually.
|
|
494
|
+
string session_token = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// Request proto for AutocompletePlaces.
|
|
498
|
+
message AutocompletePlacesRequest {
|
|
499
|
+
// The region to search. The results may be biased around the specified
|
|
500
|
+
// region.
|
|
501
|
+
message LocationBias {
|
|
502
|
+
oneof type {
|
|
503
|
+
// A viewport defined by a northeast and a southwest corner.
|
|
504
|
+
google.geo.type.Viewport rectangle = 1;
|
|
505
|
+
|
|
506
|
+
// A circle defined by a center point and radius.
|
|
507
|
+
Circle circle = 2;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// The region to search. The results will be restricted to the specified
|
|
512
|
+
// region.
|
|
513
|
+
message LocationRestriction {
|
|
514
|
+
oneof type {
|
|
515
|
+
// A viewport defined by a northeast and a southwest corner.
|
|
516
|
+
google.geo.type.Viewport rectangle = 1;
|
|
517
|
+
|
|
518
|
+
// A circle defined by a center point and radius.
|
|
519
|
+
Circle circle = 2;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// Required. The text string on which to search.
|
|
524
|
+
string input = 1 [(google.api.field_behavior) = REQUIRED];
|
|
525
|
+
|
|
526
|
+
// Optional. Bias results to a specified location.
|
|
527
|
+
//
|
|
528
|
+
// At most one of `location_bias` or `location_restriction` should be set. If
|
|
529
|
+
// neither are set, the results will be biased by IP address, meaning the IP
|
|
530
|
+
// address will be mapped to an imprecise location and used as a biasing
|
|
531
|
+
// signal.
|
|
532
|
+
LocationBias location_bias = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
533
|
+
|
|
534
|
+
// Optional. Restrict results to a specified location.
|
|
535
|
+
//
|
|
536
|
+
// At most one of `location_bias` or `location_restriction` should be set. If
|
|
537
|
+
// neither are set, the results will be biased by IP address, meaning the IP
|
|
538
|
+
// address will be mapped to an imprecise location and used as a biasing
|
|
539
|
+
// signal.
|
|
540
|
+
LocationRestriction location_restriction = 3
|
|
541
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
542
|
+
|
|
543
|
+
// Optional. Included primary Place type (for example, "restaurant" or
|
|
544
|
+
// "gas_station") from
|
|
545
|
+
// https://developers.google.com/maps/documentation/places/web-service/place-types.
|
|
546
|
+
// A Place is only returned if its primary type is included in this list. Up
|
|
547
|
+
// to 5 values can be specified. If no types are specified, all Place types
|
|
548
|
+
// are returned.
|
|
549
|
+
repeated string included_primary_types = 4
|
|
550
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
551
|
+
|
|
552
|
+
// Optional. Only include results in the specified regions, specified as up to
|
|
553
|
+
// 15 CLDR two-character region codes. An empty set will not restrict the
|
|
554
|
+
// results. If both `location_restriction` and `included_region_codes` are
|
|
555
|
+
// set, the results will be located in the area of intersection.
|
|
556
|
+
repeated string included_region_codes = 5
|
|
557
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
558
|
+
|
|
559
|
+
// Optional. The language in which to return results. Defaults to en-US. The
|
|
560
|
+
// results may be in mixed languages if the language used in `input` is
|
|
561
|
+
// different from `language_code` or if the returned Place does not have a
|
|
562
|
+
// translation from the local language to `language_code`.
|
|
563
|
+
string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
564
|
+
|
|
565
|
+
// Optional. The region code, specified as a CLDR two-character region code.
|
|
566
|
+
// This affects address formatting, result ranking, and may influence what
|
|
567
|
+
// results are returned. This does not restrict results to the specified
|
|
568
|
+
// region. To restrict results to a region, use `region_code_restriction`.
|
|
569
|
+
string region_code = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
570
|
+
|
|
571
|
+
// Optional. The origin point from which to calculate geodesic distance to the
|
|
572
|
+
// destination (returned as `distance_meters`). If this value is omitted,
|
|
573
|
+
// geodesic distance will not be returned.
|
|
574
|
+
google.type.LatLng origin = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
575
|
+
|
|
576
|
+
// Optional. A zero-based Unicode character offset of `input` indicating the
|
|
577
|
+
// cursor position in `input`. The cursor position may influence what
|
|
578
|
+
// predictions are returned.
|
|
579
|
+
//
|
|
580
|
+
// If empty, defaults to the length of `input`.
|
|
581
|
+
int32 input_offset = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
582
|
+
|
|
583
|
+
// Optional. If true, the response will include both Place and query
|
|
584
|
+
// predictions. Otherwise the response will only return Place predictions.
|
|
585
|
+
bool include_query_predictions = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
586
|
+
|
|
587
|
+
// Optional. A string which identifies an Autocomplete session for billing
|
|
588
|
+
// purposes. Must be a URL and filename safe base64 string with at most 36
|
|
589
|
+
// ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
|
|
590
|
+
// returned.
|
|
591
|
+
//
|
|
592
|
+
// The session begins when the user starts typing a query, and concludes when
|
|
593
|
+
// they select a place and a call to Place Details or Address Validation is
|
|
594
|
+
// made. Each session can have multiple queries, followed by one Place Details
|
|
595
|
+
// or Address Validation request. The credentials used for each request within
|
|
596
|
+
// a session must belong to the same Google Cloud Console project. Once a
|
|
597
|
+
// session has concluded, the token is no longer valid; your app must generate
|
|
598
|
+
// a fresh token for each session. If the `session_token` parameter is
|
|
599
|
+
// omitted, or if you reuse a session token, the session is charged as if no
|
|
600
|
+
// session token was provided (each request is billed separately).
|
|
601
|
+
//
|
|
602
|
+
// We recommend the following guidelines:
|
|
603
|
+
//
|
|
604
|
+
// * Use session tokens for all Place Autocomplete calls.
|
|
605
|
+
// * Generate a fresh token for each session. Using a version 4 UUID is
|
|
606
|
+
// recommended.
|
|
607
|
+
// * Ensure that the credentials used for all Place Autocomplete, Place
|
|
608
|
+
// Details, and Address Validation requests within a session belong to the
|
|
609
|
+
// same Cloud Console project.
|
|
610
|
+
// * Be sure to pass a unique session token for each new session. Using the
|
|
611
|
+
// same token for more than one session will result in each request being
|
|
612
|
+
// billed individually.
|
|
613
|
+
string session_token = 11 [(google.api.field_behavior) = OPTIONAL];
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
// Response proto for AutocompletePlaces.
|
|
617
|
+
message AutocompletePlacesResponse {
|
|
618
|
+
// An Autocomplete suggestion result.
|
|
619
|
+
message Suggestion {
|
|
620
|
+
// Identifies a substring within a given text.
|
|
621
|
+
message StringRange {
|
|
622
|
+
// Zero-based offset of the first Unicode character of the string
|
|
623
|
+
// (inclusive).
|
|
624
|
+
int32 start_offset = 1;
|
|
625
|
+
|
|
626
|
+
// Zero-based offset of the last Unicode character (exclusive).
|
|
627
|
+
int32 end_offset = 2;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
// Text representing a Place or query prediction. The text may be used as is
|
|
631
|
+
// or formatted.
|
|
632
|
+
message FormattableText {
|
|
633
|
+
// Text that may be used as is or formatted with `matches`.
|
|
634
|
+
string text = 1;
|
|
635
|
+
|
|
636
|
+
// A list of string ranges identifying where the input request matched in
|
|
637
|
+
// `text`. The ranges can be used to format specific parts of `text`. The
|
|
638
|
+
// substrings may not be exact matches of `input` if the matching was
|
|
639
|
+
// determined by criteria other than string matching (for example, spell
|
|
640
|
+
// corrections or transliterations).
|
|
641
|
+
//
|
|
642
|
+
// These values are Unicode character offsets of `text`. The ranges are
|
|
643
|
+
// guaranteed to be ordered in increasing offset values.
|
|
644
|
+
repeated StringRange matches = 2;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// Contains a breakdown of a Place or query prediction into main text
|
|
648
|
+
// and secondary text.
|
|
649
|
+
//
|
|
650
|
+
// For Place predictions, the main text contains the specific name of the
|
|
651
|
+
// Place. For query predictions, the main text contains the query.
|
|
652
|
+
//
|
|
653
|
+
// The secondary text contains additional disambiguating features (such as a
|
|
654
|
+
// city or region) to further identify the Place or refine the query.
|
|
655
|
+
message StructuredFormat {
|
|
656
|
+
// Represents the name of the Place or query.
|
|
657
|
+
FormattableText main_text = 1;
|
|
658
|
+
|
|
659
|
+
// Represents additional disambiguating features (such as a city or
|
|
660
|
+
// region) to further identify the Place or refine the query.
|
|
661
|
+
FormattableText secondary_text = 2;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// Prediction results for a Place Autocomplete prediction.
|
|
665
|
+
message PlacePrediction {
|
|
666
|
+
// The resource name of the suggested Place. This name can be used in
|
|
667
|
+
// other APIs that accept Place names.
|
|
668
|
+
string place = 1 [(google.api.resource_reference) = {
|
|
669
|
+
type: "places.googleapis.com/Place"
|
|
670
|
+
}];
|
|
671
|
+
|
|
672
|
+
// The unique identifier of the suggested Place. This identifier can be
|
|
673
|
+
// used in other APIs that accept Place IDs.
|
|
674
|
+
string place_id = 2;
|
|
675
|
+
|
|
676
|
+
// Contains the human-readable name for the returned result. For
|
|
677
|
+
// establishment results, this is usually the business name and address.
|
|
678
|
+
//
|
|
679
|
+
// `text` is recommended for developers who wish to show a single UI
|
|
680
|
+
// element. Developers who wish to show two separate, but related, UI
|
|
681
|
+
// elements may want to use `structured_format` instead. They are two
|
|
682
|
+
// different ways to represent a Place prediction. Users should not try to
|
|
683
|
+
// parse `structured_format` into `text` or vice versa.
|
|
684
|
+
//
|
|
685
|
+
// This text may be different from the `display_name` returned by
|
|
686
|
+
// GetPlace.
|
|
687
|
+
//
|
|
688
|
+
// May be in mixed languages if the request `input` and `language_code`
|
|
689
|
+
// are in different languages or if the Place does not have a translation
|
|
690
|
+
// from the local language to `language_code`.
|
|
691
|
+
FormattableText text = 3;
|
|
692
|
+
|
|
693
|
+
// A breakdown of the Place prediction into main text containing the name
|
|
694
|
+
// of the Place and secondary text containing additional disambiguating
|
|
695
|
+
// features (such as a city or region).
|
|
696
|
+
//
|
|
697
|
+
// `structured_format` is recommended for developers who wish to show two
|
|
698
|
+
// separate, but related, UI elements. Developers who wish to show a
|
|
699
|
+
// single UI element may want to use `text` instead. They are two
|
|
700
|
+
// different ways to represent a Place prediction. Users should not try to
|
|
701
|
+
// parse `structured_format` into `text` or vice versa.
|
|
702
|
+
StructuredFormat structured_format = 4;
|
|
703
|
+
|
|
704
|
+
// List of types that apply to this Place from Table A or Table B in
|
|
705
|
+
// https://developers.google.com/maps/documentation/places/web-service/place-types.
|
|
706
|
+
//
|
|
707
|
+
// A type is a categorization of a Place. Places with shared types will
|
|
708
|
+
// share similar characteristics.
|
|
709
|
+
repeated string types = 5;
|
|
710
|
+
|
|
711
|
+
// The length of the geodesic in meters from `origin` if `origin` is
|
|
712
|
+
// specified. Certain predictions such as routes may not populate this
|
|
713
|
+
// field.
|
|
714
|
+
int32 distance_meters = 6;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// Prediction results for a Query Autocomplete prediction.
|
|
718
|
+
message QueryPrediction {
|
|
719
|
+
// The predicted text. This text does not represent a Place, but rather a
|
|
720
|
+
// text query that could be used in a search endpoint (for example,
|
|
721
|
+
// TextSearch).
|
|
722
|
+
//
|
|
723
|
+
// `text` is recommended for developers who wish to show a single UI
|
|
724
|
+
// element. Developers who wish to show two separate, but related, UI
|
|
725
|
+
// elements may want to use `structured_format` instead. They are two
|
|
726
|
+
// different ways to represent a query prediction. Users should not try to
|
|
727
|
+
// parse `structured_format` into `text` or vice versa.
|
|
728
|
+
//
|
|
729
|
+
// May be in mixed languages if the request `input` and `language_code`
|
|
730
|
+
// are in different languages or if part of the query does not have a
|
|
731
|
+
// translation from the local language to `language_code`.
|
|
732
|
+
FormattableText text = 1;
|
|
733
|
+
|
|
734
|
+
// A breakdown of the query prediction into main text containing the query
|
|
735
|
+
// and secondary text containing additional disambiguating features (such
|
|
736
|
+
// as a city or region).
|
|
737
|
+
//
|
|
738
|
+
// `structured_format` is recommended for developers who wish to show two
|
|
739
|
+
// separate, but related, UI elements. Developers who wish to show a
|
|
740
|
+
// single UI element may want to use `text` instead. They are two
|
|
741
|
+
// different ways to represent a query prediction. Users should not try to
|
|
742
|
+
// parse `structured_format` into `text` or vice versa.
|
|
743
|
+
StructuredFormat structured_format = 2;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
oneof kind {
|
|
747
|
+
// A prediction for a Place.
|
|
748
|
+
PlacePrediction place_prediction = 1;
|
|
749
|
+
|
|
750
|
+
// A prediction for a query.
|
|
751
|
+
QueryPrediction query_prediction = 2;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
// Contains a list of suggestions, ordered in descending order of relevance.
|
|
756
|
+
repeated Suggestion suggestions = 1;
|
|
441
757
|
}
|