Reference documentation and code samples for the Google Maps FleetEngine Delivery V1 Client class 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.
Generated from protobuf message maps.fleetengine.delivery.v1.DeliveryVehicle
Namespace
Google \ Maps \ FleetEngine \ Delivery \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The unique name of this Delivery Vehicle. The format is providers/{provider}/deliveryVehicles/{vehicle}
.
↳ last_location
↳ past_locations
array< DeliveryVehicleLocation
>
Input only. Locations where this Delivery Vehicle has been in the past that haven't yet been reported to Fleet Engine. This is used in UpdateDeliveryVehicleRequest
to record locations which were previously unable to be sent to the server. Typically this happens when the Delivery Vehicle does not have internet connectivity.
↳ navigation_status
int
The Delivery Vehicle's navigation status.
↳ current_route_segment
string
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 LatLng
s are returned in Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path
(gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path
(REST) for all active Tasks assigned to the Vehicle. There are a few cases where this field might not be used to populate Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path
(gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path
(REST): * * The endpoint of the current_route_segment
does not match DeliveryVehicle.remaining_vehicle_journey_segments[0].stop
(gRPC) or DeliveryVehicle.remainingVehicleJourneySegments[0].stop
(REST). * * The driver app has not updated its location recently, so the last updated value for this field might be stale. * * The driver app has recently updated its location, but the current_route_segment
is stale, and points to a previous vehicle stop. 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.
↳ current_route_segment_end_point
Google\Type\LatLng
The location where the current_route_segment
ends. This is not currently populated by the driver app, but you can supply it on UpdateDeliveryVehicle
calls. It is either the LatLng
from the upcoming vehicle stop, or the last LatLng
of the current_route_segment
. Fleet Engine will then do its best to interpolate to an actual VehicleStop
. This field is ignored in UpdateDeliveryVehicle
calls if the current_route_segment
field is empty.
↳ remaining_distance_meters
Google\Protobuf\Int32Value
The remaining driving distance for the current_route_segment
. The Driver app typically provides this field, but there are some circumstances in which Fleet Engine will override the value sent by the app. For more information, see DeliveryVehicle.current_route_segment
. This field is returned in Task.remaining_vehicle_journey_segments[0].driving_distance_meters
(gRPC) or Task.remainingVehicleJourneySegments[0].drivingDistanceMeters
(REST) for all active Task
s assigned to the Delivery Vehicle. Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
↳ remaining_duration
Google\Protobuf\Duration
The remaining driving time for the current_route_segment
. The Driver app typically provides this field, but there are some circumstances in which Fleet Engine will override the value sent by the app. For more information, see DeliveryVehicle.current_route_segment
. This field is returned in Task.remaining_vehicle_journey_segments[0].driving_duration
(gRPC) or Task.remainingVehicleJourneySegments[0].drivingDuration
(REST) for all active tasks assigned to the Delivery Vehicle. Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
↳ remaining_vehicle_journey_segments
array< VehicleJourneySegment
>
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 ListDeliveryVehicles
.
↳ attributes
array< DeliveryVehicleAttribute
>
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
int
The type of this delivery vehicle. If unset, this will default to AUTO
.
getName
The unique name of this Delivery Vehicle.
The format is providers/{provider}/deliveryVehicles/{vehicle}
.
string
setName
The unique name of this Delivery Vehicle.
The format is providers/{provider}/deliveryVehicles/{vehicle}
.
var
string
$this
getLastLocation
The last reported location of the Delivery Vehicle.
hasLastLocation
clearLastLocation
setLastLocation
The last reported location of the Delivery Vehicle.
$this
getPastLocations
Input only. Locations where this Delivery Vehicle has been in the past that
haven't yet been reported to Fleet Engine. This is used in UpdateDeliveryVehicleRequest
to record locations which were previously
unable to be sent to the server. Typically this happens when the Delivery
Vehicle does not have internet connectivity.
setPastLocations
Input only. Locations where this Delivery Vehicle has been in the past that
haven't yet been reported to Fleet Engine. This is used in UpdateDeliveryVehicleRequest
to record locations which were previously
unable to be sent to the server. Typically this happens when the Delivery
Vehicle does not have internet connectivity.
$this
getNavigationStatus
The Delivery Vehicle's navigation status.
int
setNavigationStatus
The Delivery Vehicle's navigation status.
var
int
$this
getCurrentRouteSegment
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 LatLng
s are returned in Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path
(gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path
(REST) for all active Tasks assigned to the Vehicle.
There are a few cases where this field might not be used to populate Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path
(gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path
(REST):
- The endpoint of the
current_route_segment
does not matchDeliveryVehicle.remaining_vehicle_journey_segments[0].stop
(gRPC) orDeliveryVehicle.remainingVehicleJourneySegments[0].stop
(REST). - The driver app has not updated its location recently, so the last updated value for this field might be stale.
- The driver app has recently updated its location, but the
current_route_segment
is stale, and points to a previous vehicle stop. 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.
string
setCurrentRouteSegment
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 LatLng
s are returned in Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path
(gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path
(REST) for all active Tasks assigned to the Vehicle.
There are a few cases where this field might not be used to populate Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path
(gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path
(REST):
- The endpoint of the
current_route_segment
does not matchDeliveryVehicle.remaining_vehicle_journey_segments[0].stop
(gRPC) orDeliveryVehicle.remainingVehicleJourneySegments[0].stop
(REST). - The driver app has not updated its location recently, so the last updated value for this field might be stale.
- The driver app has recently updated its location, but the
current_route_segment
is stale, and points to a previous vehicle stop. 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.
var
string
$this
getCurrentRouteSegmentEndPoint
The location where the current_route_segment
ends. This is not currently
populated by the driver app, but you can supply it on UpdateDeliveryVehicle
calls. It is either the LatLng
from the upcoming
vehicle stop, or the last LatLng
of the current_route_segment
. Fleet
Engine will then do its best to interpolate to an actual VehicleStop
.
This field is ignored in UpdateDeliveryVehicle
calls if the current_route_segment
field is empty.
hasCurrentRouteSegmentEndPoint
clearCurrentRouteSegmentEndPoint
setCurrentRouteSegmentEndPoint
The location where the current_route_segment
ends. This is not currently
populated by the driver app, but you can supply it on UpdateDeliveryVehicle
calls. It is either the LatLng
from the upcoming
vehicle stop, or the last LatLng
of the current_route_segment
. Fleet
Engine will then do its best to interpolate to an actual VehicleStop
.
This field is ignored in UpdateDeliveryVehicle
calls if the current_route_segment
field is empty.
$this
getRemainingDistanceMeters
The remaining driving distance for the current_route_segment
.
The Driver app typically provides this field, but there are some
circumstances in which Fleet Engine will override the value sent by the
app. For more information, see DeliveryVehicle.current_route_segment
.
This field is returned in Task.remaining_vehicle_journey_segments[0].driving_distance_meters
(gRPC)
or Task.remainingVehicleJourneySegments[0].drivingDistanceMeters
(REST)
for all active Task
s assigned to the Delivery Vehicle.
Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
hasRemainingDistanceMeters
clearRemainingDistanceMeters
getRemainingDistanceMetersUnwrapped
Returns the unboxed value from getRemainingDistanceMeters()
The remaining driving distance for the current_route_segment
.
The Driver app typically provides this field, but there are some
circumstances in which Fleet Engine will override the value sent by the
app. For more information, see DeliveryVehicle.current_route_segment
.
This field is returned in Task.remaining_vehicle_journey_segments[0].driving_distance_meters
(gRPC)
or Task.remainingVehicleJourneySegments[0].drivingDistanceMeters
(REST)
for all active Task
s assigned to the Delivery Vehicle.
Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
int|null
setRemainingDistanceMeters
The remaining driving distance for the current_route_segment
.
The Driver app typically provides this field, but there are some
circumstances in which Fleet Engine will override the value sent by the
app. For more information, see DeliveryVehicle.current_route_segment
.
This field is returned in Task.remaining_vehicle_journey_segments[0].driving_distance_meters
(gRPC)
or Task.remainingVehicleJourneySegments[0].drivingDistanceMeters
(REST)
for all active Task
s assigned to the Delivery Vehicle.
Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
$this
setRemainingDistanceMetersUnwrapped
Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
The remaining driving distance for the current_route_segment
.
The Driver app typically provides this field, but there are some
circumstances in which Fleet Engine will override the value sent by the
app. For more information, see DeliveryVehicle.current_route_segment
.
This field is returned in Task.remaining_vehicle_journey_segments[0].driving_distance_meters
(gRPC)
or Task.remainingVehicleJourneySegments[0].drivingDistanceMeters
(REST)
for all active Task
s assigned to the Delivery Vehicle.
Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
var
int|null
$this
getRemainingDuration
The remaining driving time for the current_route_segment
.
The Driver app typically provides this field, but there are some
circumstances in which Fleet Engine will override the value sent by the
app. For more information, see DeliveryVehicle.current_route_segment
.
This field is returned in Task.remaining_vehicle_journey_segments[0].driving_duration
(gRPC) or Task.remainingVehicleJourneySegments[0].drivingDuration
(REST) for all
active tasks assigned to the Delivery Vehicle.
Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
hasRemainingDuration
clearRemainingDuration
setRemainingDuration
The remaining driving time for the current_route_segment
.
The Driver app typically provides this field, but there are some
circumstances in which Fleet Engine will override the value sent by the
app. For more information, see DeliveryVehicle.current_route_segment
.
This field is returned in Task.remaining_vehicle_journey_segments[0].driving_duration
(gRPC) or Task.remainingVehicleJourneySegments[0].drivingDuration
(REST) for all
active tasks assigned to the Delivery Vehicle.
Fleet Engine ignores this field in UpdateDeliveryVehicleRequest
if the current_route_segment
field is empty.
$this
getRemainingVehicleJourneySegments
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 ListDeliveryVehicles
.
setRemainingVehicleJourneySegments
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 ListDeliveryVehicles
.
$this
getAttributes
A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have at most 100 attributes, and each attribute must have a unique key.
setAttributes
A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have at most 100 attributes, and each attribute must have a unique key.
$this
getType
The type of this delivery vehicle. If unset, this will default to AUTO
.
int
setType
The type of this delivery vehicle. If unset, this will default to AUTO
.
var
int
$this