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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
// This file is @generated by prost-build.
/// Information related to how and why a fallback result was used. If this field
/// is set, then it means the server used a different routing mode from your
/// preferred mode as fallback.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FallbackInfo {
    /// Routing mode used for the response. If fallback was triggered, the mode
    /// may be different from routing preference set in the original client
    /// request.
    #[prost(enumeration = "FallbackRoutingMode", tag = "1")]
    pub routing_mode: i32,
    /// The reason why fallback response was used instead of the original response.
    /// This field is only populated when the fallback mode is triggered and the
    /// fallback response is returned.
    #[prost(enumeration = "FallbackReason", tag = "2")]
    pub reason: i32,
}
/// Reasons for using fallback response.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FallbackReason {
    /// No fallback reason specified.
    Unspecified = 0,
    /// A server error happened while calculating routes with your preferred
    /// routing mode, but we were able to return a result calculated by an
    /// alternative mode.
    ServerError = 1,
    /// We were not able to finish the calculation with your preferred routing mode
    /// on time, but we were able to return a result calculated by an alternative
    /// mode.
    LatencyExceeded = 2,
}
impl FallbackReason {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            FallbackReason::Unspecified => "FALLBACK_REASON_UNSPECIFIED",
            FallbackReason::ServerError => "SERVER_ERROR",
            FallbackReason::LatencyExceeded => "LATENCY_EXCEEDED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FALLBACK_REASON_UNSPECIFIED" => Some(Self::Unspecified),
            "SERVER_ERROR" => Some(Self::ServerError),
            "LATENCY_EXCEEDED" => Some(Self::LatencyExceeded),
            _ => None,
        }
    }
}
/// Actual routing mode used for returned fallback response.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FallbackRoutingMode {
    /// Not used.
    Unspecified = 0,
    /// Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the
    /// response.
    FallbackTrafficUnaware = 1,
    /// Indicates the "TRAFFIC_AWARE" routing mode was used to compute the
    /// response.
    FallbackTrafficAware = 2,
}
impl FallbackRoutingMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            FallbackRoutingMode::Unspecified => "FALLBACK_ROUTING_MODE_UNSPECIFIED",
            FallbackRoutingMode::FallbackTrafficUnaware => "FALLBACK_TRAFFIC_UNAWARE",
            FallbackRoutingMode::FallbackTrafficAware => "FALLBACK_TRAFFIC_AWARE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FALLBACK_ROUTING_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "FALLBACK_TRAFFIC_UNAWARE" => Some(Self::FallbackTrafficUnaware),
            "FALLBACK_TRAFFIC_AWARE" => Some(Self::FallbackTrafficAware),
            _ => None,
        }
    }
}
/// Encapsulates an encoded polyline.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Polyline {
    /// Encapsulates the type of polyline. Defaults to encoded_polyline.
    #[prost(oneof = "polyline::PolylineType", tags = "1, 2")]
    pub polyline_type: ::core::option::Option<polyline::PolylineType>,
}
/// Nested message and enum types in `Polyline`.
pub mod polyline {
    /// Encapsulates the type of polyline. Defaults to encoded_polyline.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum PolylineType {
        /// The string encoding of the polyline using the [polyline encoding
        /// algorithm](<https://developers.google.com/maps/documentation/utilities/polylinealgorithm>)
        #[prost(string, tag = "1")]
        EncodedPolyline(::prost::alloc::string::String),
        /// Specifies a polyline using the [GeoJSON LineString
        /// format](<https://tools.ietf.org/html/rfc7946#section-3.1.4>)
        #[prost(message, tag = "2")]
        GeoJsonLinestring(::prost_types::Struct),
    }
}
/// A set of values that specify the quality of the polyline.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PolylineQuality {
    /// No polyline quality preference specified. Defaults to `OVERVIEW`.
    Unspecified = 0,
    /// Specifies a high-quality polyline - which is composed using more points
    /// than `OVERVIEW`, at the cost of increased response size. Use this value
    /// when you need more precision.
    HighQuality = 1,
    /// Specifies an overview polyline - which is composed using a small number of
    /// points. Use this value when displaying an overview of the route. Using this
    /// option has a lower request latency compared to using the
    /// `HIGH_QUALITY` option.
    Overview = 2,
}
impl PolylineQuality {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PolylineQuality::Unspecified => "POLYLINE_QUALITY_UNSPECIFIED",
            PolylineQuality::HighQuality => "HIGH_QUALITY",
            PolylineQuality::Overview => "OVERVIEW",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "POLYLINE_QUALITY_UNSPECIFIED" => Some(Self::Unspecified),
            "HIGH_QUALITY" => Some(Self::HighQuality),
            "OVERVIEW" => Some(Self::Overview),
            _ => None,
        }
    }
}
/// Specifies the preferred type of polyline to be returned.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PolylineEncoding {
    /// No polyline type preference specified. Defaults to `ENCODED_POLYLINE`.
    Unspecified = 0,
    /// Specifies a polyline encoded using the [polyline encoding
    /// algorithm](<https://developers.google.com/maps/documentation/utilities/polylinealgorithm>).
    EncodedPolyline = 1,
    /// Specifies a polyline using the [GeoJSON LineString
    /// format](<https://tools.ietf.org/html/rfc7946#section-3.1.4>)
    GeoJsonLinestring = 2,
}
impl PolylineEncoding {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PolylineEncoding::Unspecified => "POLYLINE_ENCODING_UNSPECIFIED",
            PolylineEncoding::EncodedPolyline => "ENCODED_POLYLINE",
            PolylineEncoding::GeoJsonLinestring => "GEO_JSON_LINESTRING",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "POLYLINE_ENCODING_UNSPECIFIED" => Some(Self::Unspecified),
            "ENCODED_POLYLINE" => Some(Self::EncodedPolyline),
            "GEO_JSON_LINESTRING" => Some(Self::GeoJsonLinestring),
            _ => None,
        }
    }
}
/// Encapsulates a waypoint. Waypoints mark both the beginning and end of a
/// route, and include intermediate stops along the route.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Waypoint {
    /// Marks this waypoint as a milestone rather a stopping point. For
    /// each non-via waypoint in the request, the response appends an entry to the
    /// `legs` array to provide the details for stopovers on that leg of the
    /// trip. Set this value to true when you want the route to pass through this
    /// waypoint without stopping over. Via waypoints don't cause an entry to be
    /// added to the `legs` array, but they do route the journey through the
    /// waypoint. You can only set this value on waypoints that are intermediates.
    /// The request fails if you set this field on terminal waypoints.
    /// If ComputeRoutesRequest.optimize_waypoint_order is set to true then
    /// this field cannot be set to true; otherwise, the request fails.
    #[prost(bool, tag = "3")]
    pub via: bool,
    /// Indicates that the waypoint is meant for vehicles to stop at, where the
    /// intention is to either pickup or drop-off. When you set this value, the
    /// calculated route won't include non-`via` waypoints on roads that are
    /// unsuitable for pickup and drop-off. This option works only for `DRIVE` and
    /// `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
    #[prost(bool, tag = "4")]
    pub vehicle_stopover: bool,
    /// Indicates that the location of this waypoint is meant to have a preference
    /// for the vehicle to stop at a particular side of road. When you set this
    /// value, the route will pass through the location so that the vehicle can
    /// stop at the side of road that the location is biased towards from the
    /// center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
    /// travel modes, and when the 'location_type' is set to 'location'.
    #[prost(bool, tag = "5")]
    pub side_of_road: bool,
    /// Different ways to represent a location.
    #[prost(oneof = "waypoint::LocationType", tags = "1, 2")]
    pub location_type: ::core::option::Option<waypoint::LocationType>,
}
/// Nested message and enum types in `Waypoint`.
pub mod waypoint {
    /// Different ways to represent a location.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum LocationType {
        /// A point specified using geographic coordinates, including an optional
        /// heading.
        #[prost(message, tag = "1")]
        Location(super::Location),
        /// The POI Place ID associated with the waypoint.
        #[prost(string, tag = "2")]
        PlaceId(::prost::alloc::string::String),
    }
}
/// Encapsulates a location (a geographic point, and an optional heading).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Location {
    /// The waypoint's geographic coordinates.
    #[prost(message, optional, tag = "1")]
    pub lat_lng: ::core::option::Option<super::super::super::r#type::LatLng>,
    /// The compass heading associated with the direction of the flow of traffic.
    /// This value is used to specify the side of the road to use for pickup and
    /// drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
    /// of due North, 90 specifies a heading of due East, etc. You can use this
    /// field only for `DRIVE` and `TWO_WHEELER` travel modes.
    #[prost(message, optional, tag = "2")]
    pub heading: ::core::option::Option<i32>,
}
/// Encapsulates a route, which consists of a series of connected road segments
/// that join beginning, ending, and intermediate waypoints.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Route {
    /// A collection of legs (path segments between waypoints) that make-up the
    /// route. Each leg corresponds to the trip between two non-`via` Waypoints.
    /// For example, a route with no intermediate waypoints has only one leg. A
    /// route that includes one non-`via` intermediate waypoint has two legs. A
    /// route that includes one `via` intermediate waypoint has one leg. The order
    /// of the legs matches the order of Waypoints from `origin` to `intermediates`
    /// to `destination`.
    #[prost(message, repeated, tag = "1")]
    pub legs: ::prost::alloc::vec::Vec<RouteLeg>,
    /// The travel distance of the route, in meters.
    #[prost(int32, tag = "2")]
    pub distance_meters: i32,
    /// The length of time needed to navigate the route. If you set the
    /// `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.
    #[prost(message, optional, tag = "3")]
    pub duration: ::core::option::Option<::prost_types::Duration>,
    /// The duration of traveling through the route without taking traffic
    /// conditions into consideration.
    #[prost(message, optional, tag = "4")]
    pub static_duration: ::core::option::Option<::prost_types::Duration>,
    /// The overall route polyline. This polyline will be the combined polyline of
    /// all `legs`.
    #[prost(message, optional, tag = "5")]
    pub polyline: ::core::option::Option<Polyline>,
    /// A description of the route.
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    /// An array of warnings to show when displaying the route.
    #[prost(string, repeated, tag = "7")]
    pub warnings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The viewport bounding box of the polyline.
    #[prost(message, optional, tag = "8")]
    pub viewport: ::core::option::Option<super::super::super::geo::r#type::Viewport>,
    /// Additional information about the route.
    #[prost(message, optional, tag = "9")]
    pub travel_advisory: ::core::option::Option<RouteTravelAdvisory>,
    /// If ComputeRoutesRequest.optimize_waypoint_order is set to true, this field
    /// contains the optimized ordering of intermediates waypoints.
    /// otherwise, this field is empty.
    /// For example, suppose the input is Origin: LA; Intermediates: Dallas,
    /// Bangor, Phoenix;  Destination: New York; and the optimized intermediate
    /// waypoint order is:  Phoenix, Dallas, Bangor. Then this field contains the
    /// values \[2, 0, 1\]. The index starts with 0 for the first intermediate
    /// waypoint.
    #[prost(int32, repeated, tag = "10")]
    pub optimized_intermediate_waypoint_index: ::prost::alloc::vec::Vec<i32>,
}
/// Encapsulates the additional information that the user should be informed
/// about, such as possible traffic zone restriction etc.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteTravelAdvisory {
    /// The traffic restriction that applies to the route. A vehicle that is
    /// subject to the restriction is not allowed to travel on the route. As of
    /// October 2019, only Jakarta, Indonesia takes into consideration.
    #[prost(message, optional, tag = "1")]
    pub traffic_restriction: ::core::option::Option<TrafficRestriction>,
    /// Encapsulates information about tolls on the Route.
    /// This field is only populated if we expect there are tolls on the Route.
    /// If this field is set but the estimated_price subfield is not populated,
    /// we expect that road contains tolls but we do not know an estimated price.
    /// If this field is not set, then we expect there is no toll on the Route.
    #[prost(message, optional, tag = "2")]
    pub toll_info: ::core::option::Option<TollInfo>,
    /// Speed reading intervals detailing traffic density. Applicable in case of
    /// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
    /// The intervals cover the entire polyline of the route without overlap.
    /// The start point of a specified interval is the same as the end point of the
    /// preceding interval.
    ///
    /// Example:
    ///
    ///      polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
    ///      speed_reading_intervals: [A,C), [C,D), [D,G).
    #[prost(message, repeated, tag = "3")]
    pub speed_reading_intervals: ::prost::alloc::vec::Vec<SpeedReadingInterval>,
    /// Information related to the custom layer data that the customer specified
    /// (e.g. time spent in a customer specified area).
    #[prost(message, optional, tag = "4")]
    pub custom_layer_info: ::core::option::Option<CustomLayerInfo>,
}
/// Encapsulates the additional information that the user should be informed
/// about, such as possible traffic zone restriction etc. on a route leg.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteLegTravelAdvisory {
    /// Encapsulates information about tolls on the specific RouteLeg.
    /// This field is only populated if we expect there are tolls on the RouteLeg.
    /// If this field is set but the estimated_price subfield is not populated,
    /// we expect that road contains tolls but we do not know an estimated price.
    /// If this field does not exist, then there is no toll on the RouteLeg.
    #[prost(message, optional, tag = "1")]
    pub toll_info: ::core::option::Option<TollInfo>,
    /// Speed reading intervals detailing traffic density. Applicable in case of
    /// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
    /// The intervals cover the entire polyline of the RouteLg without overlap.
    /// The start point of a specified interval is the same as the end point of the
    /// preceding interval.
    ///
    /// Example:
    ///
    ///      polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
    ///      speed_reading_intervals: [A,C), [C,D), [D,G).
    #[prost(message, repeated, tag = "2")]
    pub speed_reading_intervals: ::prost::alloc::vec::Vec<SpeedReadingInterval>,
    /// Information related to the custom layer data that the customer specified
    /// (e.g. time spent in a customer specified area).
    #[prost(message, optional, tag = "3")]
    pub custom_layer_info: ::core::option::Option<CustomLayerInfo>,
}
/// Encapsulates the additional information that the user should be informed
/// about, such as possible traffic zone restriction on a leg step.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteLegStepTravelAdvisory {
    /// Speed reading intervals detailing traffic density. Applicable in case of
    /// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
    /// The intervals cover the entire polyline of the RouteLegStep without
    /// overlap. The start point of a specified interval is the same as the end
    /// point of the preceding interval.
    ///
    /// Example:
    ///
    ///      polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
    ///      speed_reading_intervals: [A,C), [C,D), [D,G).
    #[prost(message, repeated, tag = "1")]
    pub speed_reading_intervals: ::prost::alloc::vec::Vec<SpeedReadingInterval>,
}
/// Encapsulates the traffic restriction applied to the route. As of October
/// 2019, only Jakarta, Indonesia takes into consideration.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrafficRestriction {
    /// The restriction based on the vehicle's license plate last character. If
    /// this field does not exist, then no restriction on route.
    #[prost(message, optional, tag = "1")]
    pub license_plate_last_character_restriction: ::core::option::Option<
        LicensePlateLastCharacterRestriction,
    >,
}
/// Encapsulates the license plate last character restriction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LicensePlateLastCharacterRestriction {
    /// The allowed last character of a license plate of a vehicle. Only vehicles
    /// whose license plate's last characters match these are allowed to travel on
    /// the route. If empty, no vehicle is allowed.
    #[prost(string, repeated, tag = "1")]
    pub allowed_last_characters: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
}
/// Encapsulates a segment between non-`via` waypoints.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteLeg {
    /// The travel distance of the route leg, in meters.
    #[prost(int32, tag = "1")]
    pub distance_meters: i32,
    /// The length of time needed to navigate the leg. If the `route_preference`
    /// is set to `TRAFFIC_UNAWARE`, then this value is the same as
    /// `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
    /// `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
    /// conditions into account.
    #[prost(message, optional, tag = "2")]
    pub duration: ::core::option::Option<::prost_types::Duration>,
    /// The duration of traveling through the leg, calculated without taking
    /// traffic conditions into consideration.
    #[prost(message, optional, tag = "3")]
    pub static_duration: ::core::option::Option<::prost_types::Duration>,
    /// The overall polyline for this leg. This includes that each `step`'s
    /// polyline.
    #[prost(message, optional, tag = "4")]
    pub polyline: ::core::option::Option<Polyline>,
    /// The start location of this leg. This might be different from the provided
    /// `origin`. For example, when the provided `origin` is not near a road, this
    /// is a point on the road.
    #[prost(message, optional, tag = "5")]
    pub start_location: ::core::option::Option<Location>,
    /// The end location of this leg. This might be different from the provided
    /// `destination`. For example, when the provided `destination` is not near a
    /// road, this is a point on the road.
    #[prost(message, optional, tag = "6")]
    pub end_location: ::core::option::Option<Location>,
    /// An array of steps denoting segments within this leg. Each step represents
    /// one navigation instruction.
    #[prost(message, repeated, tag = "7")]
    pub steps: ::prost::alloc::vec::Vec<RouteLegStep>,
    /// Encapsulates the additional information that the user should be informed
    /// about, such as possible traffic zone restriction etc. on a route leg.
    #[prost(message, optional, tag = "8")]
    pub travel_advisory: ::core::option::Option<RouteLegTravelAdvisory>,
}
/// Encapsulates toll information on a `Route` or on a `RouteLeg`.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TollInfo {
    /// The monetary amount of tolls for the corresponding Route or RouteLeg.
    /// This list contains a money amount for each currency that is expected
    /// to be charged by the toll stations. Typically this list will contain only
    /// one item for routes with tolls in one currency. For international trips,
    /// this list may contain multiple items to reflect tolls in different
    /// currencies.
    #[prost(message, repeated, tag = "1")]
    pub estimated_price: ::prost::alloc::vec::Vec<super::super::super::r#type::Money>,
}
/// Encapsulates a segment of a `RouteLeg`. A step corresponds to a single
/// navigation instruction. Route legs are made up of steps.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteLegStep {
    /// The travel distance of this step, in meters. In some circumstances, this
    /// field might not have a value.
    #[prost(int32, tag = "1")]
    pub distance_meters: i32,
    /// The duration of travel through this step without taking traffic conditions
    /// into consideration. In some circumstances, this field might not have a
    /// value.
    #[prost(message, optional, tag = "2")]
    pub static_duration: ::core::option::Option<::prost_types::Duration>,
    /// The polyline associated with this step.
    #[prost(message, optional, tag = "3")]
    pub polyline: ::core::option::Option<Polyline>,
    /// The start location of this step.
    #[prost(message, optional, tag = "4")]
    pub start_location: ::core::option::Option<Location>,
    /// The end location of this step.
    #[prost(message, optional, tag = "5")]
    pub end_location: ::core::option::Option<Location>,
    /// Navigation instructions.
    #[prost(message, optional, tag = "6")]
    pub navigation_instruction: ::core::option::Option<NavigationInstruction>,
    /// Encapsulates the additional information that the user should be informed
    /// about, such as possible traffic zone restriction on a leg step.
    #[prost(message, optional, tag = "7")]
    pub travel_advisory: ::core::option::Option<RouteLegStepTravelAdvisory>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NavigationInstruction {
    /// Encapsulates the navigation instructions for the current step (e.g., turn
    /// left, merge, straight, etc.). This field determines which icon to display.
    #[prost(enumeration = "Maneuver", tag = "1")]
    pub maneuver: i32,
    /// Instructions for navigating this step.
    #[prost(string, tag = "2")]
    pub instructions: ::prost::alloc::string::String,
}
/// Traffic density indicator on a contiguous segment of a polyline or path.
/// Given a path with points P_0, P_1, ... , P_N (zero-based index), the
/// SpeedReadingInterval defines an interval and describes its traffic using the
/// following categories.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpeedReadingInterval {
    /// The starting index of this interval in the polyline.
    /// In JSON, when the index is 0, the field appears to be unpopulated.
    #[prost(int32, tag = "1")]
    pub start_polyline_point_index: i32,
    /// The ending index of this interval in the polyline.
    /// In JSON, when the index is 0, the field appears to be unpopulated.
    #[prost(int32, tag = "2")]
    pub end_polyline_point_index: i32,
    /// Traffic speed in this interval.
    #[prost(enumeration = "speed_reading_interval::Speed", tag = "3")]
    pub speed: i32,
}
/// Nested message and enum types in `SpeedReadingInterval`.
pub mod speed_reading_interval {
    /// The classification of polyline speed based on traffic data.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Speed {
        /// Default value. This value is unused.
        Unspecified = 0,
        /// Normal speed, no slowdown is detected.
        Normal = 1,
        /// Slowdown detected, but no traffic jam formed.
        Slow = 2,
        /// Traffic jam detected.
        TrafficJam = 3,
    }
    impl Speed {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Speed::Unspecified => "SPEED_UNSPECIFIED",
                Speed::Normal => "NORMAL",
                Speed::Slow => "SLOW",
                Speed::TrafficJam => "TRAFFIC_JAM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SPEED_UNSPECIFIED" => Some(Self::Unspecified),
                "NORMAL" => Some(Self::Normal),
                "SLOW" => Some(Self::Slow),
                "TRAFFIC_JAM" => Some(Self::TrafficJam),
                _ => None,
            }
        }
    }
}
/// Encapsulates statistics about the time spent and distance travelled in a
/// custom area.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomLayerInfo {
    /// Encapsulates information about areas in the custom layer on the Route.
    /// This field is only populated if a route travels through areas in the
    /// custom layer.
    #[prost(message, repeated, tag = "1")]
    pub area_info: ::prost::alloc::vec::Vec<custom_layer_info::AreaInfo>,
}
/// Nested message and enum types in `CustomLayerInfo`.
pub mod custom_layer_info {
    /// Encapsulates areas related information on a `Route` or on a `RouteLeg`.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AreaInfo {
        /// ID of an area inside a customer provided dataset. An area represents a
        /// collection of polygons on the map that are of concern to the customer.
        /// For example, the customer may be interested in knowing whether a
        /// returned route is traveling through multiple busy city blocks during
        /// a predefined period of time. An area ID is unique within a single
        /// dataset uploaded by a customer. That is, a (customer_id, dataset_id,
        /// area_id) triplet should uniquely identify a set of polygons on the map
        /// that "activates" following a common schedule.
        #[prost(string, tag = "1")]
        pub area_id: ::prost::alloc::string::String,
        /// Total distance traveled in the area (in meters).
        #[prost(float, tag = "2")]
        pub distance_in_area_meters: f32,
        /// Total time spent in the area.
        #[prost(message, optional, tag = "3")]
        pub duration_in_area: ::core::option::Option<::prost_types::Duration>,
    }
}
/// A set of values that specify the navigation action to take for the current
/// step (e.g., turn left, merge, straight, etc.).
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Maneuver {
    /// Not used.
    Unspecified = 0,
    /// Turn slightly to the left.
    TurnSlightLeft = 1,
    /// Turn sharply to the left.
    TurnSharpLeft = 2,
    /// Make a left u-turn.
    UturnLeft = 3,
    /// Turn left.
    TurnLeft = 4,
    /// Turn slightly to the right.
    TurnSlightRight = 5,
    /// Turn sharply to the right.
    TurnSharpRight = 6,
    /// Make a right u-turn.
    UturnRight = 7,
    /// Turn right.
    TurnRight = 8,
    /// Go straight.
    Straight = 9,
    /// Take the left ramp.
    RampLeft = 10,
    /// Take the right ramp.
    RampRight = 11,
    /// Merge into traffic.
    Merge = 12,
    /// Take the left fork.
    ForkLeft = 13,
    /// Take the right fork.
    ForkRight = 14,
    /// Take the ferry.
    Ferry = 15,
    /// Take the train leading onto the ferry.
    FerryTrain = 16,
    /// Turn left at the roundabout.
    RoundaboutLeft = 17,
    /// Turn right at the roundabout.
    RoundaboutRight = 18,
}
impl Maneuver {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Maneuver::Unspecified => "MANEUVER_UNSPECIFIED",
            Maneuver::TurnSlightLeft => "TURN_SLIGHT_LEFT",
            Maneuver::TurnSharpLeft => "TURN_SHARP_LEFT",
            Maneuver::UturnLeft => "UTURN_LEFT",
            Maneuver::TurnLeft => "TURN_LEFT",
            Maneuver::TurnSlightRight => "TURN_SLIGHT_RIGHT",
            Maneuver::TurnSharpRight => "TURN_SHARP_RIGHT",
            Maneuver::UturnRight => "UTURN_RIGHT",
            Maneuver::TurnRight => "TURN_RIGHT",
            Maneuver::Straight => "STRAIGHT",
            Maneuver::RampLeft => "RAMP_LEFT",
            Maneuver::RampRight => "RAMP_RIGHT",
            Maneuver::Merge => "MERGE",
            Maneuver::ForkLeft => "FORK_LEFT",
            Maneuver::ForkRight => "FORK_RIGHT",
            Maneuver::Ferry => "FERRY",
            Maneuver::FerryTrain => "FERRY_TRAIN",
            Maneuver::RoundaboutLeft => "ROUNDABOUT_LEFT",
            Maneuver::RoundaboutRight => "ROUNDABOUT_RIGHT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MANEUVER_UNSPECIFIED" => Some(Self::Unspecified),
            "TURN_SLIGHT_LEFT" => Some(Self::TurnSlightLeft),
            "TURN_SHARP_LEFT" => Some(Self::TurnSharpLeft),
            "UTURN_LEFT" => Some(Self::UturnLeft),
            "TURN_LEFT" => Some(Self::TurnLeft),
            "TURN_SLIGHT_RIGHT" => Some(Self::TurnSlightRight),
            "TURN_SHARP_RIGHT" => Some(Self::TurnSharpRight),
            "UTURN_RIGHT" => Some(Self::UturnRight),
            "TURN_RIGHT" => Some(Self::TurnRight),
            "STRAIGHT" => Some(Self::Straight),
            "RAMP_LEFT" => Some(Self::RampLeft),
            "RAMP_RIGHT" => Some(Self::RampRight),
            "MERGE" => Some(Self::Merge),
            "FORK_LEFT" => Some(Self::ForkLeft),
            "FORK_RIGHT" => Some(Self::ForkRight),
            "FERRY" => Some(Self::Ferry),
            "FERRY_TRAIN" => Some(Self::FerryTrain),
            "ROUNDABOUT_LEFT" => Some(Self::RoundaboutLeft),
            "ROUNDABOUT_RIGHT" => Some(Self::RoundaboutRight),
            _ => None,
        }
    }
}
/// ComputeRoutes the response message.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeRoutesResponse {
    /// 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.
    #[prost(message, repeated, tag = "1")]
    pub routes: ::prost::alloc::vec::Vec<Route>,
    /// 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.
    #[prost(message, optional, tag = "2")]
    pub fallback_info: ::core::option::Option<FallbackInfo>,
}
/// List of toll passes around the world that we support.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TollPass {
    /// Not used. If this value is used, then the request fails.
    Unspecified = 0,
    /// One of many Sydney toll pass providers.
    ///   <https://www.myetoll.com.au>
    AuEtollTag = 82,
    /// One of many Sydney toll pass providers.
    ///   <https://www.tollpay.com.au/>
    AuEwayTag = 83,
    /// Australia-wide toll pass.
    /// See additional details at <https://www.linkt.com.au/.>
    AuLinkt = 2,
    /// Argentina toll pass. See additional details at <https://telepase.com.ar>
    ArTelepase = 3,
    /// Brazil toll pass. See additional details at <https://www.autoexpreso.com>
    BrAutoExpreso = 81,
    /// Brazil toll pass. See additional details at <https://conectcar.com.>
    BrConectcar = 7,
    /// Brazil toll pass. See additional details at <https://movemais.com.>
    BrMoveMais = 8,
    /// Brazil toll pass. See additional details at <https://pasorapido.gob.do/>
    BrPassaRapido = 88,
    /// Brazil toll pass. See additional details at <https://www.semparar.com.br.>
    BrSemParar = 9,
    /// Brazil toll pass. See additional details at <https://taggy.com.br.>
    BrTaggy = 10,
    /// Brazil toll pass. See additional details at
    /// <https://veloe.com.br/site/onde-usar.>
    BrVeloe = 11,
    /// Canada to United States border crossing.
    CaUsAkwasasneSeawayCorporateCard = 84,
    /// Canada to United States border crossing.
    CaUsAkwasasneSeawayTransitCard = 85,
    /// Ontario, Canada to Michigan, United States border crossing.
    CaUsBlueWaterEdgePass = 18,
    /// Ontario, Canada to Michigan, United States border crossing.
    CaUsConnexion = 19,
    /// Canada to United States border crossing.
    CaUsNexusCard = 20,
    /// Indonesia.
    /// E-card provided by multiple banks used to pay for tolls. All e-cards
    /// via banks are charged the same so only one enum value is needed. E.g.
    /// Bank Mandiri <https://www.bankmandiri.co.id/e-money>
    /// BCA <https://www.bca.co.id/flazz>
    /// BNI <https://www.bni.co.id/id-id/ebanking/tapcash>
    IdEToll = 16,
    /// India.
    InFastag = 78,
    /// India, HP state plate exemption.
    InLocalHpPlateExempt = 79,
    /// Mexico toll pass.
    MxTagIave = 12,
    /// Mexico toll pass company. One of many operating in Mexico City. See
    /// additional details at <https://www.televia.com.mx.>
    MxTagTelevia = 13,
    /// Mexico toll pass. See additional details at
    /// <https://www.viapass.com.mx/viapass/web_home.aspx.>
    MxViapass = 14,
    /// AL, USA.
    UsAlFreedomPass = 21,
    /// AK, USA.
    UsAkAntonAndersonTunnelBookOf10Tickets = 22,
    /// CA, USA.
    UsCaFastrak = 4,
    /// Indicates driver has any FasTrak pass in addition to the DMV issued Clean
    /// Air Vehicle (CAV) sticker.
    /// <https://www.bayareafastrak.org/en/guide/doINeedFlex.shtml>
    UsCaFastrakCavSticker = 86,
    /// CO, USA.
    UsCoExpresstoll = 23,
    /// CO, USA.
    UsCoGoPass = 24,
    /// DE, USA.
    UsDeEzpassde = 25,
    /// FL, USA.
    UsFlBobSikesTollBridgePass = 65,
    /// FL, USA.
    UsFlDunesCommunityDevelopmentDistrictExpresscard = 66,
    /// FL, USA.
    UsFlEpass = 67,
    /// FL, USA.
    UsFlGibaTollPass = 68,
    /// FL, USA.
    UsFlLeeway = 69,
    /// FL, USA.
    UsFlSunpass = 70,
    /// FL, USA.
    UsFlSunpassPro = 71,
    /// IL, USA.
    UsIlEzpassil = 73,
    /// IL, USA.
    UsIlIpass = 72,
    /// IN, USA.
    UsInEzpassin = 26,
    /// KS, USA.
    UsKsBestpassHorizon = 27,
    /// KS, USA.
    UsKsKtag = 28,
    /// KS, USA.
    UsKsNationalpass = 29,
    /// KS, USA.
    UsKsPrepassElitepass = 30,
    /// KY, USA.
    UsKyRiverlink = 31,
    /// LA, USA.
    UsLaGeauxpass = 32,
    /// LA, USA.
    UsLaTollTag = 33,
    /// MA, USA.
    UsMaEzpassma = 6,
    /// MD, USA.
    UsMdEzpassmd = 34,
    /// ME, USA.
    UsMeEzpassme = 35,
    /// MI, USA.
    UsMiAmbassadorBridgePremierCommuterCard = 36,
    /// MI, USA.
    UsMiGrosseIleTollBridgePassTag = 37,
    /// MI, USA.
    UsMiIqProxCard = 38,
    /// MI, USA.
    UsMiMackinacBridgeMacPass = 39,
    /// MI, USA.
    UsMiNexpressToll = 40,
    /// MN, USA.
    UsMnEzpassmn = 41,
    /// NC, USA.
    UsNcEzpassnc = 42,
    /// NC, USA.
    UsNcPeachPass = 87,
    /// NC, USA.
    UsNcQuickPass = 43,
    /// NH, USA.
    UsNhEzpassnh = 80,
    /// NJ, USA.
    UsNjDownbeachExpressPass = 75,
    /// NJ, USA.
    UsNjEzpassnj = 74,
    /// NY, USA.
    UsNyExpresspass = 76,
    /// NY, USA.
    UsNyEzpassny = 77,
    /// OH, USA.
    UsOhEzpassoh = 44,
    /// PA, USA.
    UsPaEzpasspa = 45,
    /// RI, USA.
    UsRiEzpassri = 46,
    /// SC, USA.
    UsScPalpass = 47,
    /// TX, USA.
    UsTxBancpass = 48,
    /// TX, USA.
    UsTxDelRioPass = 49,
    /// TX, USA.
    UsTxEfastPass = 50,
    /// TX, USA.
    UsTxEaglePassExpressCard = 51,
    /// TX, USA.
    UsTxEptoll = 52,
    /// TX, USA.
    UsTxEzCross = 53,
    /// TX, USA.
    UsTxEztag = 54,
    /// TX, USA.
    UsTxLaredoTradeTag = 55,
    /// TX, USA.
    UsTxPluspass = 56,
    /// TX, USA.
    UsTxTolltag = 57,
    /// TX, USA.
    UsTxTxtag = 58,
    /// TX, USA.
    UsTxXpressCard = 59,
    /// UT, USA.
    UsUtAdamsAveParkwayExpresscard = 60,
    /// VA, USA.
    UsVaEzpassva = 61,
    /// WA, USA.
    UsWaBreezeby = 17,
    /// WA, USA.
    UsWaGoodToGo = 1,
    /// WV, USA.
    UsWvEzpasswv = 62,
    /// WV, USA.
    UsWvMemorialBridgeTickets = 63,
    /// WV, USA.
    UsWvNewellTollBridgeTicket = 64,
}
impl TollPass {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TollPass::Unspecified => "TOLL_PASS_UNSPECIFIED",
            TollPass::AuEtollTag => "AU_ETOLL_TAG",
            TollPass::AuEwayTag => "AU_EWAY_TAG",
            TollPass::AuLinkt => "AU_LINKT",
            TollPass::ArTelepase => "AR_TELEPASE",
            TollPass::BrAutoExpreso => "BR_AUTO_EXPRESO",
            TollPass::BrConectcar => "BR_CONECTCAR",
            TollPass::BrMoveMais => "BR_MOVE_MAIS",
            TollPass::BrPassaRapido => "BR_PASSA_RAPIDO",
            TollPass::BrSemParar => "BR_SEM_PARAR",
            TollPass::BrTaggy => "BR_TAGGY",
            TollPass::BrVeloe => "BR_VELOE",
            TollPass::CaUsAkwasasneSeawayCorporateCard => {
                "CA_US_AKWASASNE_SEAWAY_CORPORATE_CARD"
            }
            TollPass::CaUsAkwasasneSeawayTransitCard => {
                "CA_US_AKWASASNE_SEAWAY_TRANSIT_CARD"
            }
            TollPass::CaUsBlueWaterEdgePass => "CA_US_BLUE_WATER_EDGE_PASS",
            TollPass::CaUsConnexion => "CA_US_CONNEXION",
            TollPass::CaUsNexusCard => "CA_US_NEXUS_CARD",
            TollPass::IdEToll => "ID_E_TOLL",
            TollPass::InFastag => "IN_FASTAG",
            TollPass::InLocalHpPlateExempt => "IN_LOCAL_HP_PLATE_EXEMPT",
            TollPass::MxTagIave => "MX_TAG_IAVE",
            TollPass::MxTagTelevia => "MX_TAG_TELEVIA",
            TollPass::MxViapass => "MX_VIAPASS",
            TollPass::UsAlFreedomPass => "US_AL_FREEDOM_PASS",
            TollPass::UsAkAntonAndersonTunnelBookOf10Tickets => {
                "US_AK_ANTON_ANDERSON_TUNNEL_BOOK_OF_10_TICKETS"
            }
            TollPass::UsCaFastrak => "US_CA_FASTRAK",
            TollPass::UsCaFastrakCavSticker => "US_CA_FASTRAK_CAV_STICKER",
            TollPass::UsCoExpresstoll => "US_CO_EXPRESSTOLL",
            TollPass::UsCoGoPass => "US_CO_GO_PASS",
            TollPass::UsDeEzpassde => "US_DE_EZPASSDE",
            TollPass::UsFlBobSikesTollBridgePass => "US_FL_BOB_SIKES_TOLL_BRIDGE_PASS",
            TollPass::UsFlDunesCommunityDevelopmentDistrictExpresscard => {
                "US_FL_DUNES_COMMUNITY_DEVELOPMENT_DISTRICT_EXPRESSCARD"
            }
            TollPass::UsFlEpass => "US_FL_EPASS",
            TollPass::UsFlGibaTollPass => "US_FL_GIBA_TOLL_PASS",
            TollPass::UsFlLeeway => "US_FL_LEEWAY",
            TollPass::UsFlSunpass => "US_FL_SUNPASS",
            TollPass::UsFlSunpassPro => "US_FL_SUNPASS_PRO",
            TollPass::UsIlEzpassil => "US_IL_EZPASSIL",
            TollPass::UsIlIpass => "US_IL_IPASS",
            TollPass::UsInEzpassin => "US_IN_EZPASSIN",
            TollPass::UsKsBestpassHorizon => "US_KS_BESTPASS_HORIZON",
            TollPass::UsKsKtag => "US_KS_KTAG",
            TollPass::UsKsNationalpass => "US_KS_NATIONALPASS",
            TollPass::UsKsPrepassElitepass => "US_KS_PREPASS_ELITEPASS",
            TollPass::UsKyRiverlink => "US_KY_RIVERLINK",
            TollPass::UsLaGeauxpass => "US_LA_GEAUXPASS",
            TollPass::UsLaTollTag => "US_LA_TOLL_TAG",
            TollPass::UsMaEzpassma => "US_MA_EZPASSMA",
            TollPass::UsMdEzpassmd => "US_MD_EZPASSMD",
            TollPass::UsMeEzpassme => "US_ME_EZPASSME",
            TollPass::UsMiAmbassadorBridgePremierCommuterCard => {
                "US_MI_AMBASSADOR_BRIDGE_PREMIER_COMMUTER_CARD"
            }
            TollPass::UsMiGrosseIleTollBridgePassTag => {
                "US_MI_GROSSE_ILE_TOLL_BRIDGE_PASS_TAG"
            }
            TollPass::UsMiIqProxCard => "US_MI_IQ_PROX_CARD",
            TollPass::UsMiMackinacBridgeMacPass => "US_MI_MACKINAC_BRIDGE_MAC_PASS",
            TollPass::UsMiNexpressToll => "US_MI_NEXPRESS_TOLL",
            TollPass::UsMnEzpassmn => "US_MN_EZPASSMN",
            TollPass::UsNcEzpassnc => "US_NC_EZPASSNC",
            TollPass::UsNcPeachPass => "US_NC_PEACH_PASS",
            TollPass::UsNcQuickPass => "US_NC_QUICK_PASS",
            TollPass::UsNhEzpassnh => "US_NH_EZPASSNH",
            TollPass::UsNjDownbeachExpressPass => "US_NJ_DOWNBEACH_EXPRESS_PASS",
            TollPass::UsNjEzpassnj => "US_NJ_EZPASSNJ",
            TollPass::UsNyExpresspass => "US_NY_EXPRESSPASS",
            TollPass::UsNyEzpassny => "US_NY_EZPASSNY",
            TollPass::UsOhEzpassoh => "US_OH_EZPASSOH",
            TollPass::UsPaEzpasspa => "US_PA_EZPASSPA",
            TollPass::UsRiEzpassri => "US_RI_EZPASSRI",
            TollPass::UsScPalpass => "US_SC_PALPASS",
            TollPass::UsTxBancpass => "US_TX_BANCPASS",
            TollPass::UsTxDelRioPass => "US_TX_DEL_RIO_PASS",
            TollPass::UsTxEfastPass => "US_TX_EFAST_PASS",
            TollPass::UsTxEaglePassExpressCard => "US_TX_EAGLE_PASS_EXPRESS_CARD",
            TollPass::UsTxEptoll => "US_TX_EPTOLL",
            TollPass::UsTxEzCross => "US_TX_EZ_CROSS",
            TollPass::UsTxEztag => "US_TX_EZTAG",
            TollPass::UsTxLaredoTradeTag => "US_TX_LAREDO_TRADE_TAG",
            TollPass::UsTxPluspass => "US_TX_PLUSPASS",
            TollPass::UsTxTolltag => "US_TX_TOLLTAG",
            TollPass::UsTxTxtag => "US_TX_TXTAG",
            TollPass::UsTxXpressCard => "US_TX_XPRESS_CARD",
            TollPass::UsUtAdamsAveParkwayExpresscard => {
                "US_UT_ADAMS_AVE_PARKWAY_EXPRESSCARD"
            }
            TollPass::UsVaEzpassva => "US_VA_EZPASSVA",
            TollPass::UsWaBreezeby => "US_WA_BREEZEBY",
            TollPass::UsWaGoodToGo => "US_WA_GOOD_TO_GO",
            TollPass::UsWvEzpasswv => "US_WV_EZPASSWV",
            TollPass::UsWvMemorialBridgeTickets => "US_WV_MEMORIAL_BRIDGE_TICKETS",
            TollPass::UsWvNewellTollBridgeTicket => "US_WV_NEWELL_TOLL_BRIDGE_TICKET",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TOLL_PASS_UNSPECIFIED" => Some(Self::Unspecified),
            "AU_ETOLL_TAG" => Some(Self::AuEtollTag),
            "AU_EWAY_TAG" => Some(Self::AuEwayTag),
            "AU_LINKT" => Some(Self::AuLinkt),
            "AR_TELEPASE" => Some(Self::ArTelepase),
            "BR_AUTO_EXPRESO" => Some(Self::BrAutoExpreso),
            "BR_CONECTCAR" => Some(Self::BrConectcar),
            "BR_MOVE_MAIS" => Some(Self::BrMoveMais),
            "BR_PASSA_RAPIDO" => Some(Self::BrPassaRapido),
            "BR_SEM_PARAR" => Some(Self::BrSemParar),
            "BR_TAGGY" => Some(Self::BrTaggy),
            "BR_VELOE" => Some(Self::BrVeloe),
            "CA_US_AKWASASNE_SEAWAY_CORPORATE_CARD" => {
                Some(Self::CaUsAkwasasneSeawayCorporateCard)
            }
            "CA_US_AKWASASNE_SEAWAY_TRANSIT_CARD" => {
                Some(Self::CaUsAkwasasneSeawayTransitCard)
            }
            "CA_US_BLUE_WATER_EDGE_PASS" => Some(Self::CaUsBlueWaterEdgePass),
            "CA_US_CONNEXION" => Some(Self::CaUsConnexion),
            "CA_US_NEXUS_CARD" => Some(Self::CaUsNexusCard),
            "ID_E_TOLL" => Some(Self::IdEToll),
            "IN_FASTAG" => Some(Self::InFastag),
            "IN_LOCAL_HP_PLATE_EXEMPT" => Some(Self::InLocalHpPlateExempt),
            "MX_TAG_IAVE" => Some(Self::MxTagIave),
            "MX_TAG_TELEVIA" => Some(Self::MxTagTelevia),
            "MX_VIAPASS" => Some(Self::MxViapass),
            "US_AL_FREEDOM_PASS" => Some(Self::UsAlFreedomPass),
            "US_AK_ANTON_ANDERSON_TUNNEL_BOOK_OF_10_TICKETS" => {
                Some(Self::UsAkAntonAndersonTunnelBookOf10Tickets)
            }
            "US_CA_FASTRAK" => Some(Self::UsCaFastrak),
            "US_CA_FASTRAK_CAV_STICKER" => Some(Self::UsCaFastrakCavSticker),
            "US_CO_EXPRESSTOLL" => Some(Self::UsCoExpresstoll),
            "US_CO_GO_PASS" => Some(Self::UsCoGoPass),
            "US_DE_EZPASSDE" => Some(Self::UsDeEzpassde),
            "US_FL_BOB_SIKES_TOLL_BRIDGE_PASS" => Some(Self::UsFlBobSikesTollBridgePass),
            "US_FL_DUNES_COMMUNITY_DEVELOPMENT_DISTRICT_EXPRESSCARD" => {
                Some(Self::UsFlDunesCommunityDevelopmentDistrictExpresscard)
            }
            "US_FL_EPASS" => Some(Self::UsFlEpass),
            "US_FL_GIBA_TOLL_PASS" => Some(Self::UsFlGibaTollPass),
            "US_FL_LEEWAY" => Some(Self::UsFlLeeway),
            "US_FL_SUNPASS" => Some(Self::UsFlSunpass),
            "US_FL_SUNPASS_PRO" => Some(Self::UsFlSunpassPro),
            "US_IL_EZPASSIL" => Some(Self::UsIlEzpassil),
            "US_IL_IPASS" => Some(Self::UsIlIpass),
            "US_IN_EZPASSIN" => Some(Self::UsInEzpassin),
            "US_KS_BESTPASS_HORIZON" => Some(Self::UsKsBestpassHorizon),
            "US_KS_KTAG" => Some(Self::UsKsKtag),
            "US_KS_NATIONALPASS" => Some(Self::UsKsNationalpass),
            "US_KS_PREPASS_ELITEPASS" => Some(Self::UsKsPrepassElitepass),
            "US_KY_RIVERLINK" => Some(Self::UsKyRiverlink),
            "US_LA_GEAUXPASS" => Some(Self::UsLaGeauxpass),
            "US_LA_TOLL_TAG" => Some(Self::UsLaTollTag),
            "US_MA_EZPASSMA" => Some(Self::UsMaEzpassma),
            "US_MD_EZPASSMD" => Some(Self::UsMdEzpassmd),
            "US_ME_EZPASSME" => Some(Self::UsMeEzpassme),
            "US_MI_AMBASSADOR_BRIDGE_PREMIER_COMMUTER_CARD" => {
                Some(Self::UsMiAmbassadorBridgePremierCommuterCard)
            }
            "US_MI_GROSSE_ILE_TOLL_BRIDGE_PASS_TAG" => {
                Some(Self::UsMiGrosseIleTollBridgePassTag)
            }
            "US_MI_IQ_PROX_CARD" => Some(Self::UsMiIqProxCard),
            "US_MI_MACKINAC_BRIDGE_MAC_PASS" => Some(Self::UsMiMackinacBridgeMacPass),
            "US_MI_NEXPRESS_TOLL" => Some(Self::UsMiNexpressToll),
            "US_MN_EZPASSMN" => Some(Self::UsMnEzpassmn),
            "US_NC_EZPASSNC" => Some(Self::UsNcEzpassnc),
            "US_NC_PEACH_PASS" => Some(Self::UsNcPeachPass),
            "US_NC_QUICK_PASS" => Some(Self::UsNcQuickPass),
            "US_NH_EZPASSNH" => Some(Self::UsNhEzpassnh),
            "US_NJ_DOWNBEACH_EXPRESS_PASS" => Some(Self::UsNjDownbeachExpressPass),
            "US_NJ_EZPASSNJ" => Some(Self::UsNjEzpassnj),
            "US_NY_EXPRESSPASS" => Some(Self::UsNyExpresspass),
            "US_NY_EZPASSNY" => Some(Self::UsNyEzpassny),
            "US_OH_EZPASSOH" => Some(Self::UsOhEzpassoh),
            "US_PA_EZPASSPA" => Some(Self::UsPaEzpasspa),
            "US_RI_EZPASSRI" => Some(Self::UsRiEzpassri),
            "US_SC_PALPASS" => Some(Self::UsScPalpass),
            "US_TX_BANCPASS" => Some(Self::UsTxBancpass),
            "US_TX_DEL_RIO_PASS" => Some(Self::UsTxDelRioPass),
            "US_TX_EFAST_PASS" => Some(Self::UsTxEfastPass),
            "US_TX_EAGLE_PASS_EXPRESS_CARD" => Some(Self::UsTxEaglePassExpressCard),
            "US_TX_EPTOLL" => Some(Self::UsTxEptoll),
            "US_TX_EZ_CROSS" => Some(Self::UsTxEzCross),
            "US_TX_EZTAG" => Some(Self::UsTxEztag),
            "US_TX_LAREDO_TRADE_TAG" => Some(Self::UsTxLaredoTradeTag),
            "US_TX_PLUSPASS" => Some(Self::UsTxPluspass),
            "US_TX_TOLLTAG" => Some(Self::UsTxTolltag),
            "US_TX_TXTAG" => Some(Self::UsTxTxtag),
            "US_TX_XPRESS_CARD" => Some(Self::UsTxXpressCard),
            "US_UT_ADAMS_AVE_PARKWAY_EXPRESSCARD" => {
                Some(Self::UsUtAdamsAveParkwayExpresscard)
            }
            "US_VA_EZPASSVA" => Some(Self::UsVaEzpassva),
            "US_WA_BREEZEBY" => Some(Self::UsWaBreezeby),
            "US_WA_GOOD_TO_GO" => Some(Self::UsWaGoodToGo),
            "US_WV_EZPASSWV" => Some(Self::UsWvEzpasswv),
            "US_WV_MEMORIAL_BRIDGE_TICKETS" => Some(Self::UsWvMemorialBridgeTickets),
            "US_WV_NEWELL_TOLL_BRIDGE_TICKET" => Some(Self::UsWvNewellTollBridgeTicket),
            _ => None,
        }
    }
}
/// A set of values describing the vehicle's emission type.
/// Applies only to the DRIVE travel mode.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VehicleEmissionType {
    /// No emission type specified. Default to GASOLINE.
    Unspecified = 0,
    /// Gasoline/petrol fueled vehicle.
    Gasoline = 1,
    /// Electricity powered vehicle.
    Electric = 2,
    /// Hybrid fuel (such as gasoline + electric) vehicle.
    Hybrid = 3,
}
impl VehicleEmissionType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            VehicleEmissionType::Unspecified => "VEHICLE_EMISSION_TYPE_UNSPECIFIED",
            VehicleEmissionType::Gasoline => "GASOLINE",
            VehicleEmissionType::Electric => "ELECTRIC",
            VehicleEmissionType::Hybrid => "HYBRID",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "VEHICLE_EMISSION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "GASOLINE" => Some(Self::Gasoline),
            "ELECTRIC" => Some(Self::Electric),
            "HYBRID" => Some(Self::Hybrid),
            _ => None,
        }
    }
}
/// ComputeRoutes request message.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeRoutesRequest {
    /// Required. Origin waypoint.
    #[prost(message, optional, tag = "1")]
    pub origin: ::core::option::Option<Waypoint>,
    /// Required. Destination waypoint.
    #[prost(message, optional, tag = "2")]
    pub destination: ::core::option::Option<Waypoint>,
    /// 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.
    #[prost(message, repeated, tag = "3")]
    pub intermediates: ::prost::alloc::vec::Vec<Waypoint>,
    /// Optional. Specifies the mode of transportation.
    #[prost(enumeration = "RouteTravelMode", tag = "4")]
    pub travel_mode: i32,
    /// 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. In the future, we might implement a fallback
    /// mechanism to use a different option when the preferred option does not give
    /// a valid result. You can specify this option only when the `travel_mode` is
    /// `DRIVE` or `TWO_WHEELER`, otherwise the request fails.
    #[prost(enumeration = "RoutingPreference", tag = "5")]
    pub routing_preference: i32,
    /// Optional. Specifies your preference for the quality of the polyline.
    #[prost(enumeration = "PolylineQuality", tag = "6")]
    pub polyline_quality: i32,
    /// Optional. Specifies the preferred encoding for the polyline.
    #[prost(enumeration = "PolylineEncoding", tag = "12")]
    pub polyline_encoding: i32,
    /// Optional. The departure time. If you don't set this value, then this value
    /// defaults to the time that you made the request. If you set this value to a
    /// time that has already occurred, then the request fails.
    #[prost(message, optional, tag = "7")]
    pub departure_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Specifies whether to calculate alternate routes in addition to the route.
    #[prost(bool, tag = "8")]
    pub compute_alternative_routes: bool,
    /// Optional. A set of conditions to satisfy that affect the way routes are
    /// calculated.
    #[prost(message, optional, tag = "9")]
    pub route_modifiers: ::core::option::Option<RouteModifiers>,
    /// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
    /// information, see
    /// <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.
    #[prost(string, tag = "10")]
    pub language_code: ::prost::alloc::string::String,
    /// Optional. Specifies the units of measure for the display fields. This
    /// includes the `instruction` field in `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 request.
    #[prost(enumeration = "Units", tag = "11")]
    pub units: i32,
    /// If optimizeWaypointOrder is set to true, an attempt is made to re-order the
    /// specified intermediate waypoints to minimize the overall cost of the route.
    /// If any of the intermediate waypoints is via waypoint the request fails. Use
    /// ComputeRoutesResponse.Routes.optimized_intermediate_waypoint_index to find
    /// the new ordering. If routes.optimized_intermediate_waypoint_index is not
    /// requested in the `X-Goog-FieldMask` header, the request fails. If
    /// optimizeWaypointOrder is set to false,
    /// ComputeRoutesResponse.optimized_intermediate_waypoint_index is empty.
    #[prost(bool, tag = "13")]
    pub optimize_waypoint_order: bool,
}
/// Encapsulates a set of optional conditions to satisfy when calculating the
/// routes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteModifiers {
    /// Specifies whether to avoid toll roads where reasonable. Preference will be
    /// given to routes not containing toll roads. Applies only to the `DRIVE` and
    /// `TWO_WHEELER` travel modes.
    #[prost(bool, tag = "1")]
    pub avoid_tolls: bool,
    /// Specifies whether to avoid highways where reasonable. Preference will be
    /// given to routes not containing highways. Applies only to the `DRIVE` and
    /// `TWO_WHEELER` travel modes.
    #[prost(bool, tag = "2")]
    pub avoid_highways: bool,
    /// Specifies whether to avoid ferries where reasonable. Preference will be
    /// given to routes not containing travel by ferries.
    /// Applies only to the `DRIVE` and`TWO_WHEELER` travel modes.
    #[prost(bool, tag = "3")]
    pub avoid_ferries: bool,
    /// Specifies whether to avoid navigating indoors where reasonable. Preference
    /// will be given to routes not containing indoor navigation.
    /// Applies only to the `WALK` travel mode.
    #[prost(bool, tag = "4")]
    pub avoid_indoor: bool,
    /// Specifies the vehicle information.
    #[prost(message, optional, tag = "5")]
    pub vehicle_info: ::core::option::Option<VehicleInfo>,
    /// Encapsulates information about toll passes.
    /// If toll passes are provided, the API tries to return the pass price. If
    /// toll passes are not provided, the API treats the toll pass as unknown and
    /// tries to return the cash price.
    /// Applies only to the DRIVE and TWO_WHEELER travel modes.
    #[prost(enumeration = "TollPass", repeated, tag = "6")]
    pub toll_passes: ::prost::alloc::vec::Vec<i32>,
}
/// Encapsulates the vehicle information, such as the license plate last
/// character.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VehicleInfo {
    /// Specifies the license plate last character. Could be a digit or a letter.
    #[prost(string, tag = "1")]
    pub license_plate_last_character: ::prost::alloc::string::String,
    /// Describes the vehicle's emission type.
    /// Applies only to the DRIVE travel mode.
    #[prost(enumeration = "VehicleEmissionType", tag = "2")]
    pub emission_type: i32,
}
/// A set of values used to specify the mode of travel.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RouteTravelMode {
    /// No travel mode specified. Defaults to `DRIVE`.
    TravelModeUnspecified = 0,
    /// Travel by passenger car.
    Drive = 1,
    /// Travel by bicycle.
    Bicycle = 2,
    /// Travel by walking.
    Walk = 3,
    /// Two-wheeled, motorized vehicle. For example, motorcycle. Note that this
    /// differs from the `BICYCLE` travel mode which covers human-powered mode.
    TwoWheeler = 4,
    /// Travel by licensed taxi, which may allow the vehicle to travel on
    /// designated taxi lanes in some areas.
    Taxi = 5,
}
impl RouteTravelMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            RouteTravelMode::TravelModeUnspecified => "TRAVEL_MODE_UNSPECIFIED",
            RouteTravelMode::Drive => "DRIVE",
            RouteTravelMode::Bicycle => "BICYCLE",
            RouteTravelMode::Walk => "WALK",
            RouteTravelMode::TwoWheeler => "TWO_WHEELER",
            RouteTravelMode::Taxi => "TAXI",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRAVEL_MODE_UNSPECIFIED" => Some(Self::TravelModeUnspecified),
            "DRIVE" => Some(Self::Drive),
            "BICYCLE" => Some(Self::Bicycle),
            "WALK" => Some(Self::Walk),
            "TWO_WHEELER" => Some(Self::TwoWheeler),
            "TAXI" => Some(Self::Taxi),
            _ => None,
        }
    }
}
/// A set of values that specify factors to take into consideration when
/// calculating the route.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RoutingPreference {
    /// No routing preference specified. Default to `TRAFFIC_AWARE`.
    Unspecified = 0,
    /// Computes routes without taking traffic conditions into consideration.
    /// Suitable when traffic conditions don't matter. Using this value produces
    /// the lowest latency.
    TrafficUnaware = 1,
    /// Calculates routes taking traffic conditions into consideration. In contrast
    /// to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly
    /// reduce latency.
    TrafficAware = 2,
    /// Calculates the routes taking traffic conditions into consideration,
    /// without applying most performance optimizations. Using this value produces
    /// the highest latency.
    TrafficAwareOptimal = 3,
}
impl RoutingPreference {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            RoutingPreference::Unspecified => "ROUTING_PREFERENCE_UNSPECIFIED",
            RoutingPreference::TrafficUnaware => "TRAFFIC_UNAWARE",
            RoutingPreference::TrafficAware => "TRAFFIC_AWARE",
            RoutingPreference::TrafficAwareOptimal => "TRAFFIC_AWARE_OPTIMAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ROUTING_PREFERENCE_UNSPECIFIED" => Some(Self::Unspecified),
            "TRAFFIC_UNAWARE" => Some(Self::TrafficUnaware),
            "TRAFFIC_AWARE" => Some(Self::TrafficAware),
            "TRAFFIC_AWARE_OPTIMAL" => Some(Self::TrafficAwareOptimal),
            _ => None,
        }
    }
}
/// A set of values that specify the unit of measure used in the display.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Units {
    /// Units of measure not specified. Defaults to the unit of measure inferred
    /// from the request.
    Unspecified = 0,
    /// Metric units of measure.
    Metric = 1,
    /// Imperial (English) units of measure.
    Imperial = 2,
}
impl Units {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Units::Unspecified => "UNITS_UNSPECIFIED",
            Units::Metric => "METRIC",
            Units::Imperial => "IMPERIAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNITS_UNSPECIFIED" => Some(Self::Unspecified),
            "METRIC" => Some(Self::Metric),
            "IMPERIAL" => Some(Self::Imperial),
            _ => None,
        }
    }
}
/// ComputeRouteMatrix request message
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeRouteMatrixRequest {
    /// Required. Array of origins, which determines the rows of the response matrix.
    /// Several size restrictions apply to the cardinality of origins and
    /// destinations:
    ///
    /// * The number of elements (origins × destinations) must be no greater than
    /// 625 in any case.
    /// * The number of elements (origins × destinations) must be no greater than
    /// 100 if routing_preference is set to `TRAFFIC_AWARE_OPTIMAL`.
    /// * The number of waypoints (origins + destinations) specified as `place_id`
    /// must be no greater than 50.
    #[prost(message, repeated, tag = "1")]
    pub origins: ::prost::alloc::vec::Vec<RouteMatrixOrigin>,
    /// Required. Array of destinations, which determines the columns of the response matrix.
    #[prost(message, repeated, tag = "2")]
    pub destinations: ::prost::alloc::vec::Vec<RouteMatrixDestination>,
    /// Optional. Specifies the mode of transportation.
    #[prost(enumeration = "RouteTravelMode", tag = "3")]
    pub travel_mode: i32,
    /// 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. In the future,
    /// we might implement a fallback mechanism to use a different option when the
    /// preferred option does not give a valid result. You can specify this option
    /// only when the `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the
    /// request fails.
    #[prost(enumeration = "RoutingPreference", tag = "4")]
    pub routing_preference: i32,
    /// Optional. The departure time. If you don't set this value, this defaults to the time
    /// that you made the request. If you set this value to a time that has already
    /// occurred, the request fails.
    #[prost(message, optional, tag = "5")]
    pub departure_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// A single origin for ComputeRouteMatrixRequest
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteMatrixOrigin {
    /// Required. Origin waypoint
    #[prost(message, optional, tag = "1")]
    pub waypoint: ::core::option::Option<Waypoint>,
    /// Optional. Modifiers for every route that takes this as the origin
    #[prost(message, optional, tag = "2")]
    pub route_modifiers: ::core::option::Option<RouteModifiers>,
}
/// A single destination for ComputeRouteMatrixRequest
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteMatrixDestination {
    /// Required. Destination waypoint
    #[prost(message, optional, tag = "1")]
    pub waypoint: ::core::option::Option<Waypoint>,
}
/// ComputeCustomRoutes request message.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeCustomRoutesRequest {
    /// Required. Origin waypoint.
    #[prost(message, optional, tag = "1")]
    pub origin: ::core::option::Option<Waypoint>,
    /// Required. Destination waypoint.
    #[prost(message, optional, tag = "2")]
    pub destination: ::core::option::Option<Waypoint>,
    /// 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.
    #[prost(message, repeated, tag = "3")]
    pub intermediates: ::prost::alloc::vec::Vec<Waypoint>,
    /// Optional. Specifies the mode of transportation. Only DRIVE is supported now.
    #[prost(enumeration = "RouteTravelMode", tag = "4")]
    pub travel_mode: i32,
    /// 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. In the
    /// future, we might implement a fallback mechanism to use a different option
    /// when the preferred option does not give a valid result. You can specify
    /// this option only when the `travel_mode` is `DRIVE` or `TWO_WHEELER`,
    /// otherwise the request fails.
    #[prost(enumeration = "RoutingPreference", tag = "5")]
    pub routing_preference: i32,
    /// Optional. Specifies your preference for the quality of the polyline.
    #[prost(enumeration = "PolylineQuality", tag = "6")]
    pub polyline_quality: i32,
    /// Optional. Specifies the preferred encoding for the polyline.
    #[prost(enumeration = "PolylineEncoding", tag = "13")]
    pub polyline_encoding: i32,
    /// Optional. The departure time. If you don't set this value, then this value
    /// defaults to the time that you made the request. If you set this value to a
    /// time that has already occurred, then the request fails.
    #[prost(message, optional, tag = "7")]
    pub departure_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A set of conditions to satisfy that affect the way routes are calculated.
    #[prost(message, optional, tag = "11")]
    pub route_modifiers: ::core::option::Option<RouteModifiers>,
    /// Required. A route objective to optimize for.
    #[prost(message, optional, tag = "12")]
    pub route_objective: ::core::option::Option<RouteObjective>,
    /// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
    /// information, see
    /// <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.
    #[prost(string, tag = "9")]
    pub language_code: ::prost::alloc::string::String,
    /// Optional. Specifies the units of measure for the display fields. This includes the
    /// `instruction` field in `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 request.
    #[prost(enumeration = "Units", tag = "10")]
    pub units: i32,
}
/// Encapsulates an objective to optimize for by ComputeCustomRoutes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteObjective {
    /// Optional. Specifies the custom data layer being used to affect generated routes.
    /// Customers can turn off the custom layer by not setting this field. Once a
    /// custom layer is being set, the custom layer will be used to generate route
    /// annotations (CustomLayerInfo) in the returned routes, the annotations can
    /// be turned off using `X-Goog-FieldMask` header (see
    /// <https://cloud.google.com/apis/docs/system-parameters>).
    #[prost(message, optional, tag = "2")]
    pub custom_layer: ::core::option::Option<route_objective::CustomLayer>,
    /// The route objective.
    #[prost(oneof = "route_objective::Objective", tags = "1")]
    pub objective: ::core::option::Option<route_objective::Objective>,
}
/// Nested message and enum types in `RouteObjective`.
pub mod route_objective {
    /// Encapsulates a RateCard route objective.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RateCard {
        /// Optional. Cost per minute.
        #[prost(message, optional, tag = "2")]
        pub cost_per_minute: ::core::option::Option<rate_card::MonetaryCost>,
        /// Optional. Cost per kilometer.
        #[prost(message, optional, tag = "3")]
        pub cost_per_km: ::core::option::Option<rate_card::MonetaryCost>,
        /// Optional. Whether to include toll cost in the overall cost.
        #[prost(bool, tag = "4")]
        pub include_tolls: bool,
    }
    /// Nested message and enum types in `RateCard`.
    pub mod rate_card {
        /// Encapsulates the cost used in the rate card.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct MonetaryCost {
            /// Required. The cost value in local currency inferred from the request.
            #[prost(double, tag = "1")]
            pub value: f64,
        }
    }
    /// Customized data layer that customers use to generated route annotations or
    /// influence the generated route.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CustomLayer {
        /// Required. A dataset that the customer uploaded in advance.
        #[prost(message, optional, tag = "1")]
        pub dataset_info: ::core::option::Option<custom_layer::DatasetInfo>,
    }
    /// Nested message and enum types in `CustomLayer`.
    pub mod custom_layer {
        /// Information about a dataset that customers uploaded in advance. The
        /// dataset information will be used for generating route annotations or to
        /// influence routing.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct DatasetInfo {
            /// Required. ID of a customer uploaded dataset for which will be used to annotate or
            /// influence the route. If the dataset does not exist or is not yet ready,
            /// the request will fail.
            #[prost(string, tag = "1")]
            pub dataset_id: ::prost::alloc::string::String,
        }
    }
    /// The route objective.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Objective {
        /// The RateCard objective.
        #[prost(message, tag = "1")]
        RateCard(RateCard),
    }
}
/// Encapsulates a custom route computed based on the route objective specified
/// by the customer. CustomRoute contains a route and a route token, which can be
/// passed to NavSDK to reconstruct the custom route for turn by turn navigation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomRoute {
    /// The route considered 'best' for the input route objective.
    #[prost(message, optional, tag = "11")]
    pub route: ::core::option::Option<Route>,
    /// Web-safe base64 encoded route token that can be passed to NavSDK, which
    /// allows NavSDK to reconstruct the route during navigation, and in the event
    /// of rerouting honor the original intention when RoutesPreferred
    /// ComputeCustomRoutes is called. Customers should treat this token as an
    /// opaque blob.
    #[prost(string, tag = "12")]
    pub token: ::prost::alloc::string::String,
}
/// Encapsulates route information computed for an origin/destination pair in the
/// ComputeRouteMatrix API. This proto can be streamed to the client.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteMatrixElement {
    /// Zero-based index of the origin in the request.
    #[prost(int32, tag = "1")]
    pub origin_index: i32,
    /// Zero-based index of the destination in the request.
    #[prost(int32, tag = "2")]
    pub destination_index: i32,
    /// Error status code for this element.
    #[prost(message, optional, tag = "3")]
    pub status: ::core::option::Option<super::super::super::rpc::Status>,
    /// Indicates whether the route was found or not. Independent of status.
    #[prost(enumeration = "RouteMatrixElementCondition", tag = "9")]
    pub condition: i32,
    /// The travel distance of the route, in meters.
    #[prost(int32, tag = "4")]
    pub distance_meters: i32,
    /// The length of time needed to navigate the route. If you set the
    /// `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.
    #[prost(message, optional, tag = "5")]
    pub duration: ::core::option::Option<::prost_types::Duration>,
    /// The duration of traveling through the route without taking traffic
    /// conditions into consideration.
    #[prost(message, optional, tag = "6")]
    pub static_duration: ::core::option::Option<::prost_types::Duration>,
    /// Additional information about the route. For example: restriction
    /// information and toll information
    #[prost(message, optional, tag = "7")]
    pub travel_advisory: ::core::option::Option<RouteTravelAdvisory>,
    /// 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.
    #[prost(message, optional, tag = "8")]
    pub fallback_info: ::core::option::Option<FallbackInfo>,
}
/// The condition of the route being returned.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RouteMatrixElementCondition {
    /// Only used when the `status` of the element is not OK.
    Unspecified = 0,
    /// A route was found, and the corresponding information was filled out for the
    /// element.
    RouteExists = 1,
    /// No route could be found. Fields containing route information, such as
    /// `distance_meters` or `duration`, will not be filled out in the element.
    RouteNotFound = 2,
}
impl RouteMatrixElementCondition {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            RouteMatrixElementCondition::Unspecified => {
                "ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED"
            }
            RouteMatrixElementCondition::RouteExists => "ROUTE_EXISTS",
            RouteMatrixElementCondition::RouteNotFound => "ROUTE_NOT_FOUND",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED" => Some(Self::Unspecified),
            "ROUTE_EXISTS" => Some(Self::RouteExists),
            "ROUTE_NOT_FOUND" => Some(Self::RouteNotFound),
            _ => None,
        }
    }
}
/// ComputeCustomRoutes response message.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeCustomRoutesResponse {
    /// The ‘best’ routes for the input route objective.
    #[prost(message, repeated, tag = "7")]
    pub routes: ::prost::alloc::vec::Vec<CustomRoute>,
    /// The fastest reference route.
    #[prost(message, optional, tag = "5")]
    pub fastest_route: ::core::option::Option<CustomRoute>,
    /// The shortest reference route.
    #[prost(message, optional, tag = "6")]
    pub shortest_route: ::core::option::Option<CustomRoute>,
    /// Fallback info for custom routes.
    #[prost(message, optional, tag = "8")]
    pub fallback_info: ::core::option::Option<
        compute_custom_routes_response::FallbackInfo,
    >,
}
/// Nested message and enum types in `ComputeCustomRoutesResponse`.
pub mod compute_custom_routes_response {
    /// Encapsulates fallback info for ComputeCustomRoutes. ComputeCustomRoutes
    /// performs two types of fallbacks:
    ///
    /// 1. If it cannot compute the route using the routing_preference requested by
    /// the customer, it will fallback to another routing mode. In this case
    /// fallback_routing_mode and routing_mode_fallback_reason are used to
    /// communicate the fallback routing mode used, as well as the reason for
    /// fallback.
    ///
    /// 2. If it cannot compute a 'best' route for the route objective specified by
    /// the customer, it might fallback to another objective.
    /// fallback_route_objective is used to communicate the fallback route
    /// objective.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FallbackInfo {
        /// Routing mode used for the response. If fallback was triggered, the mode
        /// may be different from routing preference set in the original client
        /// request.
        #[prost(enumeration = "super::FallbackRoutingMode", tag = "1")]
        pub routing_mode: i32,
        /// The reason why fallback response was used instead of the original
        /// response.
        /// This field is only populated when the fallback mode is triggered and
        /// the fallback response is returned.
        #[prost(enumeration = "super::FallbackReason", tag = "2")]
        pub routing_mode_reason: i32,
        /// The route objective used for the response. If fallback was triggered, the
        /// objective may be different from the route objective provided in the
        /// original client request.
        #[prost(enumeration = "fallback_info::FallbackRouteObjective", tag = "3")]
        pub route_objective: i32,
    }
    /// Nested message and enum types in `FallbackInfo`.
    pub mod fallback_info {
        /// RouteObjective used for the response.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum FallbackRouteObjective {
            /// Fallback route objective unspecified.
            Unspecified = 0,
            /// If customer requests RateCard and sets include_tolls to true, and
            /// Google does not have toll price data for the route, the API falls back
            /// to RateCard without considering toll price.
            FallbackRatecardWithoutTollPriceData = 1,
        }
        impl FallbackRouteObjective {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    FallbackRouteObjective::Unspecified => {
                        "FALLBACK_ROUTE_OBJECTIVE_UNSPECIFIED"
                    }
                    FallbackRouteObjective::FallbackRatecardWithoutTollPriceData => {
                        "FALLBACK_RATECARD_WITHOUT_TOLL_PRICE_DATA"
                    }
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "FALLBACK_ROUTE_OBJECTIVE_UNSPECIFIED" => Some(Self::Unspecified),
                    "FALLBACK_RATECARD_WITHOUT_TOLL_PRICE_DATA" => {
                        Some(Self::FallbackRatecardWithoutTollPriceData)
                    }
                    _ => None,
                }
            }
        }
    }
}
/// Generated client implementations.
pub mod routes_preferred_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The Routes Preferred API.
    #[derive(Debug, Clone)]
    pub struct RoutesPreferredClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> RoutesPreferredClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> RoutesPreferredClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            RoutesPreferredClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Returns the primary route along with optional alternate routes, given a set
        /// of terminal and intermediate waypoints.
        ///
        /// **NOTE:** This method requires that you specify a response field mask in
        /// the input. You can provide the response field mask by using URL parameter
        /// `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask`
        /// (see the [available URL parameters and
        /// headers](https://cloud.google.com/apis/docs/system-parameters). The value
        /// is a comma separated list of field paths. See detailed documentation about
        /// [how to construct the field
        /// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
        ///
        /// For example, in this method:
        ///
        /// * Field mask of all available fields (for manual inspection):
        ///   `X-Goog-FieldMask: *`
        /// * Field mask of Route-level duration, distance, and polyline (an example
        /// production setup):
        ///   `X-Goog-FieldMask:
        ///   routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline`
        ///
        /// Google discourage the use of the wildcard (`*`) response field mask, or
        /// specifying the field mask at the top level (`routes`), because:
        ///
        /// * Selecting only the fields that you need helps our server save computation
        /// cycles, allowing us to return the result to you with a lower latency.
        /// * Selecting only the fields that you need
        /// in your production job ensures stable latency performance. We might add
        /// more response fields in the future, and those new fields might require
        /// extra computation time. If you select all fields, or if you select all
        /// fields at the top level, then you might experience performance degradation
        /// because any new field we add will be automatically included in the
        /// response.
        /// * Selecting only the fields that you need results in a smaller response
        /// size, and thus higher network throughput.
        pub async fn compute_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ComputeRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ComputeRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.maps.routes.v1.RoutesPreferred/ComputeRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.maps.routes.v1.RoutesPreferred",
                        "ComputeRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Takes in a list of origins and destinations and returns a stream containing
        /// route information for each combination of origin and destination.
        ///
        /// **NOTE:** This method requires that you specify a response field mask in
        /// the input. You can provide the response field mask by using the URL
        /// parameter `$fields` or `fields`, or by using the HTTP/gRPC header
        /// `X-Goog-FieldMask` (see the [available URL parameters and
        /// headers](https://cloud.google.com/apis/docs/system-parameters). The value
        /// is a comma separated list of field paths. See this detailed documentation
        /// about [how to construct the field
        /// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
        ///
        /// For example, in this method:
        ///
        /// * Field mask of all available fields (for manual inspection):
        ///   `X-Goog-FieldMask: *`
        /// * Field mask of route durations, distances, element status, condition, and
        ///   element indices (an example production setup):
        ///   `X-Goog-FieldMask:
        ///   originIndex,destinationIndex,status,condition,distanceMeters,duration`
        ///
        /// It is critical that you include `status` in your field mask as otherwise
        /// all messages will appear to be OK. Google discourages the use of the
        /// wildcard (`*`) response field mask, because:
        ///
        /// * Selecting only the fields that you need helps our server save computation
        /// cycles, allowing us to return the result to you with a lower latency.
        /// * Selecting only the fields that you need in your production job ensures
        /// stable latency performance. We might add more response fields in the
        /// future, and those new fields might require extra computation time. If you
        /// select all fields, or if you select all fields at the top level, then you
        /// might experience performance degradation because any new field we add will
        /// be automatically included in the response.
        /// * Selecting only the fields that you need results in a smaller response
        /// size, and thus higher network throughput.
        pub async fn compute_route_matrix(
            &mut self,
            request: impl tonic::IntoRequest<super::ComputeRouteMatrixRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::RouteMatrixElement>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.maps.routes.v1.RoutesPreferred/ComputeRouteMatrix",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.maps.routes.v1.RoutesPreferred",
                        "ComputeRouteMatrix",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Given a set of terminal and intermediate waypoints, and a route objective,
        /// computes the best route for the route objective. Also returns fastest route
        /// and shortest route as reference routes.
        ///
        /// **NOTE:** This method requires that you specify a response field mask in
        /// the input. You can provide the response field mask by using the URL
        /// parameter `$fields` or `fields`, or by using the HTTP/gRPC header
        /// `X-Goog-FieldMask` (see the [available URL parameters and
        /// headers](https://cloud.google.com/apis/docs/system-parameters). The value
        /// is a comma separated list of field paths. See this detailed documentation
        /// about [how to construct the field
        /// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
        ///
        /// For example, in this method:
        ///
        /// * Field mask of all available fields (for manual inspection):
        ///   `X-Goog-FieldMask: *`
        /// * Field mask of route distances, durations, token and toll info:
        ///   `X-Goog-FieldMask:
        ///   routes.route.distanceMeters,routes.route.duration,routes.token,routes.route.travelAdvisory.tollInfo`
        ///
        /// Google discourages the use of the wildcard (`*`) response field mask, or
        /// specifying the field mask at the top level (`routes`), because:
        ///
        /// * Selecting only the fields that you need helps our server save computation
        /// cycles, allowing us to return the result to you with a lower latency.
        /// * Selecting only the fields that you need in your production job ensures
        /// stable latency performance. We might add more response fields in the
        /// future, and those new fields might require extra computation time. If you
        /// select all fields, or if you select all fields at the top level, then you
        /// might experience performance degradation because any new field we add will
        /// be automatically included in the response.
        /// * Selecting only the fields that you need results in a smaller response
        /// size, and thus higher network throughput.
        pub async fn compute_custom_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ComputeCustomRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ComputeCustomRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.maps.routes.v1.RoutesPreferred/ComputeCustomRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.maps.routes.v1.RoutesPreferred",
                        "ComputeCustomRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}