Struct google_api_proto::maps::fleetengine::delivery::v1::DeliveryVehicle
source · pub struct DeliveryVehicle {
pub name: String,
pub last_location: Option<DeliveryVehicleLocation>,
pub navigation_status: i32,
pub current_route_segment: Bytes,
pub current_route_segment_end_point: Option<LatLng>,
pub remaining_distance_meters: Option<i32>,
pub remaining_duration: Option<Duration>,
pub remaining_vehicle_journey_segments: Vec<VehicleJourneySegment>,
pub attributes: Vec<DeliveryVehicleAttribute>,
pub type: i32,
}
Expand description
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.
Fields§
§name: String
The unique name of this Delivery Vehicle.
The format is providers/{provider}/deliveryVehicles/{vehicle}
.
last_location: Option<DeliveryVehicleLocation>
The last reported location of the Delivery Vehicle.
The Delivery Vehicle’s navigation status.
current_route_segment: Bytes
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.
current_route_segment_end_point: Option<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: Option<i32>
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][maps.fleetengine.delivery.v1.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: Option<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][maps.fleetengine.delivery.v1.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: Vec<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: Vec<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: i32
The type of this delivery vehicle. If unset, this will default to AUTO
.
Implementations§
source§impl DeliveryVehicle
impl DeliveryVehicle
Returns the enum value of navigation_status
, or the default if the field is set to an invalid enum value.
Sets navigation_status
to the provided enum value.
sourcepub fn type(&self) -> DeliveryVehicleType
pub fn type(&self) -> DeliveryVehicleType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_type(&mut self, value: DeliveryVehicleType)
pub fn set_type(&mut self, value: DeliveryVehicleType)
Sets type
to the provided enum value.
Trait Implementations§
source§impl Clone for DeliveryVehicle
impl Clone for DeliveryVehicle
source§fn clone(&self) -> DeliveryVehicle
fn clone(&self) -> DeliveryVehicle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DeliveryVehicle
impl Debug for DeliveryVehicle
source§impl Default for DeliveryVehicle
impl Default for DeliveryVehicle
source§impl Message for DeliveryVehicle
impl Message for DeliveryVehicle
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for DeliveryVehicle
impl PartialEq for DeliveryVehicle
source§fn eq(&self, other: &DeliveryVehicle) -> bool
fn eq(&self, other: &DeliveryVehicle) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DeliveryVehicle
Auto Trait Implementations§
impl !Freeze for DeliveryVehicle
impl RefUnwindSafe for DeliveryVehicle
impl Send for DeliveryVehicle
impl Sync for DeliveryVehicle
impl Unpin for DeliveryVehicle
impl UnwindSafe for DeliveryVehicle
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request