VehicleJourneySegment
Stay organized with collections
Save and categorize content based on your preferences.
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.
JSON representation |
{
"stop": {
object (VehicleStop )
},
"drivingDistanceMeters": integer,
"drivingDuration": string,
"path": [
{
object (LatLng )
}
]
} |
Fields |
stop |
object (VehicleStop )
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 .
|
drivingDistanceMeters |
integer
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 .
|
drivingDuration |
string (Duration format)
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. A duration in seconds with up to nine fractional digits, ending with 's '. Example: "3.5s" .
|
path[] |
object (LatLng )
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.
|
VehicleStop
Describes a point where a Vehicle stops to perform one or more Task
s.
JSON representation |
{
"plannedLocation": {
object (LocationInfo )
},
"tasks": [
{
object (TaskInfo )
}
],
"state": enum (State )
} |
Fields |
plannedLocation |
object (LocationInfo )
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 tasks.get call.
|
tasks[] |
object (TaskInfo )
The list of Task s to be performed at this stop. This field won't be populated in the response of a tasks.get call.
|
state |
enum (State )
The state of the VehicleStop . This field won't be populated in the response of a tasks.get call.
|
TaskInfo
Additional information about the Task performed at this stop.
JSON representation |
{
"taskId": string,
"taskDuration": string,
"targetTimeWindow": {
object (TimeWindow )
}
} |
Fields |
taskId |
string
The Task ID. This field won't be populated in the response of a tasks.get 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.
- May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.
|
taskDuration |
string (Duration format)
Output only. The time required to perform the Task. A duration in seconds with up to nine fractional digits, ending with 's '. Example: "3.5s" .
|
targetTimeWindow |
object (TimeWindow )
Output only. The time window during which the task should be completed. This is only set in the response to deliveryVehicles.get .
|
State
The current state of a VehicleStop
.
Enums |
STATE_UNSPECIFIED |
Unknown. |
NEW |
Created, but not actively routing. |
ENROUTE |
Assigned and actively routing. |
ARRIVED |
Arrived at stop. Assumes that when the Vehicle is routing to the next stop, that all previous stops have been completed. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eVehicleJourneySegment\u003c/code\u003e represents a Vehicle's travel from a previous stop to the current one, including distance, duration, and path.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eVehicleStop\u003c/code\u003e describes a location where a Vehicle stops to perform tasks, specifying the location, tasks, and stop state.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTaskInfo\u003c/code\u003e provides additional details about a task at a stop, such as the task ID, duration, and target completion timeframe.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eState\u003c/code\u003e indicates the current status of a \u003ccode\u003eVehicleStop\u003c/code\u003e, such as \u003ccode\u003eNEW\u003c/code\u003e, \u003ccode\u003eENROUTE\u003c/code\u003e, or \u003ccode\u003eARRIVED\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]