@googlemaps/fleetengine-delivery 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,247 @@
1
+ // Copyright 2023 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package maps.fleetengine.delivery.v1;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/protobuf/timestamp.proto";
21
+ import "google/protobuf/wrappers.proto";
22
+ import "google/type/latlng.proto";
23
+
24
+ option csharp_namespace = "Google.Maps.FleetEngine.Delivery.V1";
25
+ option go_package = "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb";
26
+ option java_multiple_files = true;
27
+ option java_outer_classname = "Common";
28
+ option java_package = "google.maps.fleetengine.delivery.v1";
29
+ option objc_class_prefix = "CFED";
30
+
31
+ // Describes a vehicle attribute as a key-value pair. The "key:value" string
32
+ // length cannot exceed 256 characters.
33
+ message DeliveryVehicleAttribute {
34
+ // The attribute's key.
35
+ string key = 1;
36
+
37
+ // The attribute's value.
38
+ string value = 2;
39
+
40
+ // The attribute's value, can be in string, bool, or double type.
41
+ oneof delivery_vehicle_attribute_value {
42
+ // String typed attribute value.
43
+ //
44
+ // Note: This is identical to the `value` field which will eventually be
45
+ // deprecated. For create or update methods, either field can be used, but
46
+ // it's strongly recommended to use `string_value`. If both `string_value`
47
+ // and `value` are set, they must be identical or an error will be thrown.
48
+ // Both fields are populated in responses.
49
+ string string_value = 3;
50
+
51
+ // Boolean typed attribute value.
52
+ bool bool_value = 4;
53
+
54
+ // Double typed attribute value.
55
+ double number_value = 5;
56
+ }
57
+ }
58
+
59
+ // The location, speed, and heading of a vehicle at a point in time.
60
+ message DeliveryVehicleLocation {
61
+ // The location of the vehicle.
62
+ // When it is sent to Fleet Engine, the vehicle's location is a GPS location.
63
+ // When you receive it in a response, the vehicle's location can be either a
64
+ // GPS location, a supplemental location, or some other estimated location.
65
+ // The source is specified in `location_sensor`.
66
+ google.type.LatLng location = 1;
67
+
68
+ // Deprecated: Use `latlng_accuracy` instead.
69
+ google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true];
70
+
71
+ // Accuracy of `location` in meters as a radius.
72
+ google.protobuf.DoubleValue latlng_accuracy = 22;
73
+
74
+ // Direction the vehicle is moving in degrees. 0 represents North.
75
+ // The valid range is [0,360).
76
+ google.protobuf.Int32Value heading = 2;
77
+
78
+ // Deprecated: Use `heading_accuracy` instead.
79
+ google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true];
80
+
81
+ // Accuracy of `heading` in degrees.
82
+ google.protobuf.DoubleValue heading_accuracy = 23;
83
+
84
+ // Altitude in meters above WGS84.
85
+ google.protobuf.DoubleValue altitude = 5;
86
+
87
+ // Deprecated: Use `altitude_accuracy` instead.
88
+ google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true];
89
+
90
+ // Accuracy of `altitude` in meters.
91
+ google.protobuf.DoubleValue altitude_accuracy = 24;
92
+
93
+ // Speed of the vehicle in kilometers per hour.
94
+ // Deprecated: Use `speed` instead.
95
+ google.protobuf.Int32Value speed_kmph = 3 [deprecated = true];
96
+
97
+ // Speed of the vehicle in meters/second
98
+ google.protobuf.DoubleValue speed = 6;
99
+
100
+ // Accuracy of `speed` in meters/second.
101
+ google.protobuf.DoubleValue speed_accuracy = 7;
102
+
103
+ // The time when `location` was reported by the sensor according to the
104
+ // sensor's clock.
105
+ google.protobuf.Timestamp update_time = 4;
106
+
107
+ // Output only. The time when the server received the location information.
108
+ google.protobuf.Timestamp server_time = 13
109
+ [(google.api.field_behavior) = OUTPUT_ONLY];
110
+
111
+ // Provider of location data (for example, `GPS`).
112
+ DeliveryVehicleLocationSensor location_sensor = 11;
113
+
114
+ // Whether `location` is snapped to a road.
115
+ google.protobuf.BoolValue is_road_snapped = 27;
116
+
117
+ // Input only. Indicates whether the GPS sensor is enabled on the mobile
118
+ // device.
119
+ google.protobuf.BoolValue is_gps_sensor_enabled = 12
120
+ [(google.api.field_behavior) = INPUT_ONLY];
121
+
122
+ // Input only. Time (in seconds) since this location was first sent to the
123
+ // server. This will be zero for the first update. If the time is unknown (for
124
+ // example, when the app restarts), this value resets to zero.
125
+ google.protobuf.Int32Value time_since_update = 14
126
+ [(google.api.field_behavior) = INPUT_ONLY];
127
+
128
+ // Input only. Deprecated: Other signals are now used to determine if a
129
+ // location is stale.
130
+ google.protobuf.Int32Value num_stale_updates = 15
131
+ [deprecated = true, (google.api.field_behavior) = INPUT_ONLY];
132
+
133
+ // Raw vehicle location (unprocessed by road-snapper).
134
+ google.type.LatLng raw_location = 16;
135
+
136
+ // Timestamp associated with the raw location.
137
+ google.protobuf.Timestamp raw_location_time = 17;
138
+
139
+ // Source of the raw location. Defaults to `GPS`.
140
+ DeliveryVehicleLocationSensor raw_location_sensor = 28;
141
+
142
+ // Accuracy of `raw_location` as a radius, in meters.
143
+ google.protobuf.DoubleValue raw_location_accuracy = 25;
144
+
145
+ // Supplemental location provided by the integrating app.
146
+ google.type.LatLng supplemental_location = 18;
147
+
148
+ // Timestamp associated with the supplemental location.
149
+ google.protobuf.Timestamp supplemental_location_time = 19;
150
+
151
+ // Source of the supplemental location. Defaults to
152
+ // `CUSTOMER_SUPPLIED_LOCATION`.
153
+ DeliveryVehicleLocationSensor supplemental_location_sensor = 20;
154
+
155
+ // Accuracy of `supplemental_location` as a radius, in meters.
156
+ google.protobuf.DoubleValue supplemental_location_accuracy = 21;
157
+
158
+ // Deprecated: Use `is_road_snapped` instead.
159
+ bool road_snapped = 26 [deprecated = true];
160
+ }
161
+
162
+ // The sensor or methodology used to determine the location.
163
+ enum DeliveryVehicleLocationSensor {
164
+ // The sensor is unspecified or unknown.
165
+ UNKNOWN_SENSOR = 0;
166
+
167
+ // GPS or Assisted GPS.
168
+ GPS = 1;
169
+
170
+ // Assisted GPS, cell tower ID, or WiFi access point.
171
+ NETWORK = 2;
172
+
173
+ // Cell tower ID or WiFi access point.
174
+ PASSIVE = 3;
175
+
176
+ // A location determined by the mobile device to be the most likely
177
+ // road position.
178
+ ROAD_SNAPPED_LOCATION_PROVIDER = 4;
179
+
180
+ // A customer-supplied location from an independent source. Typically, this
181
+ // value is used for a location provided from sources other than the mobile
182
+ // device running Driver SDK. If the original source is described by one of
183
+ // the other enum values, use that value. Locations marked
184
+ // CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's
185
+ // `last_location.supplemental_location_sensor`.
186
+ CUSTOMER_SUPPLIED_LOCATION = 5;
187
+
188
+ // A location calculated by Fleet Engine based on the signals available to it.
189
+ // Output only. This value will be rejected if it is received in a request.
190
+ FLEET_ENGINE_LOCATION = 6;
191
+
192
+ // Android's Fused Location Provider.
193
+ FUSED_LOCATION_PROVIDER = 100;
194
+
195
+ // The location provider on Apple operating systems.
196
+ CORE_LOCATION = 200;
197
+ }
198
+
199
+ // The vehicle's navigation status.
200
+ enum DeliveryVehicleNavigationStatus {
201
+ // Unspecified navigation status.
202
+ UNKNOWN_NAVIGATION_STATUS = 0;
203
+
204
+ // The Driver app's navigation is in `FREE_NAV` mode.
205
+ NO_GUIDANCE = 1;
206
+
207
+ // Turn-by-turn navigation is available and the Driver app navigation has
208
+ // entered `GUIDED_NAV` mode.
209
+ ENROUTE_TO_DESTINATION = 2;
210
+
211
+ // The vehicle has gone off the suggested route.
212
+ OFF_ROUTE = 3;
213
+
214
+ // The vehicle is within approximately 50m of the destination.
215
+ ARRIVED_AT_DESTINATION = 4;
216
+ }
217
+
218
+ // A time range.
219
+ message TimeWindow {
220
+ // Required. The start time of the time window (inclusive).
221
+ google.protobuf.Timestamp start_time = 1
222
+ [(google.api.field_behavior) = REQUIRED];
223
+
224
+ // Required. The end time of the time window (inclusive).
225
+ google.protobuf.Timestamp end_time = 2
226
+ [(google.api.field_behavior) = REQUIRED];
227
+ }
228
+
229
+ // Describes a task attribute as a key-value pair. The "key:value" string length
230
+ // cannot exceed 256 characters.
231
+ message TaskAttribute {
232
+ // The attribute's key. Keys may not contain the colon character (:).
233
+ string key = 1;
234
+
235
+ // The attribute's value, can be in string, bool, or double type. If none are
236
+ // set the TaskAttribute string_value will be stored as the empty string "".
237
+ oneof task_attribute_value {
238
+ // String typed attribute value.
239
+ string string_value = 2;
240
+
241
+ // Boolean typed attribute value.
242
+ bool bool_value = 3;
243
+
244
+ // Double typed attribute value.
245
+ double number_value = 4;
246
+ }
247
+ }