-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
places_service.pb.go
executable file
·3156 lines (2856 loc) · 142 KB
/
places_service.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc v4.25.3
// source: google/maps/places/v1/places_service.proto
package placespb
import (
context "context"
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
viewport "google.golang.org/genproto/googleapis/geo/type/viewport"
latlng "google.golang.org/genproto/googleapis/type/latlng"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// How results will be ranked in the response.
type SearchNearbyRequest_RankPreference int32
const (
// RankPreference value not set. Will use rank by POPULARITY by default.
SearchNearbyRequest_RANK_PREFERENCE_UNSPECIFIED SearchNearbyRequest_RankPreference = 0
// Ranks results by distance.
SearchNearbyRequest_DISTANCE SearchNearbyRequest_RankPreference = 1
// Ranks results by popularity.
SearchNearbyRequest_POPULARITY SearchNearbyRequest_RankPreference = 2
)
// Enum value maps for SearchNearbyRequest_RankPreference.
var (
SearchNearbyRequest_RankPreference_name = map[int32]string{
0: "RANK_PREFERENCE_UNSPECIFIED",
1: "DISTANCE",
2: "POPULARITY",
}
SearchNearbyRequest_RankPreference_value = map[string]int32{
"RANK_PREFERENCE_UNSPECIFIED": 0,
"DISTANCE": 1,
"POPULARITY": 2,
}
)
func (x SearchNearbyRequest_RankPreference) Enum() *SearchNearbyRequest_RankPreference {
p := new(SearchNearbyRequest_RankPreference)
*p = x
return p
}
func (x SearchNearbyRequest_RankPreference) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SearchNearbyRequest_RankPreference) Descriptor() protoreflect.EnumDescriptor {
return file_google_maps_places_v1_places_service_proto_enumTypes[0].Descriptor()
}
func (SearchNearbyRequest_RankPreference) Type() protoreflect.EnumType {
return &file_google_maps_places_v1_places_service_proto_enumTypes[0]
}
func (x SearchNearbyRequest_RankPreference) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SearchNearbyRequest_RankPreference.Descriptor instead.
func (SearchNearbyRequest_RankPreference) EnumDescriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{0, 0}
}
// How results will be ranked in the response.
type SearchTextRequest_RankPreference int32
const (
// For a categorical query such as "Restaurants in New York City", RELEVANCE
// is the default. For non-categorical queries such as "Mountain View, CA"
// we recommend that you leave rankPreference unset.
SearchTextRequest_RANK_PREFERENCE_UNSPECIFIED SearchTextRequest_RankPreference = 0
// Ranks results by distance.
SearchTextRequest_DISTANCE SearchTextRequest_RankPreference = 1
// Ranks results by relevance. Sort order determined by normal ranking
// stack.
SearchTextRequest_RELEVANCE SearchTextRequest_RankPreference = 2
)
// Enum value maps for SearchTextRequest_RankPreference.
var (
SearchTextRequest_RankPreference_name = map[int32]string{
0: "RANK_PREFERENCE_UNSPECIFIED",
1: "DISTANCE",
2: "RELEVANCE",
}
SearchTextRequest_RankPreference_value = map[string]int32{
"RANK_PREFERENCE_UNSPECIFIED": 0,
"DISTANCE": 1,
"RELEVANCE": 2,
}
)
func (x SearchTextRequest_RankPreference) Enum() *SearchTextRequest_RankPreference {
p := new(SearchTextRequest_RankPreference)
*p = x
return p
}
func (x SearchTextRequest_RankPreference) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SearchTextRequest_RankPreference) Descriptor() protoreflect.EnumDescriptor {
return file_google_maps_places_v1_places_service_proto_enumTypes[1].Descriptor()
}
func (SearchTextRequest_RankPreference) Type() protoreflect.EnumType {
return &file_google_maps_places_v1_places_service_proto_enumTypes[1]
}
func (x SearchTextRequest_RankPreference) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SearchTextRequest_RankPreference.Descriptor instead.
func (SearchTextRequest_RankPreference) EnumDescriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{2, 0}
}
// Request proto for Search Nearby.
type SearchNearbyRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Place details will be displayed with the preferred language if available.
// If the language code is unspecified or unrecognized, place details of any
// language may be returned, with a preference for English if such details
// exist.
//
// Current list of supported languages:
// https://developers.google.com/maps/faq#languagesupport.
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// The Unicode country/region code (CLDR) of the location where the
// request is coming from. This parameter is used to display the place
// details, like region-specific place name, if available. The parameter can
// affect results based on applicable law.
//
// For more information, see
// https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
//
// Note that 3-digit region codes are not currently supported.
RegionCode string `protobuf:"bytes,2,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
// Included Place type (eg, "restaurant" or "gas_station") from
// https://developers.google.com/maps/documentation/places/web-service/place-types.
//
// Up to 50 types from [Table
// A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
// may be specified.
//
// If there are any conflicting types, i.e. a type appears in both
// included_types and excluded_types, an INVALID_ARGUMENT error is
// returned.
//
// If a Place type is specified with multiple type restrictions, only places
// that satisfy all of the restrictions are returned. For example, if we
// have {included_types = ["restaurant"], excluded_primary_types =
// ["restaurant"]}, the returned places provide "restaurant"
// related services but do not operate primarily as "restaurants".
IncludedTypes []string `protobuf:"bytes,3,rep,name=included_types,json=includedTypes,proto3" json:"included_types,omitempty"`
// Excluded Place type (eg, "restaurant" or "gas_station") from
// https://developers.google.com/maps/documentation/places/web-service/place-types.
//
// Up to 50 types from [Table
// A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
// may be specified.
//
// If the client provides both included_types (e.g. restaurant) and
// excluded_types (e.g. cafe), then the response should include places that
// are restaurant but not cafe. The response includes places that match at
// least one of the included_types and none of the excluded_types.
//
// If there are any conflicting types, i.e. a type appears in both
// included_types and excluded_types, an INVALID_ARGUMENT error is returned.
//
// If a Place type is specified with multiple type restrictions, only places
// that satisfy all of the restrictions are returned. For example, if we
// have {included_types = ["restaurant"], excluded_primary_types =
// ["restaurant"]}, the returned places provide "restaurant"
// related services but do not operate primarily as "restaurants".
ExcludedTypes []string `protobuf:"bytes,4,rep,name=excluded_types,json=excludedTypes,proto3" json:"excluded_types,omitempty"`
// Included primary Place type (e.g. "restaurant" or "gas_station") from
// https://developers.google.com/maps/documentation/places/web-service/place-types.
// A place can only have a single primary type from the supported types table
// associated with it.
//
// Up to 50 types from [Table
// A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
// may be specified.
//
// If there are any conflicting primary types, i.e. a type appears in both
// included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
// error is returned.
//
// If a Place type is specified with multiple type restrictions, only places
// that satisfy all of the restrictions are returned. For example, if we
// have {included_types = ["restaurant"], excluded_primary_types =
// ["restaurant"]}, the returned places provide "restaurant"
// related services but do not operate primarily as "restaurants".
IncludedPrimaryTypes []string `protobuf:"bytes,5,rep,name=included_primary_types,json=includedPrimaryTypes,proto3" json:"included_primary_types,omitempty"`
// Excluded primary Place type (e.g. "restaurant" or "gas_station") from
// https://developers.google.com/maps/documentation/places/web-service/place-types.
//
// Up to 50 types from [Table
// A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
// may be specified.
//
// If there are any conflicting primary types, i.e. a type appears in both
// included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
// error is returned.
//
// If a Place type is specified with multiple type restrictions, only places
// that satisfy all of the restrictions are returned. For example, if we
// have {included_types = ["restaurant"], excluded_primary_types =
// ["restaurant"]}, the returned places provide "restaurant"
// related services but do not operate primarily as "restaurants".
ExcludedPrimaryTypes []string `protobuf:"bytes,6,rep,name=excluded_primary_types,json=excludedPrimaryTypes,proto3" json:"excluded_primary_types,omitempty"`
// Maximum number of results to return. It must be between 1 and 20 (default),
// inclusively. If the number is unset, it falls back to the upper limit. If
// the number is set to negative or exceeds the upper limit, an
// INVALID_ARGUMENT error is returned.
MaxResultCount int32 `protobuf:"varint,7,opt,name=max_result_count,json=maxResultCount,proto3" json:"max_result_count,omitempty"`
// Required. The region to search.
LocationRestriction *SearchNearbyRequest_LocationRestriction `protobuf:"bytes,8,opt,name=location_restriction,json=locationRestriction,proto3" json:"location_restriction,omitempty"`
// How results will be ranked in the response.
RankPreference SearchNearbyRequest_RankPreference `protobuf:"varint,9,opt,name=rank_preference,json=rankPreference,proto3,enum=google.maps.places.v1.SearchNearbyRequest_RankPreference" json:"rank_preference,omitempty"`
}
func (x *SearchNearbyRequest) Reset() {
*x = SearchNearbyRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchNearbyRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchNearbyRequest) ProtoMessage() {}
func (x *SearchNearbyRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchNearbyRequest.ProtoReflect.Descriptor instead.
func (*SearchNearbyRequest) Descriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{0}
}
func (x *SearchNearbyRequest) GetLanguageCode() string {
if x != nil {
return x.LanguageCode
}
return ""
}
func (x *SearchNearbyRequest) GetRegionCode() string {
if x != nil {
return x.RegionCode
}
return ""
}
func (x *SearchNearbyRequest) GetIncludedTypes() []string {
if x != nil {
return x.IncludedTypes
}
return nil
}
func (x *SearchNearbyRequest) GetExcludedTypes() []string {
if x != nil {
return x.ExcludedTypes
}
return nil
}
func (x *SearchNearbyRequest) GetIncludedPrimaryTypes() []string {
if x != nil {
return x.IncludedPrimaryTypes
}
return nil
}
func (x *SearchNearbyRequest) GetExcludedPrimaryTypes() []string {
if x != nil {
return x.ExcludedPrimaryTypes
}
return nil
}
func (x *SearchNearbyRequest) GetMaxResultCount() int32 {
if x != nil {
return x.MaxResultCount
}
return 0
}
func (x *SearchNearbyRequest) GetLocationRestriction() *SearchNearbyRequest_LocationRestriction {
if x != nil {
return x.LocationRestriction
}
return nil
}
func (x *SearchNearbyRequest) GetRankPreference() SearchNearbyRequest_RankPreference {
if x != nil {
return x.RankPreference
}
return SearchNearbyRequest_RANK_PREFERENCE_UNSPECIFIED
}
// Response proto for Search Nearby.
type SearchNearbyResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of places that meets user's requirements like places
// types, number of places and specific location restriction.
Places []*Place `protobuf:"bytes,1,rep,name=places,proto3" json:"places,omitempty"`
}
func (x *SearchNearbyResponse) Reset() {
*x = SearchNearbyResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchNearbyResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchNearbyResponse) ProtoMessage() {}
func (x *SearchNearbyResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchNearbyResponse.ProtoReflect.Descriptor instead.
func (*SearchNearbyResponse) Descriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{1}
}
func (x *SearchNearbyResponse) GetPlaces() []*Place {
if x != nil {
return x.Places
}
return nil
}
// Request proto for SearchText.
type SearchTextRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The text query for textual search.
TextQuery string `protobuf:"bytes,1,opt,name=text_query,json=textQuery,proto3" json:"text_query,omitempty"`
// Place details will be displayed with the preferred language if available.
// If the language code is unspecified or unrecognized, place details of any
// language may be returned, with a preference for English if such details
// exist.
//
// Current list of supported languages:
// https://developers.google.com/maps/faq#languagesupport.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// The Unicode country/region code (CLDR) of the location where the
// request is coming from. This parameter is used to display the place
// details, like region-specific place name, if available. The parameter can
// affect results based on applicable law.
//
// For more information, see
// https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
//
// Note that 3-digit region codes are not currently supported.
RegionCode string `protobuf:"bytes,3,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
// How results will be ranked in the response.
RankPreference SearchTextRequest_RankPreference `protobuf:"varint,4,opt,name=rank_preference,json=rankPreference,proto3,enum=google.maps.places.v1.SearchTextRequest_RankPreference" json:"rank_preference,omitempty"`
// The requested place type. Full list of types supported:
// https://developers.google.com/maps/documentation/places/web-service/place-types.
// Only support one included type.
IncludedType string `protobuf:"bytes,6,opt,name=included_type,json=includedType,proto3" json:"included_type,omitempty"`
// Used to restrict the search to places that are currently open. The default
// is false.
OpenNow bool `protobuf:"varint,7,opt,name=open_now,json=openNow,proto3" json:"open_now,omitempty"`
// Filter out results whose average user rating is strictly less than this
// limit. A valid value must be a float between 0 and 5 (inclusively) at a
// 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating
// will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6
// will eliminate all results with a less than 1.0 rating.
MinRating float64 `protobuf:"fixed64,9,opt,name=min_rating,json=minRating,proto3" json:"min_rating,omitempty"`
// Maximum number of results to return. It must be between 1 and 20,
// inclusively. The default is 20. If the number is unset, it falls back to
// the upper limit. If the number is set to negative or exceeds the upper
// limit, an INVALID_ARGUMENT error is returned.
MaxResultCount int32 `protobuf:"varint,10,opt,name=max_result_count,json=maxResultCount,proto3" json:"max_result_count,omitempty"`
// Used to restrict the search to places that are marked as certain price
// levels. Users can choose any combinations of price levels. Default to
// select all price levels.
PriceLevels []PriceLevel `protobuf:"varint,11,rep,packed,name=price_levels,json=priceLevels,proto3,enum=google.maps.places.v1.PriceLevel" json:"price_levels,omitempty"`
// Used to set strict type filtering for included_type. If set to true, only
// results of the same type will be returned. Default to false.
StrictTypeFiltering bool `protobuf:"varint,12,opt,name=strict_type_filtering,json=strictTypeFiltering,proto3" json:"strict_type_filtering,omitempty"`
// The region to search. This location serves as a bias which means results
// around given location might be returned. Cannot be set along with
// location_restriction.
LocationBias *SearchTextRequest_LocationBias `protobuf:"bytes,13,opt,name=location_bias,json=locationBias,proto3" json:"location_bias,omitempty"`
// The region to search. This location serves as a restriction which means
// results outside given location will not be returned. Cannot be set along
// with location_bias.
LocationRestriction *SearchTextRequest_LocationRestriction `protobuf:"bytes,14,opt,name=location_restriction,json=locationRestriction,proto3" json:"location_restriction,omitempty"`
// Optional. Set the searchable EV options of a place search request.
EvOptions *SearchTextRequest_EVOptions `protobuf:"bytes,15,opt,name=ev_options,json=evOptions,proto3" json:"ev_options,omitempty"`
}
func (x *SearchTextRequest) Reset() {
*x = SearchTextRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchTextRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchTextRequest) ProtoMessage() {}
func (x *SearchTextRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchTextRequest.ProtoReflect.Descriptor instead.
func (*SearchTextRequest) Descriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{2}
}
func (x *SearchTextRequest) GetTextQuery() string {
if x != nil {
return x.TextQuery
}
return ""
}
func (x *SearchTextRequest) GetLanguageCode() string {
if x != nil {
return x.LanguageCode
}
return ""
}
func (x *SearchTextRequest) GetRegionCode() string {
if x != nil {
return x.RegionCode
}
return ""
}
func (x *SearchTextRequest) GetRankPreference() SearchTextRequest_RankPreference {
if x != nil {
return x.RankPreference
}
return SearchTextRequest_RANK_PREFERENCE_UNSPECIFIED
}
func (x *SearchTextRequest) GetIncludedType() string {
if x != nil {
return x.IncludedType
}
return ""
}
func (x *SearchTextRequest) GetOpenNow() bool {
if x != nil {
return x.OpenNow
}
return false
}
func (x *SearchTextRequest) GetMinRating() float64 {
if x != nil {
return x.MinRating
}
return 0
}
func (x *SearchTextRequest) GetMaxResultCount() int32 {
if x != nil {
return x.MaxResultCount
}
return 0
}
func (x *SearchTextRequest) GetPriceLevels() []PriceLevel {
if x != nil {
return x.PriceLevels
}
return nil
}
func (x *SearchTextRequest) GetStrictTypeFiltering() bool {
if x != nil {
return x.StrictTypeFiltering
}
return false
}
func (x *SearchTextRequest) GetLocationBias() *SearchTextRequest_LocationBias {
if x != nil {
return x.LocationBias
}
return nil
}
func (x *SearchTextRequest) GetLocationRestriction() *SearchTextRequest_LocationRestriction {
if x != nil {
return x.LocationRestriction
}
return nil
}
func (x *SearchTextRequest) GetEvOptions() *SearchTextRequest_EVOptions {
if x != nil {
return x.EvOptions
}
return nil
}
// Response proto for SearchText.
type SearchTextResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of places that meet the user's text search criteria.
Places []*Place `protobuf:"bytes,1,rep,name=places,proto3" json:"places,omitempty"`
}
func (x *SearchTextResponse) Reset() {
*x = SearchTextResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchTextResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchTextResponse) ProtoMessage() {}
func (x *SearchTextResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchTextResponse.ProtoReflect.Descriptor instead.
func (*SearchTextResponse) Descriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{3}
}
func (x *SearchTextResponse) GetPlaces() []*Place {
if x != nil {
return x.Places
}
return nil
}
// Request for fetching a photo of a place using a photo resource name.
type GetPhotoMediaRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The resource name of a photo media in the format:
// `places/{place_id}/photos/{photo_reference}/media`.
//
// The resource name of a photo as returned in a Place object's `photos.name`
// field comes with the format
// `places/{place_id}/photos/{photo_reference}`. You need to append `/media`
// at the end of the photo resource to get the photo media resource name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. Specifies the maximum desired width, in pixels, of the image. If
// the image is smaller than the values specified, the original image will be
// returned. If the image is larger in either dimension, it will be scaled to
// match the smaller of the two dimensions, restricted to its original aspect
// ratio. Both the max_height_px and max_width_px properties accept an integer
// between 1 and 4800, inclusively. If the value is not within the allowed
// range, an INVALID_ARGUMENT error will be returned.
//
// At least one of max_height_px or max_width_px needs to be specified. If
// neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT
// error will be returned.
MaxWidthPx int32 `protobuf:"varint,2,opt,name=max_width_px,json=maxWidthPx,proto3" json:"max_width_px,omitempty"`
// Optional. Specifies the maximum desired height, in pixels, of the image. If
// the image is smaller than the values specified, the original image will be
// returned. If the image is larger in either dimension, it will be scaled to
// match the smaller of the two dimensions, restricted to its original aspect
// ratio. Both the max_height_px and max_width_px properties accept an integer
// between 1 and 4800, inclusively. If the value is not within the allowed
// range, an INVALID_ARGUMENT error will be returned.
//
// At least one of max_height_px or max_width_px needs to be specified. If
// neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT
// error will be returned.
MaxHeightPx int32 `protobuf:"varint,3,opt,name=max_height_px,json=maxHeightPx,proto3" json:"max_height_px,omitempty"`
// Optional. If set, skip the default HTTP redirect behavior and render a text
// format (for example, in JSON format for HTTP use case) response. If not
// set, an HTTP redirect will be issued to redirect the call to the image
// media. This option is ignored for non-HTTP requests.
SkipHttpRedirect bool `protobuf:"varint,4,opt,name=skip_http_redirect,json=skipHttpRedirect,proto3" json:"skip_http_redirect,omitempty"`
}
func (x *GetPhotoMediaRequest) Reset() {
*x = GetPhotoMediaRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPhotoMediaRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPhotoMediaRequest) ProtoMessage() {}
func (x *GetPhotoMediaRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPhotoMediaRequest.ProtoReflect.Descriptor instead.
func (*GetPhotoMediaRequest) Descriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{4}
}
func (x *GetPhotoMediaRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *GetPhotoMediaRequest) GetMaxWidthPx() int32 {
if x != nil {
return x.MaxWidthPx
}
return 0
}
func (x *GetPhotoMediaRequest) GetMaxHeightPx() int32 {
if x != nil {
return x.MaxHeightPx
}
return 0
}
func (x *GetPhotoMediaRequest) GetSkipHttpRedirect() bool {
if x != nil {
return x.SkipHttpRedirect
}
return false
}
// A photo media from Places API.
type PhotoMedia struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The resource name of a photo media in the format:
// `places/{place_id}/photos/{photo_reference}/media`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// A short-lived uri that can be used to render the photo.
PhotoUri string `protobuf:"bytes,2,opt,name=photo_uri,json=photoUri,proto3" json:"photo_uri,omitempty"`
}
func (x *PhotoMedia) Reset() {
*x = PhotoMedia{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PhotoMedia) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PhotoMedia) ProtoMessage() {}
func (x *PhotoMedia) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PhotoMedia.ProtoReflect.Descriptor instead.
func (*PhotoMedia) Descriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{5}
}
func (x *PhotoMedia) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PhotoMedia) GetPhotoUri() string {
if x != nil {
return x.PhotoUri
}
return ""
}
// Request for fetching a Place based on its resource name, which is a string in
// the `places/{place_id}` format.
type GetPlaceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The resource name of a place, in the `places/{place_id}` format.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. Place details will be displayed with the preferred language if
// available.
//
// Current list of supported languages:
// https://developers.google.com/maps/faq#languagesupport.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// Optional. The Unicode country/region code (CLDR) of the location where the
// request is coming from. This parameter is used to display the place
// details, like region-specific place name, if available. The parameter can
// affect results based on applicable law.
// For more information, see
// https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html.
//
// Note that 3-digit region codes are not currently supported.
RegionCode string `protobuf:"bytes,3,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
// Optional. A string which identifies an Autocomplete session for billing
// purposes. Must be a URL and filename safe base64 string with at most 36
// ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
// returned.
//
// The session begins when the user starts typing a query, and concludes when
// they select a place and a call to Place Details or Address Validation is
// made. Each session can have multiple queries, followed by one Place Details
// or Address Validation request. The credentials used for each request within
// a session must belong to the same Google Cloud Console project. Once a
// session has concluded, the token is no longer valid; your app must generate
// a fresh token for each session. If the `session_token` parameter is
// omitted, or if you reuse a session token, the session is charged as if no
// session token was provided (each request is billed separately).
//
// We recommend the following guidelines:
//
// - Use session tokens for all Place Autocomplete calls.
// - Generate a fresh token for each session. Using a version 4 UUID is
// recommended.
// - Ensure that the credentials used for all Place Autocomplete, Place
// Details, and Address Validation requests within a session belong to the
// same Cloud Console project.
// - Be sure to pass a unique session token for each new session. Using the
// same token for more than one session will result in each request being
// billed individually.
SessionToken string `protobuf:"bytes,4,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
}
func (x *GetPlaceRequest) Reset() {
*x = GetPlaceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPlaceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPlaceRequest) ProtoMessage() {}
func (x *GetPlaceRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_places_v1_places_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPlaceRequest.ProtoReflect.Descriptor instead.
func (*GetPlaceRequest) Descriptor() ([]byte, []int) {
return file_google_maps_places_v1_places_service_proto_rawDescGZIP(), []int{6}
}
func (x *GetPlaceRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *GetPlaceRequest) GetLanguageCode() string {
if x != nil {
return x.LanguageCode
}
return ""
}
func (x *GetPlaceRequest) GetRegionCode() string {
if x != nil {
return x.RegionCode
}
return ""
}
func (x *GetPlaceRequest) GetSessionToken() string {
if x != nil {
return x.SessionToken
}
return ""
}
// Request proto for AutocompletePlaces.
type AutocompletePlacesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The text string on which to search.
Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
// Optional. Bias results to a specified location.
//
// At most one of `location_bias` or `location_restriction` should be set. If
// neither are set, the results will be biased by IP address, meaning the IP
// address will be mapped to an imprecise location and used as a biasing
// signal.
LocationBias *AutocompletePlacesRequest_LocationBias `protobuf:"bytes,2,opt,name=location_bias,json=locationBias,proto3" json:"location_bias,omitempty"`
// Optional. Restrict results to a specified location.
//
// At most one of `location_bias` or `location_restriction` should be set. If
// neither are set, the results will be biased by IP address, meaning the IP
// address will be mapped to an imprecise location and used as a biasing
// signal.
LocationRestriction *AutocompletePlacesRequest_LocationRestriction `protobuf:"bytes,3,opt,name=location_restriction,json=locationRestriction,proto3" json:"location_restriction,omitempty"`
// Optional. Included primary Place type (for example, "restaurant" or
// "gas_station") from
// https://developers.google.com/maps/documentation/places/web-service/place-types.
// A Place is only returned if its primary type is included in this list. Up
// to 5 values can be specified. If no types are specified, all Place types
// are returned.
IncludedPrimaryTypes []string `protobuf:"bytes,4,rep,name=included_primary_types,json=includedPrimaryTypes,proto3" json:"included_primary_types,omitempty"`
// Optional. Only include results in the specified regions, specified as up to
// 15 CLDR two-character region codes. An empty set will not restrict the
// results. If both `location_restriction` and `included_region_codes` are
// set, the results will be located in the area of intersection.
IncludedRegionCodes []string `protobuf:"bytes,5,rep,name=included_region_codes,json=includedRegionCodes,proto3" json:"included_region_codes,omitempty"`
// Optional. The language in which to return results. Defaults to en-US. The
// results may be in mixed languages if the language used in `input` is
// different from `language_code` or if the returned Place does not have a
// translation from the local language to `language_code`.
LanguageCode string `protobuf:"bytes,6,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// Optional. The region code, specified as a CLDR two-character region code.
// This affects address formatting, result ranking, and may influence what
// results are returned. This does not restrict results to the specified
// region. To restrict results to a region, use `region_code_restriction`.
RegionCode string `protobuf:"bytes,7,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
// Optional. The origin point from which to calculate geodesic distance to the
// destination (returned as `distance_meters`). If this value is omitted,
// geodesic distance will not be returned.
Origin *latlng.LatLng `protobuf:"bytes,8,opt,name=origin,proto3" json:"origin,omitempty"`
// Optional. A zero-based Unicode character offset of `input` indicating the
// cursor position in `input`. The cursor position may influence what
// predictions are returned.
//
// If empty, defaults to the length of `input`.
InputOffset int32 `protobuf:"varint,9,opt,name=input_offset,json=inputOffset,proto3" json:"input_offset,omitempty"`
// Optional. If true, the response will include both Place and query
// predictions. Otherwise the response will only return Place predictions.
IncludeQueryPredictions bool `protobuf:"varint,10,opt,name=include_query_predictions,json=includeQueryPredictions,proto3" json:"include_query_predictions,omitempty"`
// Optional. A string which identifies an Autocomplete session for billing
// purposes. Must be a URL and filename safe base64 string with at most 36
// ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
// returned.
//
// The session begins when the user starts typing a query, and concludes when
// they select a place and a call to Place Details or Address Validation is
// made. Each session can have multiple queries, followed by one Place Details
// or Address Validation request. The credentials used for each request within
// a session must belong to the same Google Cloud Console project. Once a
// session has concluded, the token is no longer valid; your app must generate
// a fresh token for each session. If the `session_token` parameter is
// omitted, or if you reuse a session token, the session is charged as if no
// session token was provided (each request is billed separately).
//
// We recommend the following guidelines:
//
// - Use session tokens for all Place Autocomplete calls.
// - Generate a fresh token for each session. Using a version 4 UUID is
// recommended.
// - Ensure that the credentials used for all Place Autocomplete, Place
// Details, and Address Validation requests within a session belong to the