Google Maps FleetEngine Delivery V1 Client - Class VehicleJourneySegment (0.1.2)

Reference documentation and code samples for the Google Maps FleetEngine Delivery V1 Client class 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.

Generated from protobuf message maps.fleetengine.delivery.v1.VehicleJourneySegment

Namespace

Google \ Maps \ FleetEngine \ Delivery \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ stop Google\Maps\FleetEngine\Delivery\V1\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.

↳ driving_distance_meters Google\Protobuf\Int32Value

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.

↳ driving_duration Google\Protobuf\Duration

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.

↳ path array<Google\Type\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.

getStop

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.

Returns
Type Description
Google\Maps\FleetEngine\Delivery\V1\VehicleStop|null

hasStop

clearStop

setStop

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.

Parameter
Name Description
var Google\Maps\FleetEngine\Delivery\V1\VehicleStop
Returns
Type Description
$this

getDrivingDistanceMeters

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.

Returns
Type Description
Google\Protobuf\Int32Value|null

hasDrivingDistanceMeters

clearDrivingDistanceMeters

getDrivingDistanceMetersUnwrapped

Returns the unboxed value from getDrivingDistanceMeters()

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.

Returns
Type Description
int|null

setDrivingDistanceMeters

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.

Parameter
Name Description
var Google\Protobuf\Int32Value
Returns
Type Description
$this

setDrivingDistanceMetersUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.

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.

Parameter
Name Description
var int|null
Returns
Type Description
$this

getDrivingDuration

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.

Returns
Type Description
Google\Protobuf\Duration|null

hasDrivingDuration

clearDrivingDuration

setDrivingDuration

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.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getPath

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.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPath

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.

Parameter
Name Description
var array<Google\Type\LatLng>
Returns
Type Description
$this