Struct google_api_proto::google::maps::routeoptimization::v1::shipment_route::Transition
source · pub struct Transition {
pub travel_duration: Option<Duration>,
pub travel_distance_meters: f64,
pub traffic_info_unavailable: bool,
pub delay_duration: Option<Duration>,
pub break_duration: Option<Duration>,
pub wait_duration: Option<Duration>,
pub total_duration: Option<Duration>,
pub start_time: Option<Timestamp>,
pub route_polyline: Option<EncodedPolyline>,
pub vehicle_loads: BTreeMap<String, VehicleLoad>,
}
Expand description
Transition between two events on the route. See the description of [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute].
If the vehicle does not have a start_location
and/or end_location
, the
corresponding travel metrics are 0.
Fields§
§travel_duration: Option<Duration>
Travel duration during this transition.
travel_distance_meters: f64
Distance traveled during the transition.
When traffic is requested via
[OptimizeToursRequest.consider_road_traffic]
[google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic],
and the traffic info couldn’t be retrieved for a Transition
, this
boolean is set to true. This may be temporary (rare hiccup in the
realtime traffic servers) or permanent (no data for this location).
delay_duration: Option<Duration>
Sum of the delay durations applied to this transition. If any, the delay
starts exactly delay_duration
seconds before the next event (visit or
vehicle end). See
[TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay].
break_duration: Option<Duration>
Sum of the duration of the breaks occurring during this transition, if any. Details about each break’s start time and duration are stored in [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks].
wait_duration: Option<Duration>
Time spent waiting during this transition. Wait duration corresponds to idle time and does not include break time. Also note that this wait time may be split into several non-contiguous intervals.
total_duration: Option<Duration>
Total duration of the transition, provided for convenience. It is equal to:
- next visit
start_time
(orvehicle_end_time
if this is the last transition) - this transition’sstart_time
; - if
ShipmentRoute.has_traffic_infeasibilities
is false, the following additionally holds: `total_duration = travel_duration + delay_duration
- break_duration + wait_duration`.
start_time: Option<Timestamp>
Start time of this transition.
route_polyline: Option<EncodedPolyline>
The encoded polyline representation of the route followed during the transition. This field is only populated if [populate_transition_polylines] [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] is set to true.
vehicle_loads: BTreeMap<String, VehicleLoad>
Vehicle loads during this transition, for each type that either appears in this vehicle’s [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], or that have non-zero [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] on some shipment performed on this route.
The loads during the first transition are the starting loads of the
vehicle route. Then, after each visit, the visit’s load_demands
are
either added or subtracted to get the next transition’s loads, depending
on whether the visit was a pickup or a delivery.
Trait Implementations§
source§impl Clone for Transition
impl Clone for Transition
source§fn clone(&self) -> Transition
fn clone(&self) -> Transition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Transition
impl Debug for Transition
source§impl Default for Transition
impl Default for Transition
source§impl Message for Transition
impl Message for Transition
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 Transition
impl PartialEq for Transition
source§fn eq(&self, other: &Transition) -> bool
fn eq(&self, other: &Transition) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl Freeze for Transition
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnwindSafe for Transition
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