Skip to content

Commit 302273a

Browse files
Google APIscopybara-github
authored andcommitted
feat: add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version
PiperOrigin-RevId: 781185838
1 parent 600ff06 commit 302273a

File tree

5 files changed

+56
-8
lines changed

5 files changed

+56
-8
lines changed

google/maps/fleetengine/delivery/v1/common.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,19 @@ message DeliveryVehicleLocation {
144144
// Accuracy of `raw_location` as a radius, in meters.
145145
google.protobuf.DoubleValue raw_location_accuracy = 25;
146146

147+
// The location from Android's Fused Location Provider.
148+
google.type.LatLng flp_location = 29;
149+
150+
// Update timestamp of the `flp_location`
151+
google.protobuf.Timestamp flp_update_time = 30;
152+
153+
// Accuracy of `flp_location` in meters as a radius.
154+
google.protobuf.DoubleValue flp_latlng_accuracy_meters = 31;
155+
156+
// Direction the vehicle is moving in degrees, as determined by the Fused
157+
// Location Provider. 0 represents North. The valid range is [0,360).
158+
google.protobuf.Int32Value flp_heading_degrees = 32;
159+
147160
// Supplemental location provided by the integrating app.
148161
google.type.LatLng supplemental_location = 18;
149162

google/maps/fleetengine/v1/fleetengine.proto

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,19 @@ message VehicleLocation {
282282
// Accuracy of `raw_location` as a radius, in meters.
283283
google.protobuf.DoubleValue raw_location_accuracy = 25;
284284

285+
// The location from Android's Fused Location Provider.
286+
google.type.LatLng flp_location = 29;
287+
288+
// Update timestamp of `flp_location`.
289+
google.protobuf.Timestamp flp_update_time = 30;
290+
291+
// Accuracy of `flp_location` in meters as a radius.
292+
google.protobuf.DoubleValue flp_latlng_accuracy_meters = 31;
293+
294+
// Direction the vehicle is moving in degrees, as determined by the Fused
295+
// Location Provider. 0 represents North. The valid range is [0,360).
296+
google.protobuf.Int32Value flp_heading_degrees = 32;
297+
285298
// Supplemental location provided by the integrating app.
286299
google.type.LatLng supplemental_location = 18;
287300

@@ -335,3 +348,22 @@ enum LocationSensor {
335348
// The location provider on Apple operating systems.
336349
CORE_LOCATION = 200;
337350
}
351+
352+
// Describes a trip attribute as a key-value pair. The "key:value" string length
353+
// cannot exceed 256 characters.
354+
message TripAttribute {
355+
// The attribute's key. Keys may not contain the colon character (:).
356+
string key = 1;
357+
358+
// The attribute's value, can be in string, bool, or double type.
359+
oneof trip_attribute_value {
360+
// String typed attribute value.
361+
string string_value = 2;
362+
363+
// Boolean typed attribute value.
364+
bool bool_value = 3;
365+
366+
// Double typed attribute value.
367+
double number_value = 4;
368+
}
369+
}

google/maps/fleetengine/v1/traffic.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ message SpeedReadingInterval {
3434
// Default value. This value is unused.
3535
SPEED_UNSPECIFIED = 0;
3636

37-
// Normal speed, no slowdown is detected.
37+
// Normal speed, no traffic delays.
3838
NORMAL = 1;
3939

40-
// Slowdown detected, but no traffic jam formed.
40+
// Slowdown detected, medium amount of traffic.
4141
SLOW = 2;
4242

43-
// Traffic jam detected.
43+
// Traffic delays.
4444
TRAFFIC_JAM = 3;
4545
}
4646

google/maps/fleetengine/v1/trip_api.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ message GetTripRequest {
222222
// If a minimum is unspecified, the route data are always retrieved.
223223
google.protobuf.Timestamp current_route_segment_version = 6;
224224

225-
// Indicates the minimum timestamp (exclusive) for which
226-
// `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
227-
// timestamp, the `remaining_waypoints` are not set in the response. If this
228-
// field is unspecified, `remaining_waypoints` is always retrieved.
229-
google.protobuf.Timestamp remaining_waypoints_version = 7;
225+
// Deprecated: `Trip.remaining_waypoints` are always retrieved. Use
226+
// `remaining_waypoints_route_version` to control when
227+
// `Trip.remaining_waypoints.traffic_to_waypoint` and
228+
// `Trip.remaining_waypoints.path_to_waypoint` data are retrieved.
229+
google.protobuf.Timestamp remaining_waypoints_version = 7 [deprecated = true];
230230

231231
// The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
232232
// or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default

google/maps/fleetengine/v1/trips.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ message Trip {
224224
// The subset of Trip fields that are populated and how they should be
225225
// interpreted.
226226
TripView view = 31;
227+
228+
// A list of custom Trip attributes. Each attribute must have a unique key.
229+
repeated TripAttribute attributes = 35;
227230
}
228231

229232
// The actual location where a stop (pickup/dropoff) happened.

0 commit comments

Comments
 (0)