-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
routes_service.pb.go
executable file
·2004 lines (1837 loc) · 102 KB
/
routes_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/routing/v2/routes_service.proto
package routingpb
import (
context "context"
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
localized_text "google.golang.org/genproto/googleapis/type/localized_text"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status1 "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
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)
)
// The condition of the route being returned.
type RouteMatrixElementCondition int32
const (
// Only used when the `status` of the element is not OK.
RouteMatrixElementCondition_ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED RouteMatrixElementCondition = 0
// A route was found, and the corresponding information was filled out for the
// element.
RouteMatrixElementCondition_ROUTE_EXISTS RouteMatrixElementCondition = 1
// No route could be found. Fields containing route information, such as
// `distance_meters` or `duration`, will not be filled out in the element.
RouteMatrixElementCondition_ROUTE_NOT_FOUND RouteMatrixElementCondition = 2
)
// Enum value maps for RouteMatrixElementCondition.
var (
RouteMatrixElementCondition_name = map[int32]string{
0: "ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED",
1: "ROUTE_EXISTS",
2: "ROUTE_NOT_FOUND",
}
RouteMatrixElementCondition_value = map[string]int32{
"ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED": 0,
"ROUTE_EXISTS": 1,
"ROUTE_NOT_FOUND": 2,
}
)
func (x RouteMatrixElementCondition) Enum() *RouteMatrixElementCondition {
p := new(RouteMatrixElementCondition)
*p = x
return p
}
func (x RouteMatrixElementCondition) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RouteMatrixElementCondition) Descriptor() protoreflect.EnumDescriptor {
return file_google_maps_routing_v2_routes_service_proto_enumTypes[0].Descriptor()
}
func (RouteMatrixElementCondition) Type() protoreflect.EnumType {
return &file_google_maps_routing_v2_routes_service_proto_enumTypes[0]
}
func (x RouteMatrixElementCondition) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RouteMatrixElementCondition.Descriptor instead.
func (RouteMatrixElementCondition) EnumDescriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{0}
}
// A supported reference route on the ComputeRoutesRequest.
type ComputeRoutesRequest_ReferenceRoute int32
const (
// Not used. Requests containing this value fail.
ComputeRoutesRequest_REFERENCE_ROUTE_UNSPECIFIED ComputeRoutesRequest_ReferenceRoute = 0
// Fuel efficient route. Routes labeled with this value are determined to be
// optimized for parameters such as fuel consumption.
ComputeRoutesRequest_FUEL_EFFICIENT ComputeRoutesRequest_ReferenceRoute = 1
)
// Enum value maps for ComputeRoutesRequest_ReferenceRoute.
var (
ComputeRoutesRequest_ReferenceRoute_name = map[int32]string{
0: "REFERENCE_ROUTE_UNSPECIFIED",
1: "FUEL_EFFICIENT",
}
ComputeRoutesRequest_ReferenceRoute_value = map[string]int32{
"REFERENCE_ROUTE_UNSPECIFIED": 0,
"FUEL_EFFICIENT": 1,
}
)
func (x ComputeRoutesRequest_ReferenceRoute) Enum() *ComputeRoutesRequest_ReferenceRoute {
p := new(ComputeRoutesRequest_ReferenceRoute)
*p = x
return p
}
func (x ComputeRoutesRequest_ReferenceRoute) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ComputeRoutesRequest_ReferenceRoute) Descriptor() protoreflect.EnumDescriptor {
return file_google_maps_routing_v2_routes_service_proto_enumTypes[1].Descriptor()
}
func (ComputeRoutesRequest_ReferenceRoute) Type() protoreflect.EnumType {
return &file_google_maps_routing_v2_routes_service_proto_enumTypes[1]
}
func (x ComputeRoutesRequest_ReferenceRoute) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ComputeRoutesRequest_ReferenceRoute.Descriptor instead.
func (ComputeRoutesRequest_ReferenceRoute) EnumDescriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{0, 0}
}
// Extra computations to perform while completing the request.
type ComputeRoutesRequest_ExtraComputation int32
const (
// Not used. Requests containing this value will fail.
ComputeRoutesRequest_EXTRA_COMPUTATION_UNSPECIFIED ComputeRoutesRequest_ExtraComputation = 0
// Toll information for the route(s).
ComputeRoutesRequest_TOLLS ComputeRoutesRequest_ExtraComputation = 1
// Estimated fuel consumption for the route(s).
ComputeRoutesRequest_FUEL_CONSUMPTION ComputeRoutesRequest_ExtraComputation = 2
// Traffic aware polylines for the route(s).
ComputeRoutesRequest_TRAFFIC_ON_POLYLINE ComputeRoutesRequest_ExtraComputation = 3
// [`NavigationInstructions`](google.maps.routing.v2.NavigationInstructions.instructions)
// presented as a formatted HTML text string. This content
// is meant to be read as-is. This content is for display only.
// Do not programmatically parse it.
ComputeRoutesRequest_HTML_FORMATTED_NAVIGATION_INSTRUCTIONS ComputeRoutesRequest_ExtraComputation = 4
)
// Enum value maps for ComputeRoutesRequest_ExtraComputation.
var (
ComputeRoutesRequest_ExtraComputation_name = map[int32]string{
0: "EXTRA_COMPUTATION_UNSPECIFIED",
1: "TOLLS",
2: "FUEL_CONSUMPTION",
3: "TRAFFIC_ON_POLYLINE",
4: "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS",
}
ComputeRoutesRequest_ExtraComputation_value = map[string]int32{
"EXTRA_COMPUTATION_UNSPECIFIED": 0,
"TOLLS": 1,
"FUEL_CONSUMPTION": 2,
"TRAFFIC_ON_POLYLINE": 3,
"HTML_FORMATTED_NAVIGATION_INSTRUCTIONS": 4,
}
)
func (x ComputeRoutesRequest_ExtraComputation) Enum() *ComputeRoutesRequest_ExtraComputation {
p := new(ComputeRoutesRequest_ExtraComputation)
*p = x
return p
}
func (x ComputeRoutesRequest_ExtraComputation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ComputeRoutesRequest_ExtraComputation) Descriptor() protoreflect.EnumDescriptor {
return file_google_maps_routing_v2_routes_service_proto_enumTypes[2].Descriptor()
}
func (ComputeRoutesRequest_ExtraComputation) Type() protoreflect.EnumType {
return &file_google_maps_routing_v2_routes_service_proto_enumTypes[2]
}
func (x ComputeRoutesRequest_ExtraComputation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ComputeRoutesRequest_ExtraComputation.Descriptor instead.
func (ComputeRoutesRequest_ExtraComputation) EnumDescriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{0, 1}
}
// Extra computations to perform while completing the request.
type ComputeRouteMatrixRequest_ExtraComputation int32
const (
// Not used. Requests containing this value will fail.
ComputeRouteMatrixRequest_EXTRA_COMPUTATION_UNSPECIFIED ComputeRouteMatrixRequest_ExtraComputation = 0
// Toll information for the matrix element(s).
ComputeRouteMatrixRequest_TOLLS ComputeRouteMatrixRequest_ExtraComputation = 1
)
// Enum value maps for ComputeRouteMatrixRequest_ExtraComputation.
var (
ComputeRouteMatrixRequest_ExtraComputation_name = map[int32]string{
0: "EXTRA_COMPUTATION_UNSPECIFIED",
1: "TOLLS",
}
ComputeRouteMatrixRequest_ExtraComputation_value = map[string]int32{
"EXTRA_COMPUTATION_UNSPECIFIED": 0,
"TOLLS": 1,
}
)
func (x ComputeRouteMatrixRequest_ExtraComputation) Enum() *ComputeRouteMatrixRequest_ExtraComputation {
p := new(ComputeRouteMatrixRequest_ExtraComputation)
*p = x
return p
}
func (x ComputeRouteMatrixRequest_ExtraComputation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ComputeRouteMatrixRequest_ExtraComputation) Descriptor() protoreflect.EnumDescriptor {
return file_google_maps_routing_v2_routes_service_proto_enumTypes[3].Descriptor()
}
func (ComputeRouteMatrixRequest_ExtraComputation) Type() protoreflect.EnumType {
return &file_google_maps_routing_v2_routes_service_proto_enumTypes[3]
}
func (x ComputeRouteMatrixRequest_ExtraComputation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ComputeRouteMatrixRequest_ExtraComputation.Descriptor instead.
func (ComputeRouteMatrixRequest_ExtraComputation) EnumDescriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{2, 0}
}
// ComputeRoutes request message.
type ComputeRoutesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Origin waypoint.
Origin *Waypoint `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
// Required. Destination waypoint.
Destination *Waypoint `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
// Optional. A set of waypoints along the route (excluding terminal points),
// for either stopping at or passing by. Up to 25 intermediate waypoints are
// supported.
Intermediates []*Waypoint `protobuf:"bytes,3,rep,name=intermediates,proto3" json:"intermediates,omitempty"`
// Optional. Specifies the mode of transportation.
TravelMode RouteTravelMode `protobuf:"varint,4,opt,name=travel_mode,json=travelMode,proto3,enum=google.maps.routing.v2.RouteTravelMode" json:"travel_mode,omitempty"`
// Optional. Specifies how to compute the route. The server
// attempts to use the selected routing preference to compute the route. If
//
// the routing preference results in an error or an extra long latency, then
//
// an error is returned. You can specify this option only when the
// `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails.
RoutingPreference RoutingPreference `protobuf:"varint,5,opt,name=routing_preference,json=routingPreference,proto3,enum=google.maps.routing.v2.RoutingPreference" json:"routing_preference,omitempty"`
// Optional. Specifies your preference for the quality of the polyline.
PolylineQuality PolylineQuality `protobuf:"varint,6,opt,name=polyline_quality,json=polylineQuality,proto3,enum=google.maps.routing.v2.PolylineQuality" json:"polyline_quality,omitempty"`
// Optional. Specifies the preferred encoding for the polyline.
PolylineEncoding PolylineEncoding `protobuf:"varint,12,opt,name=polyline_encoding,json=polylineEncoding,proto3,enum=google.maps.routing.v2.PolylineEncoding" json:"polyline_encoding,omitempty"`
// Optional. The departure time. If you don't set this value, then this value
// defaults to the time that you made the request.
// NOTE: You can only specify a `departure_time` in the past when
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to
// `TRANSIT`. Transit trips are available for up to 7 days in the past or 100
// days in the future.
DepartureTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=departure_time,json=departureTime,proto3" json:"departure_time,omitempty"`
// Optional. The arrival time.
// NOTE: Can only be set when
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set to
// `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but
// not both. Transit trips are available for up to 7 days in the past or 100
// days in the future.
ArrivalTime *timestamppb.Timestamp `protobuf:"bytes,19,opt,name=arrival_time,json=arrivalTime,proto3" json:"arrival_time,omitempty"`
// Optional. Specifies whether to calculate alternate routes in addition to
// the route. No alternative routes are returned for requests that have
// intermediate waypoints.
ComputeAlternativeRoutes bool `protobuf:"varint,8,opt,name=compute_alternative_routes,json=computeAlternativeRoutes,proto3" json:"compute_alternative_routes,omitempty"`
// Optional. A set of conditions to satisfy that affect the way routes are
// calculated.
RouteModifiers *RouteModifiers `protobuf:"bytes,9,opt,name=route_modifiers,json=routeModifiers,proto3" json:"route_modifiers,omitempty"`
// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see [Unicode Locale
// Identifier](http://www.unicode.org/reports/tr35/#Unicode_locale_identifier).
// See [Language
// Support](https://developers.google.com/maps/faq#languagesupport)
// for the list of supported languages. When you don't provide this value, the
// display language is inferred from the location of the route request.
LanguageCode string `protobuf:"bytes,10,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// Optional. The region code, specified as a ccTLD ("top-level domain")
// two-character value. For more information see [Country code top-level
// domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains).
RegionCode string `protobuf:"bytes,16,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
// Optional. Specifies the units of measure for the display fields. These
// fields include the `instruction` field in
// [`NavigationInstruction`][google.maps.routing.v2.NavigationInstruction].
// The units of measure used for the route, leg, step distance, and duration
// are not affected by this value. If you don't provide this value, then the
// display units are inferred from the location of the first origin.
Units Units `protobuf:"varint,11,opt,name=units,proto3,enum=google.maps.routing.v2.Units" json:"units,omitempty"`
// Optional. If set to true, the service attempts to minimize the overall cost
// of the route by re-ordering the specified intermediate waypoints. The
// request fails if any of the intermediate waypoints is a `via` waypoint. Use
// `ComputeRoutesResponse.Routes.optimized_intermediate_waypoint_index` to
// find the new ordering.
// If `ComputeRoutesResponseroutes.optimized_intermediate_waypoint_index` is
// not requested in the `X-Goog-FieldMask` header, the request fails.
// If `optimize_waypoint_order` is set to false,
// `ComputeRoutesResponse.optimized_intermediate_waypoint_index` will be
// empty.
OptimizeWaypointOrder bool `protobuf:"varint,13,opt,name=optimize_waypoint_order,json=optimizeWaypointOrder,proto3" json:"optimize_waypoint_order,omitempty"`
// Optional. Specifies what reference routes to calculate as part of the
// request in addition to the default route. A reference route is a route with
// a different route calculation objective than the default route. For example
// a `FUEL_EFFICIENT` reference route calculation takes into account various
// parameters that would generate an optimal fuel efficient route.
RequestedReferenceRoutes []ComputeRoutesRequest_ReferenceRoute `protobuf:"varint,14,rep,packed,name=requested_reference_routes,json=requestedReferenceRoutes,proto3,enum=google.maps.routing.v2.ComputeRoutesRequest_ReferenceRoute" json:"requested_reference_routes,omitempty"`
// Optional. A list of extra computations which may be used to complete the
// request. Note: These extra computations may return extra fields on the
// response. These extra fields must also be specified in the field mask to be
// returned in the response.
ExtraComputations []ComputeRoutesRequest_ExtraComputation `protobuf:"varint,15,rep,packed,name=extra_computations,json=extraComputations,proto3,enum=google.maps.routing.v2.ComputeRoutesRequest_ExtraComputation" json:"extra_computations,omitempty"`
// Optional. Specifies the assumptions to use when calculating time in
// traffic. This setting affects the value returned in the duration field in
// the
// [`Route`][google.maps.routing.v2.Route] and
// [`RouteLeg`][google.maps.routing.v2.RouteLeg] which contains the predicted
// time in traffic based on historical averages.
// `TrafficModel` is only available for requests that have set
// [`RoutingPreference`][google.maps.routing.v2.RoutingPreference] to
// `TRAFFIC_AWARE_OPTIMAL` and
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] to `DRIVE`.
// Defaults to `BEST_GUESS` if traffic is requested and `TrafficModel` is not
// specified.
TrafficModel TrafficModel `protobuf:"varint,18,opt,name=traffic_model,json=trafficModel,proto3,enum=google.maps.routing.v2.TrafficModel" json:"traffic_model,omitempty"`
// Optional. Specifies preferences that influence the route returned for
// `TRANSIT` routes. NOTE: You can only specify a `transit_preferences` when
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to
// `TRANSIT`.
TransitPreferences *TransitPreferences `protobuf:"bytes,20,opt,name=transit_preferences,json=transitPreferences,proto3" json:"transit_preferences,omitempty"`
}
func (x *ComputeRoutesRequest) Reset() {
*x = ComputeRoutesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComputeRoutesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComputeRoutesRequest) ProtoMessage() {}
func (x *ComputeRoutesRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_routing_v2_routes_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 ComputeRoutesRequest.ProtoReflect.Descriptor instead.
func (*ComputeRoutesRequest) Descriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{0}
}
func (x *ComputeRoutesRequest) GetOrigin() *Waypoint {
if x != nil {
return x.Origin
}
return nil
}
func (x *ComputeRoutesRequest) GetDestination() *Waypoint {
if x != nil {
return x.Destination
}
return nil
}
func (x *ComputeRoutesRequest) GetIntermediates() []*Waypoint {
if x != nil {
return x.Intermediates
}
return nil
}
func (x *ComputeRoutesRequest) GetTravelMode() RouteTravelMode {
if x != nil {
return x.TravelMode
}
return RouteTravelMode_TRAVEL_MODE_UNSPECIFIED
}
func (x *ComputeRoutesRequest) GetRoutingPreference() RoutingPreference {
if x != nil {
return x.RoutingPreference
}
return RoutingPreference_ROUTING_PREFERENCE_UNSPECIFIED
}
func (x *ComputeRoutesRequest) GetPolylineQuality() PolylineQuality {
if x != nil {
return x.PolylineQuality
}
return PolylineQuality_POLYLINE_QUALITY_UNSPECIFIED
}
func (x *ComputeRoutesRequest) GetPolylineEncoding() PolylineEncoding {
if x != nil {
return x.PolylineEncoding
}
return PolylineEncoding_POLYLINE_ENCODING_UNSPECIFIED
}
func (x *ComputeRoutesRequest) GetDepartureTime() *timestamppb.Timestamp {
if x != nil {
return x.DepartureTime
}
return nil
}
func (x *ComputeRoutesRequest) GetArrivalTime() *timestamppb.Timestamp {
if x != nil {
return x.ArrivalTime
}
return nil
}
func (x *ComputeRoutesRequest) GetComputeAlternativeRoutes() bool {
if x != nil {
return x.ComputeAlternativeRoutes
}
return false
}
func (x *ComputeRoutesRequest) GetRouteModifiers() *RouteModifiers {
if x != nil {
return x.RouteModifiers
}
return nil
}
func (x *ComputeRoutesRequest) GetLanguageCode() string {
if x != nil {
return x.LanguageCode
}
return ""
}
func (x *ComputeRoutesRequest) GetRegionCode() string {
if x != nil {
return x.RegionCode
}
return ""
}
func (x *ComputeRoutesRequest) GetUnits() Units {
if x != nil {
return x.Units
}
return Units_UNITS_UNSPECIFIED
}
func (x *ComputeRoutesRequest) GetOptimizeWaypointOrder() bool {
if x != nil {
return x.OptimizeWaypointOrder
}
return false
}
func (x *ComputeRoutesRequest) GetRequestedReferenceRoutes() []ComputeRoutesRequest_ReferenceRoute {
if x != nil {
return x.RequestedReferenceRoutes
}
return nil
}
func (x *ComputeRoutesRequest) GetExtraComputations() []ComputeRoutesRequest_ExtraComputation {
if x != nil {
return x.ExtraComputations
}
return nil
}
func (x *ComputeRoutesRequest) GetTrafficModel() TrafficModel {
if x != nil {
return x.TrafficModel
}
return TrafficModel_TRAFFIC_MODEL_UNSPECIFIED
}
func (x *ComputeRoutesRequest) GetTransitPreferences() *TransitPreferences {
if x != nil {
return x.TransitPreferences
}
return nil
}
// ComputeRoutes the response message.
type ComputeRoutesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Contains an array of computed routes (up to three) when you specify
// `compute_alternatives_routes`, and contains just one route when you don't.
// When this array contains multiple entries, the first one is the most
// recommended route. If the array is empty, then it means no route could be
// found.
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
// In some cases when the server is not able to compute the route results with
// all of the input preferences, it may fallback to using a different way of
// computation. When fallback mode is used, this field contains detailed info
// about the fallback response. Otherwise this field is unset.
FallbackInfo *FallbackInfo `protobuf:"bytes,2,opt,name=fallback_info,json=fallbackInfo,proto3" json:"fallback_info,omitempty"`
// Contains geocoding response info for waypoints specified as addresses.
GeocodingResults *GeocodingResults `protobuf:"bytes,3,opt,name=geocoding_results,json=geocodingResults,proto3" json:"geocoding_results,omitempty"`
}
func (x *ComputeRoutesResponse) Reset() {
*x = ComputeRoutesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComputeRoutesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComputeRoutesResponse) ProtoMessage() {}
func (x *ComputeRoutesResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_routing_v2_routes_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 ComputeRoutesResponse.ProtoReflect.Descriptor instead.
func (*ComputeRoutesResponse) Descriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{1}
}
func (x *ComputeRoutesResponse) GetRoutes() []*Route {
if x != nil {
return x.Routes
}
return nil
}
func (x *ComputeRoutesResponse) GetFallbackInfo() *FallbackInfo {
if x != nil {
return x.FallbackInfo
}
return nil
}
func (x *ComputeRoutesResponse) GetGeocodingResults() *GeocodingResults {
if x != nil {
return x.GeocodingResults
}
return nil
}
// ComputeRouteMatrix request message
type ComputeRouteMatrixRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Array of origins, which determines the rows of the response
// matrix. Several size restrictions apply to the cardinality of origins and
// destinations:
//
// * The sum of the number of origins + the number of destinations specified
// as either `place_id` or `address` must be no greater than 50.
// * The product of number of origins × number of destinations must be no
// greater than 625 in any case.
// * The product of the number of origins × number of destinations must be no
// greater than 100 if routing_preference is set to `TRAFFIC_AWARE_OPTIMAL`.
// * The product of the number of origins × number of destinations must be no
// greater than 100 if travel_mode is set to `TRANSIT`.
Origins []*RouteMatrixOrigin `protobuf:"bytes,1,rep,name=origins,proto3" json:"origins,omitempty"`
// Required. Array of destinations, which determines the columns of the
// response matrix.
Destinations []*RouteMatrixDestination `protobuf:"bytes,2,rep,name=destinations,proto3" json:"destinations,omitempty"`
// Optional. Specifies the mode of transportation.
TravelMode RouteTravelMode `protobuf:"varint,3,opt,name=travel_mode,json=travelMode,proto3,enum=google.maps.routing.v2.RouteTravelMode" json:"travel_mode,omitempty"`
// Optional. Specifies how to compute the route. The server attempts to use
// the selected routing preference to compute the route. If the routing
// preference results in an error or an extra long latency, an error is
// returned. You can specify this option only when the `travel_mode` is
// `DRIVE` or `TWO_WHEELER`, otherwise the request fails.
RoutingPreference RoutingPreference `protobuf:"varint,4,opt,name=routing_preference,json=routingPreference,proto3,enum=google.maps.routing.v2.RoutingPreference" json:"routing_preference,omitempty"`
// Optional. The departure time. If you don't set this value, then this value
// defaults to the time that you made the request.
// NOTE: You can only specify a `departure_time` in the past when
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to
// `TRANSIT`.
DepartureTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=departure_time,json=departureTime,proto3" json:"departure_time,omitempty"`
// Optional. The arrival time.
// NOTE: Can only be set when
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to
// `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but
// not both.
ArrivalTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=arrival_time,json=arrivalTime,proto3" json:"arrival_time,omitempty"`
// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see [Unicode Locale
// Identifier](http://www.unicode.org/reports/tr35/#Unicode_locale_identifier).
// See [Language
// Support](https://developers.google.com/maps/faq#languagesupport)
// for the list of supported languages. When you don't provide this value, the
// display language is inferred from the location of the first origin.
LanguageCode string `protobuf:"bytes,6,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// Optional. The region code, specified as a ccTLD ("top-level domain")
// two-character value. For more information see [Country code top-level
// domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains).
RegionCode string `protobuf:"bytes,9,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
// Optional. Specifies the units of measure for the display fields.
Units Units `protobuf:"varint,7,opt,name=units,proto3,enum=google.maps.routing.v2.Units" json:"units,omitempty"`
// Optional. A list of extra computations which may be used to complete the
// request. Note: These extra computations may return extra fields on the
// response. These extra fields must also be specified in the field mask to be
// returned in the response.
ExtraComputations []ComputeRouteMatrixRequest_ExtraComputation `protobuf:"varint,8,rep,packed,name=extra_computations,json=extraComputations,proto3,enum=google.maps.routing.v2.ComputeRouteMatrixRequest_ExtraComputation" json:"extra_computations,omitempty"`
// Optional. Specifies the assumptions to use when calculating time in
// traffic. This setting affects the value returned in the duration field in
// the [RouteMatrixElement][google.maps.routing.v2.RouteMatrixElement] which
// contains the predicted time in traffic based on historical averages.
// [RoutingPreference][google.maps.routing.v2.RoutingPreference] to
// `TRAFFIC_AWARE_OPTIMAL` and
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] to `DRIVE`.
// Defaults to `BEST_GUESS` if traffic is requested and `TrafficModel` is not
// specified.
TrafficModel TrafficModel `protobuf:"varint,10,opt,name=traffic_model,json=trafficModel,proto3,enum=google.maps.routing.v2.TrafficModel" json:"traffic_model,omitempty"`
// Optional. Specifies preferences that influence the route returned for
// `TRANSIT` routes. NOTE: You can only specify a `transit_preferences` when
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set to
// `TRANSIT`.
TransitPreferences *TransitPreferences `protobuf:"bytes,12,opt,name=transit_preferences,json=transitPreferences,proto3" json:"transit_preferences,omitempty"`
}
func (x *ComputeRouteMatrixRequest) Reset() {
*x = ComputeRouteMatrixRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComputeRouteMatrixRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComputeRouteMatrixRequest) ProtoMessage() {}
func (x *ComputeRouteMatrixRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_routing_v2_routes_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 ComputeRouteMatrixRequest.ProtoReflect.Descriptor instead.
func (*ComputeRouteMatrixRequest) Descriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{2}
}
func (x *ComputeRouteMatrixRequest) GetOrigins() []*RouteMatrixOrigin {
if x != nil {
return x.Origins
}
return nil
}
func (x *ComputeRouteMatrixRequest) GetDestinations() []*RouteMatrixDestination {
if x != nil {
return x.Destinations
}
return nil
}
func (x *ComputeRouteMatrixRequest) GetTravelMode() RouteTravelMode {
if x != nil {
return x.TravelMode
}
return RouteTravelMode_TRAVEL_MODE_UNSPECIFIED
}
func (x *ComputeRouteMatrixRequest) GetRoutingPreference() RoutingPreference {
if x != nil {
return x.RoutingPreference
}
return RoutingPreference_ROUTING_PREFERENCE_UNSPECIFIED
}
func (x *ComputeRouteMatrixRequest) GetDepartureTime() *timestamppb.Timestamp {
if x != nil {
return x.DepartureTime
}
return nil
}
func (x *ComputeRouteMatrixRequest) GetArrivalTime() *timestamppb.Timestamp {
if x != nil {
return x.ArrivalTime
}
return nil
}
func (x *ComputeRouteMatrixRequest) GetLanguageCode() string {
if x != nil {
return x.LanguageCode
}
return ""
}
func (x *ComputeRouteMatrixRequest) GetRegionCode() string {
if x != nil {
return x.RegionCode
}
return ""
}
func (x *ComputeRouteMatrixRequest) GetUnits() Units {
if x != nil {
return x.Units
}
return Units_UNITS_UNSPECIFIED
}
func (x *ComputeRouteMatrixRequest) GetExtraComputations() []ComputeRouteMatrixRequest_ExtraComputation {
if x != nil {
return x.ExtraComputations
}
return nil
}
func (x *ComputeRouteMatrixRequest) GetTrafficModel() TrafficModel {
if x != nil {
return x.TrafficModel
}
return TrafficModel_TRAFFIC_MODEL_UNSPECIFIED
}
func (x *ComputeRouteMatrixRequest) GetTransitPreferences() *TransitPreferences {
if x != nil {
return x.TransitPreferences
}
return nil
}
// A single origin for ComputeRouteMatrixRequest
type RouteMatrixOrigin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Origin waypoint
Waypoint *Waypoint `protobuf:"bytes,1,opt,name=waypoint,proto3" json:"waypoint,omitempty"`
// Optional. Modifiers for every route that takes this as the origin
RouteModifiers *RouteModifiers `protobuf:"bytes,2,opt,name=route_modifiers,json=routeModifiers,proto3" json:"route_modifiers,omitempty"`
}
func (x *RouteMatrixOrigin) Reset() {
*x = RouteMatrixOrigin{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteMatrixOrigin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteMatrixOrigin) ProtoMessage() {}
func (x *RouteMatrixOrigin) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_routing_v2_routes_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 RouteMatrixOrigin.ProtoReflect.Descriptor instead.
func (*RouteMatrixOrigin) Descriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{3}
}
func (x *RouteMatrixOrigin) GetWaypoint() *Waypoint {
if x != nil {
return x.Waypoint
}
return nil
}
func (x *RouteMatrixOrigin) GetRouteModifiers() *RouteModifiers {
if x != nil {
return x.RouteModifiers
}
return nil
}
// A single destination for ComputeRouteMatrixRequest
type RouteMatrixDestination struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Destination waypoint
Waypoint *Waypoint `protobuf:"bytes,1,opt,name=waypoint,proto3" json:"waypoint,omitempty"`
}
func (x *RouteMatrixDestination) Reset() {
*x = RouteMatrixDestination{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteMatrixDestination) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteMatrixDestination) ProtoMessage() {}
func (x *RouteMatrixDestination) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_routing_v2_routes_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 RouteMatrixDestination.ProtoReflect.Descriptor instead.
func (*RouteMatrixDestination) Descriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{4}
}
func (x *RouteMatrixDestination) GetWaypoint() *Waypoint {
if x != nil {
return x.Waypoint
}
return nil
}
// Contains route information computed for an origin/destination pair in the
// ComputeRouteMatrix API. This proto can be streamed to the client.
type RouteMatrixElement struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Zero-based index of the origin in the request.
OriginIndex *int32 `protobuf:"varint,1,opt,name=origin_index,json=originIndex,proto3,oneof" json:"origin_index,omitempty"`
// Zero-based index of the destination in the request.
DestinationIndex *int32 `protobuf:"varint,2,opt,name=destination_index,json=destinationIndex,proto3,oneof" json:"destination_index,omitempty"`
// Error status code for this element.
Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
// Indicates whether the route was found or not. Independent of status.
Condition RouteMatrixElementCondition `protobuf:"varint,9,opt,name=condition,proto3,enum=google.maps.routing.v2.RouteMatrixElementCondition" json:"condition,omitempty"`
// The travel distance of the route, in meters.
DistanceMeters int32 `protobuf:"varint,4,opt,name=distance_meters,json=distanceMeters,proto3" json:"distance_meters,omitempty"`
// The length of time needed to navigate the route. If you set the
// [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
// to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
// you set the `routing_preference` to either `TRAFFIC_AWARE` or
// `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
// conditions into account.
Duration *durationpb.Duration `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"`
// The duration of traveling through the route without taking traffic
// conditions into consideration.
StaticDuration *durationpb.Duration `protobuf:"bytes,6,opt,name=static_duration,json=staticDuration,proto3" json:"static_duration,omitempty"`
// Additional information about the route. For example: restriction
// information and toll information
TravelAdvisory *RouteTravelAdvisory `protobuf:"bytes,7,opt,name=travel_advisory,json=travelAdvisory,proto3" json:"travel_advisory,omitempty"`
// In some cases when the server is not able to compute the route with the
// given preferences for this particular origin/destination pair, it may
// fall back to using a different mode of computation. When fallback mode is
// used, this field contains detailed information about the fallback response.
// Otherwise this field is unset.
FallbackInfo *FallbackInfo `protobuf:"bytes,8,opt,name=fallback_info,json=fallbackInfo,proto3" json:"fallback_info,omitempty"`
// Text representations of properties of the `RouteMatrixElement`.
LocalizedValues *RouteMatrixElement_LocalizedValues `protobuf:"bytes,10,opt,name=localized_values,json=localizedValues,proto3" json:"localized_values,omitempty"`
}
func (x *RouteMatrixElement) Reset() {
*x = RouteMatrixElement{}
if protoimpl.UnsafeEnabled {
mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteMatrixElement) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteMatrixElement) ProtoMessage() {}
func (x *RouteMatrixElement) ProtoReflect() protoreflect.Message {
mi := &file_google_maps_routing_v2_routes_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 RouteMatrixElement.ProtoReflect.Descriptor instead.
func (*RouteMatrixElement) Descriptor() ([]byte, []int) {
return file_google_maps_routing_v2_routes_service_proto_rawDescGZIP(), []int{5}
}
func (x *RouteMatrixElement) GetOriginIndex() int32 {
if x != nil && x.OriginIndex != nil {
return *x.OriginIndex
}
return 0
}
func (x *RouteMatrixElement) GetDestinationIndex() int32 {
if x != nil && x.DestinationIndex != nil {
return *x.DestinationIndex
}
return 0
}