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
// This file is @generated by prost-build.
/// Describes a vehicle attribute as a key-value pair. The "key:value" string
/// length cannot exceed 256 characters.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeliveryVehicleAttribute {
    /// The attribute's key.
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    /// The attribute's value.
    #[prost(string, tag = "2")]
    pub value: ::prost::alloc::string::String,
    /// The attribute's value, can be in string, bool, or double type.
    #[prost(
        oneof = "delivery_vehicle_attribute::DeliveryVehicleAttributeValue",
        tags = "3, 4, 5"
    )]
    pub delivery_vehicle_attribute_value: ::core::option::Option<
        delivery_vehicle_attribute::DeliveryVehicleAttributeValue,
    >,
}
/// Nested message and enum types in `DeliveryVehicleAttribute`.
pub mod delivery_vehicle_attribute {
    /// The attribute's value, can be in string, bool, or double type.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum DeliveryVehicleAttributeValue {
        /// String typed attribute value.
        ///
        /// Note: This is identical to the `value` field which will eventually be
        /// deprecated. For create or update methods, either field can be used, but
        /// it's strongly recommended to use `string_value`. If both `string_value`
        /// and `value` are set, they must be identical or an error will be thrown.
        /// Both fields are populated in responses.
        #[prost(string, tag = "3")]
        StringValue(::prost::alloc::string::String),
        /// Boolean typed attribute value.
        #[prost(bool, tag = "4")]
        BoolValue(bool),
        /// Double typed attribute value.
        #[prost(double, tag = "5")]
        NumberValue(f64),
    }
}
/// The location, speed, and heading of a vehicle at a point in time.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeliveryVehicleLocation {
    /// The location of the vehicle.
    /// When it is sent to Fleet Engine, the vehicle's location is a GPS location.
    /// When you receive it in a response, the vehicle's location can be either a
    /// GPS location, a supplemental location, or some other estimated location.
    /// The source is specified in `location_sensor`.
    #[prost(message, optional, tag = "1")]
    pub location: ::core::option::Option<
        super::super::super::super::google::r#type::LatLng,
    >,
    /// Deprecated: Use `latlng_accuracy` instead.
    #[deprecated]
    #[prost(message, optional, tag = "8")]
    pub horizontal_accuracy: ::core::option::Option<f64>,
    /// Accuracy of `location` in meters as a radius.
    #[prost(message, optional, tag = "22")]
    pub latlng_accuracy: ::core::option::Option<f64>,
    /// Direction the vehicle is moving in degrees.  0 represents North.
    /// The valid range is [0,360).
    #[prost(message, optional, tag = "2")]
    pub heading: ::core::option::Option<i32>,
    /// Deprecated: Use `heading_accuracy` instead.
    #[deprecated]
    #[prost(message, optional, tag = "10")]
    pub bearing_accuracy: ::core::option::Option<f64>,
    /// Accuracy of `heading` in degrees.
    #[prost(message, optional, tag = "23")]
    pub heading_accuracy: ::core::option::Option<f64>,
    /// Altitude in meters above WGS84.
    #[prost(message, optional, tag = "5")]
    pub altitude: ::core::option::Option<f64>,
    /// Deprecated: Use `altitude_accuracy` instead.
    #[deprecated]
    #[prost(message, optional, tag = "9")]
    pub vertical_accuracy: ::core::option::Option<f64>,
    /// Accuracy of `altitude` in meters.
    #[prost(message, optional, tag = "24")]
    pub altitude_accuracy: ::core::option::Option<f64>,
    /// Speed of the vehicle in kilometers per hour.
    /// Deprecated: Use `speed` instead.
    #[deprecated]
    #[prost(message, optional, tag = "3")]
    pub speed_kmph: ::core::option::Option<i32>,
    /// Speed of the vehicle in meters/second
    #[prost(message, optional, tag = "6")]
    pub speed: ::core::option::Option<f64>,
    /// Accuracy of `speed` in meters/second.
    #[prost(message, optional, tag = "7")]
    pub speed_accuracy: ::core::option::Option<f64>,
    /// The time when `location` was reported by the sensor according to the
    /// sensor's clock.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the server received the location information.
    #[prost(message, optional, tag = "13")]
    pub server_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Provider of location data (for example, `GPS`).
    #[prost(enumeration = "DeliveryVehicleLocationSensor", tag = "11")]
    pub location_sensor: i32,
    /// Whether `location` is snapped to a road.
    #[prost(message, optional, tag = "27")]
    pub is_road_snapped: ::core::option::Option<bool>,
    /// Input only. Indicates whether the GPS sensor is enabled on the mobile
    /// device.
    #[prost(message, optional, tag = "12")]
    pub is_gps_sensor_enabled: ::core::option::Option<bool>,
    /// Input only. Time (in seconds) since this location was first sent to the
    /// server. This will be zero for the first update. If the time is unknown (for
    /// example, when the app restarts), this value resets to zero.
    #[prost(message, optional, tag = "14")]
    pub time_since_update: ::core::option::Option<i32>,
    /// Input only. Deprecated: Other signals are now used to determine if a
    /// location is stale.
    #[deprecated]
    #[prost(message, optional, tag = "15")]
    pub num_stale_updates: ::core::option::Option<i32>,
    /// Raw vehicle location (unprocessed by road-snapper).
    #[prost(message, optional, tag = "16")]
    pub raw_location: ::core::option::Option<
        super::super::super::super::google::r#type::LatLng,
    >,
    /// Timestamp associated with the raw location.
    #[prost(message, optional, tag = "17")]
    pub raw_location_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Source of the raw location. Defaults to `GPS`.
    #[prost(enumeration = "DeliveryVehicleLocationSensor", tag = "28")]
    pub raw_location_sensor: i32,
    /// Accuracy of `raw_location` as a radius, in meters.
    #[prost(message, optional, tag = "25")]
    pub raw_location_accuracy: ::core::option::Option<f64>,
    /// Supplemental location provided by the integrating app.
    #[prost(message, optional, tag = "18")]
    pub supplemental_location: ::core::option::Option<
        super::super::super::super::google::r#type::LatLng,
    >,
    /// Timestamp associated with the supplemental location.
    #[prost(message, optional, tag = "19")]
    pub supplemental_location_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Source of the supplemental location. Defaults to
    /// `CUSTOMER_SUPPLIED_LOCATION`.
    #[prost(enumeration = "DeliveryVehicleLocationSensor", tag = "20")]
    pub supplemental_location_sensor: i32,
    /// Accuracy of `supplemental_location` as a radius, in meters.
    #[prost(message, optional, tag = "21")]
    pub supplemental_location_accuracy: ::core::option::Option<f64>,
    /// Deprecated: Use `is_road_snapped` instead.
    #[deprecated]
    #[prost(bool, tag = "26")]
    pub road_snapped: bool,
}
/// A time range.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeWindow {
    /// Required. The start time of the time window (inclusive).
    #[prost(message, optional, tag = "1")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Required. The end time of the time window (inclusive).
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Describes a task attribute as a key-value pair. The "key:value" string length
/// cannot exceed 256 characters.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaskAttribute {
    /// The attribute's key. Keys may not contain the colon character (:).
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    /// The attribute's value, can be in string, bool, or double type. If none are
    /// set the TaskAttribute string_value will be stored as the empty string "".
    #[prost(oneof = "task_attribute::TaskAttributeValue", tags = "2, 3, 4")]
    pub task_attribute_value: ::core::option::Option<task_attribute::TaskAttributeValue>,
}
/// Nested message and enum types in `TaskAttribute`.
pub mod task_attribute {
    /// The attribute's value, can be in string, bool, or double type. If none are
    /// set the TaskAttribute string_value will be stored as the empty string "".
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum TaskAttributeValue {
        /// String typed attribute value.
        #[prost(string, tag = "2")]
        StringValue(::prost::alloc::string::String),
        /// Boolean typed attribute value.
        #[prost(bool, tag = "3")]
        BoolValue(bool),
        /// Double typed attribute value.
        #[prost(double, tag = "4")]
        NumberValue(f64),
    }
}
/// The sensor or methodology used to determine the location.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DeliveryVehicleLocationSensor {
    /// The sensor is unspecified or unknown.
    UnknownSensor = 0,
    /// GPS or Assisted GPS.
    Gps = 1,
    /// Assisted GPS, cell tower ID, or WiFi access point.
    Network = 2,
    /// Cell tower ID or WiFi access point.
    Passive = 3,
    /// A location determined by the mobile device to be the most likely
    /// road position.
    RoadSnappedLocationProvider = 4,
    /// A customer-supplied location from an independent source.  Typically, this
    /// value is used for a location provided from sources other than the mobile
    /// device running Driver SDK.  If the original source is described by one of
    /// the other enum values, use that value. Locations marked
    /// CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's
    /// `last_location.supplemental_location_sensor`.
    CustomerSuppliedLocation = 5,
    /// A location calculated by Fleet Engine based on the signals available to it.
    /// Output only. This value will be rejected if it is received in a request.
    FleetEngineLocation = 6,
    /// Android's Fused Location Provider.
    FusedLocationProvider = 100,
    /// The location provider on Apple operating systems.
    CoreLocation = 200,
}
impl DeliveryVehicleLocationSensor {
    /// 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 {
            DeliveryVehicleLocationSensor::UnknownSensor => "UNKNOWN_SENSOR",
            DeliveryVehicleLocationSensor::Gps => "GPS",
            DeliveryVehicleLocationSensor::Network => "NETWORK",
            DeliveryVehicleLocationSensor::Passive => "PASSIVE",
            DeliveryVehicleLocationSensor::RoadSnappedLocationProvider => {
                "ROAD_SNAPPED_LOCATION_PROVIDER"
            }
            DeliveryVehicleLocationSensor::CustomerSuppliedLocation => {
                "CUSTOMER_SUPPLIED_LOCATION"
            }
            DeliveryVehicleLocationSensor::FleetEngineLocation => "FLEET_ENGINE_LOCATION",
            DeliveryVehicleLocationSensor::FusedLocationProvider => {
                "FUSED_LOCATION_PROVIDER"
            }
            DeliveryVehicleLocationSensor::CoreLocation => "CORE_LOCATION",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN_SENSOR" => Some(Self::UnknownSensor),
            "GPS" => Some(Self::Gps),
            "NETWORK" => Some(Self::Network),
            "PASSIVE" => Some(Self::Passive),
            "ROAD_SNAPPED_LOCATION_PROVIDER" => Some(Self::RoadSnappedLocationProvider),
            "CUSTOMER_SUPPLIED_LOCATION" => Some(Self::CustomerSuppliedLocation),
            "FLEET_ENGINE_LOCATION" => Some(Self::FleetEngineLocation),
            "FUSED_LOCATION_PROVIDER" => Some(Self::FusedLocationProvider),
            "CORE_LOCATION" => Some(Self::CoreLocation),
            _ => None,
        }
    }
}
/// The vehicle's navigation status.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DeliveryVehicleNavigationStatus {
    /// Unspecified navigation status.
    UnknownNavigationStatus = 0,
    /// The Driver app's navigation is in `FREE_NAV` mode.
    NoGuidance = 1,
    /// Turn-by-turn navigation is available and the Driver app navigation has
    /// entered `GUIDED_NAV` mode.
    EnrouteToDestination = 2,
    /// The vehicle has gone off the suggested route.
    OffRoute = 3,
    /// The vehicle is within approximately 50m of the destination.
    ArrivedAtDestination = 4,
}
impl DeliveryVehicleNavigationStatus {
    /// 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 {
            DeliveryVehicleNavigationStatus::UnknownNavigationStatus => {
                "UNKNOWN_NAVIGATION_STATUS"
            }
            DeliveryVehicleNavigationStatus::NoGuidance => "NO_GUIDANCE",
            DeliveryVehicleNavigationStatus::EnrouteToDestination => {
                "ENROUTE_TO_DESTINATION"
            }
            DeliveryVehicleNavigationStatus::OffRoute => "OFF_ROUTE",
            DeliveryVehicleNavigationStatus::ArrivedAtDestination => {
                "ARRIVED_AT_DESTINATION"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN_NAVIGATION_STATUS" => Some(Self::UnknownNavigationStatus),
            "NO_GUIDANCE" => Some(Self::NoGuidance),
            "ENROUTE_TO_DESTINATION" => Some(Self::EnrouteToDestination),
            "OFF_ROUTE" => Some(Self::OffRoute),
            "ARRIVED_AT_DESTINATION" => Some(Self::ArrivedAtDestination),
            _ => None,
        }
    }
}
/// The `DeliveryVehicle` message. A delivery vehicle transports shipments from a
/// depot to a delivery location, and from a pickup location to the depot. In
/// some cases, delivery vehicles also transport shipments directly from the
/// pickup location to the delivery location.
///
/// Note: gRPC and REST APIs use different field naming conventions. For example,
/// the `DeliveryVehicle.current_route_segment` field in the gRPC API and the
/// `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same
/// field.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeliveryVehicle {
    /// The unique name of this Delivery Vehicle.
    /// The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The last reported location of the Delivery Vehicle.
    #[prost(message, optional, tag = "2")]
    pub last_location: ::core::option::Option<DeliveryVehicleLocation>,
    /// The Delivery Vehicle's navigation status.
    #[prost(enumeration = "DeliveryVehicleNavigationStatus", tag = "3")]
    pub navigation_status: i32,
    /// The encoded polyline specifying the route that the navigation recommends
    /// taking to the next waypoint. Your driver app updates this when a
    /// stop is reached or passed, and when the navigation reroutes. These
    /// `LatLng`s are returned in
    /// `Task.journey_sharing_info.remaining_vehicle_journey_segments\[0\].path`
    /// (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments\[0\].path`
    /// (REST) for all active Tasks assigned to the Vehicle.
    ///
    /// There are a few cases where this field might not be used to populate
    /// `Task.journey_sharing_info.remaining_vehicle_journey_segments\[0\].path`
    /// (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments\[0\].path`
    /// (REST):
    ///
    /// * The endpoint of the `current_route_segment` does not match
    /// `DeliveryVehicle.remaining_vehicle_journey_segments\[0\].stop` (gRPC) or
    /// `DeliveryVehicle.remainingVehicleJourneySegments\[0\].stop` (REST).
    ///
    /// * The driver app has not updated its location recently, so the last
    /// updated value for this field might be stale.
    ///
    /// * The driver app has recently updated its location, but the
    /// `current_route_segment` is stale, and points to a previous vehicle stop.
    ///
    /// In these cases, Fleet Engine populates this field with a route from the
    /// most recently passed VehicleStop to the upcoming VehicleStop to ensure that
    /// the consumer of this field has the best available information on the
    /// current path of the Delivery Vehicle.
    #[prost(bytes = "bytes", tag = "4")]
    pub current_route_segment: ::prost::bytes::Bytes,
    /// The location where the `current_route_segment` ends. This is not currently
    /// populated by the driver app, but you can supply it on
    /// `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
    /// vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
    /// Engine will then do its best to interpolate to an actual `VehicleStop`.
    ///
    /// This field is ignored in `UpdateDeliveryVehicle` calls if the
    /// `current_route_segment` field is empty.
    #[prost(message, optional, tag = "5")]
    pub current_route_segment_end_point: ::core::option::Option<
        super::super::super::super::google::r#type::LatLng,
    >,
    /// The remaining driving distance for the `current_route_segment`.
    /// The Driver app typically provides this field, but there are some
    /// circumstances in which Fleet Engine will override the value sent by the
    /// app. For more information, see
    /// [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
    /// This field is returned in
    /// `Task.remaining_vehicle_journey_segments\[0\].driving_distance_meters` (gRPC)
    /// or `Task.remainingVehicleJourneySegments\[0\].drivingDistanceMeters` (REST)
    /// for all active `Task`s assigned to the Delivery Vehicle.
    ///
    /// Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
    /// `current_route_segment` field is empty.
    #[prost(message, optional, tag = "6")]
    pub remaining_distance_meters: ::core::option::Option<i32>,
    /// The remaining driving time for the `current_route_segment`.
    /// The Driver app typically provides this field, but there are some
    /// circumstances in which Fleet Engine will override the value sent by the
    /// app.  For more information, see
    /// [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
    /// This field is returned in
    /// `Task.remaining_vehicle_journey_segments\[0\].driving_duration` (gRPC) or
    /// `Task.remainingVehicleJourneySegments\[0\].drivingDuration` (REST) for all
    /// active tasks assigned to the Delivery Vehicle.
    ///
    /// Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
    /// `current_route_segment` field is empty.
    #[prost(message, optional, tag = "7")]
    pub remaining_duration: ::core::option::Option<::prost_types::Duration>,
    /// The journey segments assigned to this Delivery Vehicle, starting from the
    /// Vehicle's most recently reported location. This field won't be populated
    /// in the response of `ListDeliveryVehicles`.
    #[prost(message, repeated, tag = "8")]
    pub remaining_vehicle_journey_segments: ::prost::alloc::vec::Vec<
        VehicleJourneySegment,
    >,
    /// A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
    /// at most 100 attributes, and each attribute must have a unique key.
    #[prost(message, repeated, tag = "9")]
    pub attributes: ::prost::alloc::vec::Vec<DeliveryVehicleAttribute>,
    /// The type of this delivery vehicle. If unset, this will default to `AUTO`.
    #[prost(enumeration = "delivery_vehicle::DeliveryVehicleType", tag = "10")]
    pub r#type: i32,
}
/// Nested message and enum types in `DeliveryVehicle`.
pub mod delivery_vehicle {
    /// The type of delivery vehicle.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DeliveryVehicleType {
        /// The value is unused.
        Unspecified = 0,
        /// An automobile.
        Auto = 1,
        /// A motorcycle, moped, or other two-wheeled vehicle
        TwoWheeler = 2,
        /// Human-powered transport.
        Bicycle = 3,
        /// A human transporter, typically walking or running, traveling along
        /// pedestrian pathways.
        Pedestrian = 4,
    }
    impl DeliveryVehicleType {
        /// 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 {
                DeliveryVehicleType::Unspecified => "DELIVERY_VEHICLE_TYPE_UNSPECIFIED",
                DeliveryVehicleType::Auto => "AUTO",
                DeliveryVehicleType::TwoWheeler => "TWO_WHEELER",
                DeliveryVehicleType::Bicycle => "BICYCLE",
                DeliveryVehicleType::Pedestrian => "PEDESTRIAN",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DELIVERY_VEHICLE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "AUTO" => Some(Self::Auto),
                "TWO_WHEELER" => Some(Self::TwoWheeler),
                "BICYCLE" => Some(Self::Bicycle),
                "PEDESTRIAN" => Some(Self::Pedestrian),
                _ => None,
            }
        }
    }
}
/// A location with any additional identifiers.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LocationInfo {
    /// The location's coordinates.
    #[prost(message, optional, tag = "1")]
    pub point: ::core::option::Option<
        super::super::super::super::google::r#type::LatLng,
    >,
}
/// Represents a Vehicle’s travel segment - from its previous stop to the
/// current stop. If it is the first active stop, then it is from the
/// Vehicle’s current location to this stop.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VehicleJourneySegment {
    /// Specifies the stop location, along with the `Task`s associated with
    /// the stop. Some fields of the VehicleStop might not be present if this
    /// journey segment is part of `JourneySharingInfo`.
    #[prost(message, optional, tag = "1")]
    pub stop: ::core::option::Option<VehicleStop>,
    /// Output only. The travel distance from the previous stop to this stop.
    /// If the current stop is the first stop in the list of journey
    /// segments, then the starting point is the vehicle's location recorded
    /// at the time that this stop was added to the list. This field might not be
    /// present if this journey segment is part of `JourneySharingInfo`.
    #[prost(message, optional, tag = "2")]
    pub driving_distance_meters: ::core::option::Option<i32>,
    /// Output only. The travel time from the previous stop to this stop.
    /// If the current stop is the first stop in the list of journey
    /// segments, then the starting point is the Vehicle's location recorded
    /// at the time that this stop was added to the list.
    ///
    /// If this field is defined in the path
    /// `Task.remaining_vehicle_journey_segments\[0\].driving_duration` (gRPC) or
    /// `Task.remainingVehicleJourneySegments\[0\].drivingDuration` (REST),
    /// then it may be populated with the value from
    /// `DeliveryVehicle.remaining_duration` (gRPC) or
    /// `DeliveryVehicle.remainingDuration` (REST).
    /// This provides the remaining driving duration from the driver app's latest
    /// known location rather than the driving time from the previous stop.
    #[prost(message, optional, tag = "3")]
    pub driving_duration: ::core::option::Option<::prost_types::Duration>,
    /// Output only. The path from the previous stop to this stop. If the current
    /// stop is the first stop in the list of journey segments, then this is the
    /// path from the vehicle's current location to this stop at the time that the
    /// stop was added to the list. This field might not be present if this journey
    /// segment is part of `JourneySharingInfo`.
    ///
    /// If this field is defined in the path
    /// `Task.journey_sharing_info.remaining_vehicle_journey_segments\[0\].path`
    /// (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments\[0\].path`
    /// (REST), then it may be populated with the `LatLng`s decoded from
    /// `DeliveryVehicle.current_route_segment` (gRPC) or
    /// `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
    /// path from the driver app's latest known location rather than the path from
    /// the previous stop.
    #[prost(message, repeated, tag = "5")]
    pub path: ::prost::alloc::vec::Vec<
        super::super::super::super::google::r#type::LatLng,
    >,
}
/// Describes a point where a Vehicle stops to perform one or more `Task`s.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VehicleStop {
    /// Required. The location of the stop. Note that the locations in the `Task`s
    /// might not exactly match this location, but will be within a short distance
    /// of it. This field won't be populated in the response of a `GetTask` call.
    #[prost(message, optional, tag = "1")]
    pub planned_location: ::core::option::Option<LocationInfo>,
    /// The list of `Task`s to be performed at this stop. This field won't be
    /// populated in the response of a `GetTask` call.
    #[prost(message, repeated, tag = "2")]
    pub tasks: ::prost::alloc::vec::Vec<vehicle_stop::TaskInfo>,
    /// The state of the `VehicleStop`. This field won't be populated in the
    /// response of a `GetTask` call.
    #[prost(enumeration = "vehicle_stop::State", tag = "3")]
    pub state: i32,
}
/// Nested message and enum types in `VehicleStop`.
pub mod vehicle_stop {
    /// Additional information about the Task performed at this stop.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TaskInfo {
        /// The Task ID. This field won't be populated in the response of a `GetTask`
        /// call. Task IDs are subject to the following restrictions:
        ///
        /// * Must be a valid Unicode string.
        /// * Limited to a maximum length of 64 characters.
        /// * Normalized according to \[Unicode Normalization Form C\]
        /// (<http://www.unicode.org/reports/tr15/>).
        /// * May not contain any of the following ASCII characters: '/', ':', '?',
        /// ',', or '#'.
        #[prost(string, tag = "1")]
        pub task_id: ::prost::alloc::string::String,
        /// Output only. The time required to perform the Task.
        #[prost(message, optional, tag = "2")]
        pub task_duration: ::core::option::Option<::prost_types::Duration>,
        /// Output only. The time window during which the task should be completed.
        /// This is only set in the response to `GetDeliveryVehicle`.
        #[prost(message, optional, tag = "3")]
        pub target_time_window: ::core::option::Option<super::TimeWindow>,
    }
    /// The current state of a `VehicleStop`.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unknown.
        Unspecified = 0,
        /// Created, but not actively routing.
        New = 1,
        /// Assigned and actively routing.
        Enroute = 2,
        /// Arrived at stop. Assumes that when the Vehicle is routing to the next
        /// stop, that all previous stops have been completed.
        Arrived = 3,
    }
    impl State {
        /// 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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::New => "NEW",
                State::Enroute => "ENROUTE",
                State::Arrived => "ARRIVED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "NEW" => Some(Self::New),
                "ENROUTE" => Some(Self::Enroute),
                "ARRIVED" => Some(Self::Arrived),
                _ => None,
            }
        }
    }
}
/// A Task in the Delivery API represents a single action to track. In general,
/// there is a distinction between shipment-related Tasks and break Tasks. A
/// shipment can have multiple Tasks associated with it. For example, there could
/// be one Task for the pickup, and one for the drop-off or transfer. Also,
/// different Tasks for a given shipment can be handled by different vehicles.
/// For example, one vehicle could handle the pickup, driving the shipment to the
/// hub, while another vehicle drives the same shipment from the hub to the
/// drop-off location.
///
/// Note: gRPC and REST APIs use different field naming conventions. For example,
/// the `Task.journey_sharing_info` field in the gRPC API and the
/// `Task.journeySharingInfo` field in the REST API refer to the same
/// field.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Task {
    /// Must be in the format `providers/{provider}/tasks/{task}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Immutable. Defines the type of the Task. For example, a break or
    /// shipment.
    #[prost(enumeration = "task::Type", tag = "2")]
    pub r#type: i32,
    /// Required. The current execution state of the Task.
    #[prost(enumeration = "task::State", tag = "3")]
    pub state: i32,
    /// The outcome of the Task.
    #[prost(enumeration = "task::TaskOutcome", tag = "9")]
    pub task_outcome: i32,
    /// The timestamp that indicates when the `Task`'s outcome was set by the
    /// provider.
    #[prost(message, optional, tag = "10")]
    pub task_outcome_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The location where the `Task`'s outcome was set. This value is updated as
    /// part of `UpdateTask`. If this value isn't explicitly updated by the
    /// provider, then Fleet Engine populates it by default with the last known
    /// vehicle location (the *raw* location).
    #[prost(message, optional, tag = "11")]
    pub task_outcome_location: ::core::option::Option<LocationInfo>,
    /// Indicates where the value of the `task_outcome_location` came from.
    #[prost(enumeration = "task::TaskOutcomeLocationSource", tag = "12")]
    pub task_outcome_location_source: i32,
    /// Immutable. This field facilitates the storing of an ID so you can avoid
    /// using a complicated mapping. You cannot set `tracking_id` for Tasks of type
    /// `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the
    /// following restrictions:
    ///
    /// * Must be a valid Unicode string.
    /// * Limited to a maximum length of 64 characters.
    /// * Normalized according to \[Unicode Normalization Form C\]
    /// (<http://www.unicode.org/reports/tr15/>).
    /// * May not contain any of the following ASCII characters: '/', ':', '?',
    /// ',', or '#'.
    #[prost(string, tag = "4")]
    pub tracking_id: ::prost::alloc::string::String,
    /// Output only. The ID of the vehicle that is executing this Task. Delivery
    /// Vehicle IDs are subject to the following restrictions:
    ///
    /// * Must be a valid Unicode string.
    /// * Limited to a maximum length of 64 characters.
    /// * Normalized according to \[Unicode Normalization Form C\]
    /// (<http://www.unicode.org/reports/tr15/>).
    /// * May not contain any of the following ASCII characters: '/', ':', '?',
    /// ',', or '#'.
    #[prost(string, tag = "5")]
    pub delivery_vehicle_id: ::prost::alloc::string::String,
    /// Immutable. The location where the Task will be completed.
    /// Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
    #[prost(message, optional, tag = "6")]
    pub planned_location: ::core::option::Option<LocationInfo>,
    /// Required. Immutable. The time needed to execute a Task at this location.
    #[prost(message, optional, tag = "7")]
    pub task_duration: ::core::option::Option<::prost_types::Duration>,
    /// The time window during which the task should be completed.
    #[prost(message, optional, tag = "14")]
    pub target_time_window: ::core::option::Option<TimeWindow>,
    /// Output only. Journey sharing-specific fields. Not populated when state is
    /// `CLOSED`.
    #[prost(message, optional, tag = "8")]
    pub journey_sharing_info: ::core::option::Option<task::JourneySharingInfo>,
    /// The configuration for task tracking that specifies which data elements are
    /// visible to the end users under what circumstances.
    #[prost(message, optional, tag = "13")]
    pub task_tracking_view_config: ::core::option::Option<TaskTrackingViewConfig>,
    /// A list of custom Task attributes. Each attribute must have a unique key.
    #[prost(message, repeated, tag = "15")]
    pub attributes: ::prost::alloc::vec::Vec<TaskAttribute>,
}
/// Nested message and enum types in `Task`.
pub mod task {
    /// Journey sharing specific fields.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct JourneySharingInfo {
        /// Tracking information for the stops that the assigned vehicle will make
        /// before it completes this Task. Note that this list can contain stops
        /// from other tasks.
        ///
        /// The first segment,
        /// `Task.journey_sharing_info.remaining_vehicle_journey_segments\[0\]` (gRPC)
        /// or `Task.journeySharingInfo.remainingVehicleJourneySegments\[0\]` (REST),
        /// contains route information from the driver's last known location to the
        /// upcoming `VehicleStop`. Current route information usually comes from the
        /// driver app, except for some cases noted in the documentation for
        /// [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
        /// The other segments in
        /// `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
        /// `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
        /// populated by Fleet Engine. They provide route information between the
        /// remaining `VehicleStops`.
        #[prost(message, repeated, tag = "1")]
        pub remaining_vehicle_journey_segments: ::prost::alloc::vec::Vec<
            super::VehicleJourneySegment,
        >,
        /// Indicates the vehicle's last reported location of the assigned vehicle.
        #[prost(message, optional, tag = "2")]
        pub last_location: ::core::option::Option<super::DeliveryVehicleLocation>,
        /// Indicates whether the vehicle's lastLocation can be snapped to
        /// the `current_route_segment`. This value is False if either
        /// `last_location` or `current_route_segment` don't exist. This value is
        /// computed by Fleet Engine. Updates from clients are ignored.
        #[prost(bool, tag = "3")]
        pub last_location_snappable: bool,
    }
    /// The type of Task.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Default, the Task type is unknown.
        Unspecified = 0,
        /// A pickup Task is the action taken for picking up a shipment from a
        /// customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
        /// type.
        Pickup = 1,
        /// A delivery Task is the action taken for delivering a shipment to an end
        /// customer. Depot or feeder vehicle dropoffs should use the
        /// `SCHEDULED_STOP` type.
        Delivery = 2,
        /// A scheduled stop Task is used for planning purposes. For example, it
        /// could represent picking up or dropping off shipments from feeder vehicles
        /// or depots. It shouldn't be used for any shipments that are picked up or
        /// dropped off from an end customer.
        ScheduledStop = 3,
        /// A Task that means the Vehicle is not available for service. For example,
        /// this can happen when the driver takes a break, or when the vehicle
        /// is being refueled.
        Unavailable = 4,
    }
    impl Type {
        /// 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 {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::Pickup => "PICKUP",
                Type::Delivery => "DELIVERY",
                Type::ScheduledStop => "SCHEDULED_STOP",
                Type::Unavailable => "UNAVAILABLE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "PICKUP" => Some(Self::Pickup),
                "DELIVERY" => Some(Self::Delivery),
                "SCHEDULED_STOP" => Some(Self::ScheduledStop),
                "UNAVAILABLE" => Some(Self::Unavailable),
                _ => None,
            }
        }
    }
    /// The state of a Task. This indicates the Tasks's progress.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Default. Used for an unspecified or unrecognized Task state.
        Unspecified = 0,
        /// Either the Task has not yet been assigned to a delivery vehicle, or the
        /// delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
        Open = 1,
        /// When the vehicle passes the vehicle stop for this Task.
        Closed = 2,
    }
    impl State {
        /// 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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Open => "OPEN",
                State::Closed => "CLOSED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "OPEN" => Some(Self::Open),
                "CLOSED" => Some(Self::Closed),
                _ => None,
            }
        }
    }
    /// The outcome of attempting to execute a Task. When `TaskState` is closed,
    /// `TaskOutcome` indicates whether it was completed successfully.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TaskOutcome {
        /// The Task outcome before its value is set.
        Unspecified = 0,
        /// The Task completed successfully.
        Succeeded = 1,
        /// Either the Task couldn't be completed, or it was cancelled.
        Failed = 2,
    }
    impl TaskOutcome {
        /// 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 {
                TaskOutcome::Unspecified => "TASK_OUTCOME_UNSPECIFIED",
                TaskOutcome::Succeeded => "SUCCEEDED",
                TaskOutcome::Failed => "FAILED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TASK_OUTCOME_UNSPECIFIED" => Some(Self::Unspecified),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
    /// The identity of the source that populated the `task_outcome_location`.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TaskOutcomeLocationSource {
        /// The task outcome before it is set.
        Unspecified = 0,
        /// The provider-specified the `task_outcome_location`.
        Provider = 2,
        /// The provider didn't specify the `task_outcome_location`, so Fleet Engine
        /// used the last known vehicle location.
        LastVehicleLocation = 3,
    }
    impl TaskOutcomeLocationSource {
        /// 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 {
                TaskOutcomeLocationSource::Unspecified => {
                    "TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED"
                }
                TaskOutcomeLocationSource::Provider => "PROVIDER",
                TaskOutcomeLocationSource::LastVehicleLocation => "LAST_VEHICLE_LOCATION",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
                "PROVIDER" => Some(Self::Provider),
                "LAST_VEHICLE_LOCATION" => Some(Self::LastVehicleLocation),
                _ => None,
            }
        }
    }
}
/// The configuration message that defines when a data element of a Task should
/// be visible to the end users.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TaskTrackingViewConfig {
    /// The field that specifies when route polyline points can be visible. If this
    /// field is not specified, the project level default visibility configuration
    /// for this data will be used.
    #[prost(message, optional, tag = "1")]
    pub route_polyline_points_visibility: ::core::option::Option<
        task_tracking_view_config::VisibilityOption,
    >,
    /// The field that specifies when estimated arrival time can be visible. If
    /// this field is not specified, the project level default visibility
    /// configuration for this data will be used.
    #[prost(message, optional, tag = "2")]
    pub estimated_arrival_time_visibility: ::core::option::Option<
        task_tracking_view_config::VisibilityOption,
    >,
    /// The field that specifies when estimated task completion time can be
    /// visible. If this field is not specified, the project level default
    /// visibility configuration for this data will be used.
    #[prost(message, optional, tag = "3")]
    pub estimated_task_completion_time_visibility: ::core::option::Option<
        task_tracking_view_config::VisibilityOption,
    >,
    /// The field that specifies when remaining driving distance can be visible. If
    /// this field is not specified, the project level default visibility
    /// configuration for this data will be used.
    #[prost(message, optional, tag = "4")]
    pub remaining_driving_distance_visibility: ::core::option::Option<
        task_tracking_view_config::VisibilityOption,
    >,
    /// The field that specifies when remaining stop count can be visible. If this
    /// field is not specified, the project level default visibility configuration
    /// for this data will be used.
    #[prost(message, optional, tag = "5")]
    pub remaining_stop_count_visibility: ::core::option::Option<
        task_tracking_view_config::VisibilityOption,
    >,
    /// The field that specifies when vehicle location can be visible. If this
    /// field is not specified, the project level default visibility configuration
    /// for this data will be used.
    #[prost(message, optional, tag = "6")]
    pub vehicle_location_visibility: ::core::option::Option<
        task_tracking_view_config::VisibilityOption,
    >,
}
/// Nested message and enum types in `TaskTrackingViewConfig`.
pub mod task_tracking_view_config {
    /// The option message that defines when a data element should be visible to
    /// the end users.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct VisibilityOption {
        /// The specific visibility option chosen.
        #[prost(oneof = "visibility_option::VisibilityOption", tags = "1, 2, 3, 4, 5")]
        pub visibility_option: ::core::option::Option<
            visibility_option::VisibilityOption,
        >,
    }
    /// Nested message and enum types in `VisibilityOption`.
    pub mod visibility_option {
        /// The specific visibility option chosen.
        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
        pub enum VisibilityOption {
            /// This data element is visible to the end users if the remaining stop
            /// count <= remaining_stop_count_threshold.
            #[prost(int32, tag = "1")]
            RemainingStopCountThreshold(i32),
            /// This data element is visible to the end users if the ETA to the stop
            /// <= duration_until_estimated_arrival_time_threshold.
            #[prost(message, tag = "2")]
            DurationUntilEstimatedArrivalTimeThreshold(::prost_types::Duration),
            /// This data element is visible to the end users if the remaining
            /// driving distance in meters <=
            /// remaining_driving_distance_meters_threshold.
            #[prost(int32, tag = "3")]
            RemainingDrivingDistanceMetersThreshold(i32),
            /// If set to true, this data element is always visible to the end users
            /// with no thresholds. This field cannot be set to false.
            #[prost(bool, tag = "4")]
            Always(bool),
            /// If set to true, this data element is always hidden from the end users
            /// with no thresholds. This field cannot be set to false.
            #[prost(bool, tag = "5")]
            Never(bool),
        }
    }
}
/// The `TaskTrackingInfo` message. The message contains task tracking
/// information which will be used for display. If a tracking ID is associated
/// with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's
/// TaskTrackingInfo to select.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaskTrackingInfo {
    /// Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
    /// where `tracking` represents the tracking ID.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Immutable. The tracking ID of a Task.
    /// * Must be a valid Unicode string.
    /// * Limited to a maximum length of 64 characters.
    /// * Normalized according to \[Unicode Normalization Form C\]
    /// (<http://www.unicode.org/reports/tr15/>).
    /// * May not contain any of the following ASCII characters: '/', ':', '?',
    /// ',', or '#'.
    #[prost(string, tag = "2")]
    pub tracking_id: ::prost::alloc::string::String,
    /// The vehicle's last location.
    #[prost(message, optional, tag = "3")]
    pub vehicle_location: ::core::option::Option<DeliveryVehicleLocation>,
    /// A list of points which when connected forms a polyline of the vehicle's
    /// expected route to the location of this task.
    #[prost(message, repeated, tag = "4")]
    pub route_polyline_points: ::prost::alloc::vec::Vec<
        super::super::super::super::google::r#type::LatLng,
    >,
    /// Indicates the number of stops the vehicle remaining until the task stop is
    /// reached, including the task stop. For example, if the vehicle's next stop
    /// is the task stop, the value will be 1.
    #[prost(message, optional, tag = "5")]
    pub remaining_stop_count: ::core::option::Option<i32>,
    /// The total remaining distance in meters to the `VehicleStop` of interest.
    #[prost(message, optional, tag = "6")]
    pub remaining_driving_distance_meters: ::core::option::Option<i32>,
    /// The timestamp that indicates the estimated arrival time to the stop
    /// location.
    #[prost(message, optional, tag = "7")]
    pub estimated_arrival_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The timestamp that indicates the estimated completion time of a Task.
    #[prost(message, optional, tag = "8")]
    pub estimated_task_completion_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The current execution state of the Task.
    #[prost(enumeration = "task::State", tag = "11")]
    pub state: i32,
    /// The outcome of attempting to execute a Task.
    #[prost(enumeration = "task::TaskOutcome", tag = "9")]
    pub task_outcome: i32,
    /// The timestamp that indicates when the Task's outcome was set by the
    /// provider.
    #[prost(message, optional, tag = "12")]
    pub task_outcome_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Immutable. The location where the Task will be completed.
    #[prost(message, optional, tag = "10")]
    pub planned_location: ::core::option::Option<LocationInfo>,
    /// The time window during which the task should be completed.
    #[prost(message, optional, tag = "13")]
    pub target_time_window: ::core::option::Option<TimeWindow>,
    /// The custom attributes set on the task.
    #[prost(message, repeated, tag = "14")]
    pub attributes: ::prost::alloc::vec::Vec<TaskAttribute>,
}
/// A RequestHeader contains fields common to all Delivery RPC requests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeliveryRequestHeader {
    /// 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.> If none
    /// is specified, the response may be in any language, with a preference for
    /// English if such a name exists. Field value example: `en-US`.
    #[prost(string, tag = "1")]
    pub language_code: ::prost::alloc::string::String,
    /// Required. CLDR region code of the region where the request originates.
    /// Field value example: `US`.
    #[prost(string, tag = "2")]
    pub region_code: ::prost::alloc::string::String,
    /// Version of the calling SDK, if applicable.
    /// The version format is "major.minor.patch", example: `1.1.2`.
    #[prost(string, tag = "3")]
    pub sdk_version: ::prost::alloc::string::String,
    /// Version of the operating system on which the calling SDK is running.
    /// Field value examples: `4.4.1`, `12.1`.
    #[prost(string, tag = "4")]
    pub os_version: ::prost::alloc::string::String,
    /// Model of the device on which the calling SDK is running.
    /// Field value examples: `iPhone12,1`, `SM-G920F`.
    #[prost(string, tag = "5")]
    pub device_model: ::prost::alloc::string::String,
    /// The type of SDK sending the request.
    #[prost(enumeration = "delivery_request_header::SdkType", tag = "6")]
    pub sdk_type: i32,
    /// Version of the MapSDK which the calling SDK depends on, if applicable.
    /// The version format is "major.minor.patch", example: `5.2.1`.
    #[prost(string, tag = "7")]
    pub maps_sdk_version: ::prost::alloc::string::String,
    /// Version of the NavSDK which the calling SDK depends on, if applicable.
    /// The version format is "major.minor.patch", example: `2.1.0`.
    #[prost(string, tag = "8")]
    pub nav_sdk_version: ::prost::alloc::string::String,
    /// Platform of the calling SDK.
    #[prost(enumeration = "delivery_request_header::Platform", tag = "9")]
    pub platform: i32,
    /// Manufacturer of the Android device from the calling SDK, only applicable
    /// for the Android SDKs.
    /// Field value example: `Samsung`.
    #[prost(string, tag = "10")]
    pub manufacturer: ::prost::alloc::string::String,
    /// Android API level of the calling SDK, only applicable for the Android SDKs.
    /// Field value example: `23`.
    #[prost(int32, tag = "11")]
    pub android_api_level: i32,
    /// Optional ID that can be provided for logging purposes in order to identify
    /// the request.
    #[prost(string, tag = "12")]
    pub trace_id: ::prost::alloc::string::String,
}
/// Nested message and enum types in `DeliveryRequestHeader`.
pub mod delivery_request_header {
    /// Possible types of SDK.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SdkType {
        /// The default value. This value is used if the `sdk_type` is omitted.
        Unspecified = 0,
        /// The calling SDK is Consumer.
        Consumer = 1,
        /// The calling SDK is Driver.
        Driver = 2,
        /// The calling SDK is JavaScript.
        Javascript = 3,
    }
    impl SdkType {
        /// 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 {
                SdkType::Unspecified => "SDK_TYPE_UNSPECIFIED",
                SdkType::Consumer => "CONSUMER",
                SdkType::Driver => "DRIVER",
                SdkType::Javascript => "JAVASCRIPT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SDK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "CONSUMER" => Some(Self::Consumer),
                "DRIVER" => Some(Self::Driver),
                "JAVASCRIPT" => Some(Self::Javascript),
                _ => None,
            }
        }
    }
    /// The platform of the calling SDK.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Platform {
        /// The default value. This value is used if the platform is omitted.
        Unspecified = 0,
        /// The request is coming from Android.
        Android = 1,
        /// The request is coming from iOS.
        Ios = 2,
        /// The request is coming from the web.
        Web = 3,
    }
    impl Platform {
        /// 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 {
                Platform::Unspecified => "PLATFORM_UNSPECIFIED",
                Platform::Android => "ANDROID",
                Platform::Ios => "IOS",
                Platform::Web => "WEB",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PLATFORM_UNSPECIFIED" => Some(Self::Unspecified),
                "ANDROID" => Some(Self::Android),
                "IOS" => Some(Self::Ios),
                "WEB" => Some(Self::Web),
                _ => None,
            }
        }
    }
}
/// The `CreateDeliveryVehicle` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDeliveryVehicleRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. Must be in the format `providers/{provider}`. The provider must
    /// be the Google Cloud Project ID. For example, `sample-cloud-project`.
    #[prost(string, tag = "3")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The Delivery Vehicle ID must be unique and subject to the
    /// following restrictions:
    ///
    /// * Must be a valid Unicode string.
    /// * Limited to a maximum length of 64 characters.
    /// * Normalized according to \[Unicode Normalization Form C\]
    /// (<http://www.unicode.org/reports/tr15/>).
    /// * May not contain any of the following ASCII characters: '/', ':', '?',
    /// ',', or '#'.
    #[prost(string, tag = "4")]
    pub delivery_vehicle_id: ::prost::alloc::string::String,
    /// Required. The `DeliveryVehicle` entity to create. When creating a new
    /// delivery vehicle, you may set the following optional fields:
    ///
    /// * type
    /// * last_location
    /// * attributes
    ///
    /// Note: The DeliveryVehicle's `name` field is ignored. All other
    /// DeliveryVehicle fields must not be set; otherwise, an error is returned.
    #[prost(message, optional, tag = "5")]
    pub delivery_vehicle: ::core::option::Option<DeliveryVehicle>,
}
/// The `GetDeliveryVehicle` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDeliveryVehicleRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. Must be in the format
    /// `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
    /// The `provider` must be the Google Cloud Project ID. For example,
    /// `sample-cloud-project`.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
}
/// The `ListDeliveryVehicles` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDeliveryVehiclesRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. Must be in the format `providers/{provider}`.
    /// The `provider` must be the Google Cloud Project ID.
    /// For example, `sample-cloud-project`.
    #[prost(string, tag = "3")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of vehicles to return. The service may return
    /// fewer than this number. If you don't specify this number, then the server
    /// determines the number of results to return.
    #[prost(int32, tag = "4")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous `ListDeliveryVehicles`
    /// call. You must provide this in order to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListDeliveryVehicles`
    /// must match the call that provided the page token.
    #[prost(string, tag = "5")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. A filter query to apply when listing delivery vehicles. See
    /// <http://aip.dev/160> for examples of the filter syntax. If you don't specify
    /// a value, or if you specify an empty string for the filter, then all
    /// delivery vehicles are returned.
    ///
    /// Note that the only queries supported for `ListDeliveryVehicles` are
    /// on vehicle attributes (for example, `attributes.<key> = <value>` or
    /// `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). Also, all
    /// attributes are stored as strings, so the only supported comparisons against
    /// attributes are string comparisons. In order to compare against number or
    /// boolean values, the values must be explicitly quoted to be treated as
    /// strings (for example, `attributes.<key> = "10"` or
    /// `attributes.<key> = "true"`).
    ///
    /// The maximum number of restrictions allowed in a filter query is 50. A
    /// restriction is a part of the query of the form
    /// `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
    /// is 1 restriction.
    #[prost(string, tag = "6")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. A filter that limits the vehicles returned to those whose last
    /// known location was in the rectangular area defined by the viewport.
    #[prost(message, optional, tag = "7")]
    pub viewport: ::core::option::Option<
        super::super::super::super::google::geo::r#type::Viewport,
    >,
}
/// The `ListDeliveryVehicles` response message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDeliveryVehiclesResponse {
    /// The set of delivery vehicles that meet the requested filtering criteria.
    /// When no filter is specified, the request returns all delivery vehicles. A
    /// successful response can also be empty. An empty response indicates that no
    /// delivery vehicles were found meeting the requested filter criteria.
    #[prost(message, repeated, tag = "1")]
    pub delivery_vehicles: ::prost::alloc::vec::Vec<DeliveryVehicle>,
    /// You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
    /// list results. When all of the results are returned, this field won't be in
    /// the response, or it will be an empty string.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// The total number of delivery vehicles that match the request criteria,
    /// across all pages.
    #[prost(int64, tag = "3")]
    pub total_size: i64,
}
/// The `UpdateDeliveryVehicle` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDeliveryVehicleRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. The `DeliveryVehicle` entity update to apply.
    /// Note: You cannot update the name of the `DeliveryVehicle`.
    #[prost(message, optional, tag = "3")]
    pub delivery_vehicle: ::core::option::Option<DeliveryVehicle>,
    /// Required. A field mask that indicates which `DeliveryVehicle` fields to
    /// update. Note that the update_mask must contain at least one field.
    ///
    /// This is a comma-separated list of fully qualified names of fields. Example:
    /// `"remaining_vehicle_journey_segments"`.
    #[prost(message, optional, tag = "4")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The `BatchCreateTask` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateTasksRequest {
    /// Optional. The standard Delivery API request header.
    /// Note: If you set this field, then the header field in the
    /// `CreateTaskRequest` messages must either be empty, or it must match this
    /// field.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. The parent resource shared by all tasks. This value must be in
    /// the format `providers/{provider}`. The `provider` must be the Google Cloud
    /// Project ID. For example, `sample-cloud-project`. The parent field in the
    /// `CreateTaskRequest` messages must either  be empty, or it must match this
    /// field.
    #[prost(string, tag = "3")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The request message that specifies the resources to create.
    /// Note: You can create a maximum of 500 tasks in a batch.
    #[prost(message, repeated, tag = "4")]
    pub requests: ::prost::alloc::vec::Vec<CreateTaskRequest>,
}
/// The `BatchCreateTask` response message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateTasksResponse {
    /// The created Tasks.
    #[prost(message, repeated, tag = "1")]
    pub tasks: ::prost::alloc::vec::Vec<Task>,
}
/// The `CreateTask` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTaskRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. Must be in the format `providers/{provider}`. The `provider` must
    /// be the Google Cloud Project ID. For example, `sample-cloud-project`.
    #[prost(string, tag = "3")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The Task ID must be unique, but it should be not a shipment
    /// tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
    /// Note that multiple tasks can have the same `tracking_id`. Task IDs are
    /// subject to the following restrictions:
    ///
    /// * Must be a valid Unicode string.
    /// * Limited to a maximum length of 64 characters.
    /// * Normalized according to \[Unicode Normalization Form C\]
    /// (<http://www.unicode.org/reports/tr15/>).
    /// * May not contain any of the following ASCII characters: '/', ':', '?',
    /// ',', or '#'.
    #[prost(string, tag = "5")]
    pub task_id: ::prost::alloc::string::String,
    /// Required. The Task entity to create.
    /// When creating a Task, the following fields are required:
    ///
    /// * `type`
    /// * `state` (must be set to `OPEN`)
    /// * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
    /// tasks, but required for all other task types)
    /// * `planned_location` (optional for `UNAVAILABLE` tasks)
    /// * `task_duration`
    ///
    /// Note: The Task's `name` field is ignored. All other Task fields must not be
    /// set; otherwise, an error is returned.
    #[prost(message, optional, tag = "4")]
    pub task: ::core::option::Option<Task>,
}
/// The `GetTask` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTaskRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. Must be in the format `providers/{provider}/tasks/{task}`. The
    /// `provider` must be the Google Cloud Project ID. For example,
    /// `sample-cloud-project`.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
}
/// The `UpdateTask` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTaskRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. The Task associated with the update.
    /// The following fields are maintained by Fleet Engine. Do not update
    /// them using `Task.update`.
    ///
    ///    * `last_location`.
    ///    * `last_location_snappable`.
    ///    * `name`.
    ///    * `remaining_vehicle_journey_segments`.
    ///    * `task_outcome_location_source`.
    ///
    /// Note: You cannot change the value of `task_outcome` once you set it.
    ///
    /// If the Task has been assigned to a delivery vehicle, then don't set the
    /// Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
    /// that contains the Task from the delivery vehicle, which automatically sets
    /// the Task state to CLOSED.
    #[prost(message, optional, tag = "3")]
    pub task: ::core::option::Option<Task>,
    /// Required. The field mask that indicates which Task fields to update.
    /// Note: The `update_mask` must contain at least one field.
    ///
    /// This is a comma-separated list of fully qualified names of fields. Example:
    /// `"task_outcome,task_outcome_time,task_outcome_location"`.
    #[prost(message, optional, tag = "4")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The `ListTasks` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTasksRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. Must be in the format `providers/{provider}`.
    /// The `provider` must be the Google Cloud Project ID. For example,
    /// `sample-cloud-project`.
    #[prost(string, tag = "3")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of Tasks to return. The service may return
    /// fewer than this value. If you don't specify this value, then the server
    /// determines the number of results to return.
    #[prost(int32, tag = "4")]
    pub page_size: i32,
    /// Optional. A page token received from a previous `ListTasks` call.
    /// You can provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListTasks` must match
    /// the call that provided the page token.
    #[prost(string, tag = "5")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. A filter query to apply when listing Tasks. See
    /// <http://aip.dev/160> for examples of filter syntax. If you don't specify a
    /// value, or if you filter on an empty string, then all Tasks are returned.
    /// For information about the Task properties that you can filter on, see [List
    /// tasks](<https://developers.google.com/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list-tasks>).
    #[prost(string, tag = "6")]
    pub filter: ::prost::alloc::string::String,
}
/// The `ListTasks` response that contains the set of Tasks that meet the filter
/// criteria in the `ListTasksRequest`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTasksResponse {
    /// The set of Tasks that meet the requested filtering criteria. When no filter
    /// is specified, the request returns all tasks. A successful response can also
    /// be empty. An empty response indicates that no Tasks were found meeting the
    /// requested filter criteria.
    #[prost(message, repeated, tag = "1")]
    pub tasks: ::prost::alloc::vec::Vec<Task>,
    /// Pass this token in the `ListTasksRequest` to continue to list results.
    /// If all results have been returned, then this field is either an empty
    /// string, or it doesn't appear in the response.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// The total number of Tasks that match the request criteria, across all
    /// pages.
    #[prost(int64, tag = "3")]
    pub total_size: i64,
}
/// The `GetTaskTrackingInfoRequest` request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTaskTrackingInfoRequest {
    /// Optional. The standard Delivery API request header.
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<DeliveryRequestHeader>,
    /// Required. Must be in the format
    /// `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider`
    /// must be the Google Cloud Project ID, and the `tracking_id` must be the
    /// tracking ID associated with the task. An example name can be
    /// `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod delivery_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The Last Mile Delivery service.
    #[derive(Debug, Clone)]
    pub struct DeliveryServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> DeliveryServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> DeliveryServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            DeliveryServiceClient::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
        }
        /// Creates and returns a new `DeliveryVehicle`.
        pub async fn create_delivery_vehicle(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateDeliveryVehicleRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeliveryVehicle>,
            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(
                "/maps.fleetengine.delivery.v1.DeliveryService/CreateDeliveryVehicle",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "CreateDeliveryVehicle",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the specified `DeliveryVehicle` instance.
        pub async fn get_delivery_vehicle(
            &mut self,
            request: impl tonic::IntoRequest<super::GetDeliveryVehicleRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeliveryVehicle>,
            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(
                "/maps.fleetengine.delivery.v1.DeliveryService/GetDeliveryVehicle",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "GetDeliveryVehicle",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns
        /// `Tasks` to the `DeliveryVehicle`. You cannot update the name of the
        /// `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`,
        /// but it must contain all of the `VehicleJourneySegment`s to be persisted on
        /// the `DeliveryVehicle`. The `task_id`s are retrieved from
        /// `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are
        /// assigned to the `DeliveryVehicle` if they have not yet been assigned.
        pub async fn update_delivery_vehicle(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateDeliveryVehicleRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeliveryVehicle>,
            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(
                "/maps.fleetengine.delivery.v1.DeliveryService/UpdateDeliveryVehicle",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "UpdateDeliveryVehicle",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates and returns a batch of new `Task` objects.
        pub async fn batch_create_tasks(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchCreateTasksRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchCreateTasksResponse>,
            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(
                "/maps.fleetengine.delivery.v1.DeliveryService/BatchCreateTasks",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "BatchCreateTasks",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates and returns a new `Task` object.
        pub async fn create_task(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateTaskRequest>,
        ) -> std::result::Result<tonic::Response<super::Task>, 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(
                "/maps.fleetengine.delivery.v1.DeliveryService/CreateTask",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "CreateTask",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets information about a `Task`.
        pub async fn get_task(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTaskRequest>,
        ) -> std::result::Result<tonic::Response<super::Task>, 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(
                "/maps.fleetengine.delivery.v1.DeliveryService/GetTask",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "GetTask",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates `Task` data.
        pub async fn update_task(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateTaskRequest>,
        ) -> std::result::Result<tonic::Response<super::Task>, 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(
                "/maps.fleetengine.delivery.v1.DeliveryService/UpdateTask",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "UpdateTask",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets all `Task`s that meet the specified filtering criteria.
        pub async fn list_tasks(
            &mut self,
            request: impl tonic::IntoRequest<super::ListTasksRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListTasksResponse>,
            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(
                "/maps.fleetengine.delivery.v1.DeliveryService/ListTasks",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "ListTasks",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the specified `TaskTrackingInfo` instance.
        pub async fn get_task_tracking_info(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTaskTrackingInfoRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TaskTrackingInfo>,
            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(
                "/maps.fleetengine.delivery.v1.DeliveryService/GetTaskTrackingInfo",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "GetTaskTrackingInfo",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets all `DeliveryVehicle`s that meet the specified filtering criteria.
        pub async fn list_delivery_vehicles(
            &mut self,
            request: impl tonic::IntoRequest<super::ListDeliveryVehiclesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListDeliveryVehiclesResponse>,
            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(
                "/maps.fleetengine.delivery.v1.DeliveryService/ListDeliveryVehicles",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "maps.fleetengine.delivery.v1.DeliveryService",
                        "ListDeliveryVehicles",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}