pub struct TransitionAttributes {
pub src_tag: String,
pub excluded_src_tag: String,
pub dst_tag: String,
pub excluded_dst_tag: String,
pub cost: f64,
pub cost_per_kilometer: f64,
pub distance_limit: Option<DistanceLimit>,
pub delay: Option<Duration>,
}
Expand description
Specifies attributes of transitions between two consecutive visits on a
route. Several TransitionAttributes
may apply to the same transition: in
that case, all extra costs add up and the strictest constraint or limit
applies (following natural “AND” semantics).
Fields§
§src_tag: String
Tags defining the set of (src->dst) transitions these attributes apply to.
A source visit or vehicle start matches iff its
[VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags]
or
[Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]
either contains src_tag
or does not contain excluded_src_tag
(depending
on which of these two fields is non-empty).
excluded_src_tag: String
See src_tag
. Exactly one of src_tag
and excluded_src_tag
must be
non-empty.
dst_tag: String
A destination visit or vehicle end matches iff its
[VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags]
or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags]
either contains dst_tag
or does not contain excluded_dst_tag
(depending
on which of these two fields is non-empty).
excluded_dst_tag: String
See dst_tag
. Exactly one of dst_tag
and excluded_dst_tag
must be
non-empty.
cost: f64
Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.
cost_per_kilometer: f64
Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] specified on vehicles.
distance_limit: Option<DistanceLimit>
Specifies a limit on the distance traveled while performing this transition.
As of 2021/06, only soft limits are supported.
delay: Option<Duration>
Specifies a delay incurred when performing this transition.
This delay always occurs after finishing the source visit and before starting the destination visit.
Trait Implementations§
Source§impl Clone for TransitionAttributes
impl Clone for TransitionAttributes
Source§fn clone(&self) -> TransitionAttributes
fn clone(&self) -> TransitionAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TransitionAttributes
impl Debug for TransitionAttributes
Source§impl Default for TransitionAttributes
impl Default for TransitionAttributes
Source§impl Message for TransitionAttributes
impl Message for TransitionAttributes
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 TransitionAttributes
impl PartialEq for TransitionAttributes
impl StructuralPartialEq for TransitionAttributes
Auto Trait Implementations§
impl Freeze for TransitionAttributes
impl RefUnwindSafe for TransitionAttributes
impl Send for TransitionAttributes
impl Sync for TransitionAttributes
impl Unpin for TransitionAttributes
impl UnwindSafe for TransitionAttributes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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