- Resource: DeliveryVehicle
- DeliveryVehicleNavigationStatus
- DeliveryVehicleAttribute
- DeliveryVehicleType
- Methods
Resource: DeliveryVehicle
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.
JSON representation |
---|
{ "name": string, "lastLocation": { object ( |
Fields | |
---|---|
name |
The unique name of this Delivery Vehicle. The format is |
last |
The last reported location of the Delivery Vehicle. |
navigation |
The Delivery Vehicle's navigation status. |
current |
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 There are a few cases where this field might not be used to populate
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. A base64-encoded string. |
current |
The location where the This field is ignored in |
remaining |
The remaining driving distance for the Fleet Engine ignores this field in |
remaining |
The remaining driving time for the Fleet Engine ignores this field in A duration in seconds with up to nine fractional digits, ending with ' |
remaining |
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 |
attributes[] |
A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have at most 100 attributes, and each attribute must have a unique key. |
type |
The type of this delivery vehicle. If unset, this will default to |
DeliveryVehicleAttribute
Describes a vehicle attribute as a key-value pair. The "key:value" string length cannot exceed 256 characters.
JSON representation |
---|
{ "key": string, "value": string, // Union field |
Fields | |
---|---|
key |
The attribute's key. |
value |
The attribute's value. |
Union field delivery_vehicle_attribute_value . The attribute's value, can be in string, bool, or double type. delivery_vehicle_attribute_value can be only one of the following: |
|
string |
String typed attribute value. Note: This is identical to the |
bool |
Boolean typed attribute value. |
number |
Double typed attribute value. |
DeliveryVehicleType
The type of delivery vehicle.
Enums | |
---|---|
DELIVERY_VEHICLE_TYPE_UNSPECIFIED |
The value is unused. |
AUTO |
An automobile. |
TWO_WHEELER |
A motorcycle, moped, or other two-wheeled vehicle |
BICYCLE |
Human-powered transport. |
PEDESTRIAN |
A human transporter, typically walking or running, traveling along pedestrian pathways. |
Methods |
|
---|---|
|
Creates and returns a new DeliveryVehicle . |
|
Returns the specified DeliveryVehicle instance. |
|
Gets all DeliveryVehicle s that meet the specified filtering criteria. |
|
Writes updated DeliveryVehicle data to Fleet Engine, and assigns Tasks to the DeliveryVehicle . |