VehicleJourneySegment

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 Tasks 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 LatLngs 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 Tasks.

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 Tasks 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 Tasks 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.