Struct googapis::maps::fleetengine::v1::Trip [−][src]
pub struct Trip {Show 29 fields
pub name: String,
pub vehicle_id: String,
pub trip_status: i32,
pub trip_type: i32,
pub pickup_point: Option<TerminalLocation>,
pub actual_pickup_point: Option<StopLocation>,
pub actual_pickup_arrival_point: Option<StopLocation>,
pub pickup_time: Option<Timestamp>,
pub intermediate_destinations: Vec<TerminalLocation>,
pub intermediate_destinations_version: Option<Timestamp>,
pub intermediate_destination_index: i32,
pub actual_intermediate_destination_arrival_points: Vec<StopLocation>,
pub actual_intermediate_destinations: Vec<StopLocation>,
pub dropoff_point: Option<TerminalLocation>,
pub actual_dropoff_point: Option<StopLocation>,
pub dropoff_time: Option<Timestamp>,
pub remaining_waypoints: Vec<TripWaypoint>,
pub vehicle_waypoints: Vec<TripWaypoint>,
pub route: Vec<LatLng>,
pub current_route_segment_end_point: Option<TripWaypoint>,
pub remaining_distance_meters: Option<i32>,
pub eta_to_first_waypoint: Option<Timestamp>,
pub remaining_time_to_first_waypoint: Option<Duration>,
pub remaining_waypoints_version: Option<Timestamp>,
pub remaining_waypoints_route_version: Option<Timestamp>,
pub number_of_passengers: i32,
pub last_location: Option<VehicleLocation>,
pub last_location_snappable: bool,
pub view: i32,
}
Expand description
Trip metadata.
Fields
name: String
In the format “providers/{provider}/trips/{trip}”
vehicle_id: String
ID of the vehicle making this trip.
trip_status: i32
Current status of the trip.
trip_type: i32
The type of the trip.
pickup_point: Option<TerminalLocation>
Location where customer indicates they will be picked up.
actual_pickup_point: Option<StopLocation>
Input only. The actual location when and where customer was picked up. This field is for provider to provide feedback on actual pickup information.
actual_pickup_arrival_point: Option<StopLocation>
Input only. The actual time and location of the driver arrival at the pickup point. This field is for provider to provide feedback on actual arrival information at the pickup point.
pickup_time: Option<Timestamp>
Either the estimated future time when the rider(s) will be picked up, or the actual time when they were picked up.
intermediate_destinations: Vec<TerminalLocation>
Intermediate stops in order that the trip requests (in addition to pickup and dropoff). Initially this will not be supported for shared trips.
intermediate_destinations_version: Option<Timestamp>
Indicates the last time the Trip.intermediate_destinations was modified. Your server should cache this value and pass it in UpdateTripRequest when update Trip.intermediate_destination_index to ensure the Trip.intermediate_destinations is not changed.
intermediate_destination_index: i32
When TripStatus is ENROUTE_TO_INTERMEDIATE_DESTINATION, a number between [0..N-1] indicating which intermediate destination the vehicle will cross next. When TripStatus is ARRIVED_AT_INTERMEDIATE_DESTINATION, a number between [0..N-1] indicating which intermediate destination the vehicle is at. The provider sets this value. If there are no intermediate_destinations, this field is ignored.
actual_intermediate_destination_arrival_points: Vec<StopLocation>
Input only. The actual time and location of the driver’s arrival at an intermediate destination. This field is for provider to provide feedback on actual arriaval information at intermediate destinations.
actual_intermediate_destinations: Vec<StopLocation>
Input only. The actual time and location when and where the customer was picked up from an intermediate destination. This field is for provider to provide feedback on actual pickup information at intermediate destinations.
dropoff_point: Option<TerminalLocation>
Location where customer indicates they will be dropped off.
actual_dropoff_point: Option<StopLocation>
Input only. The actual time and location when and where customer was dropped off. This field is for provider to provide feedback on actual dropoff information.
dropoff_time: Option<Timestamp>
Either the estimated future time when the rider(s) will be dropped off at the final destination, or the actual time when they were dropped off.
remaining_waypoints: Vec<TripWaypoint>
Output only. The full path from the current location to the dropoff point, inclusive. If this is a shared ride, this path could include waypoints from other trips.
vehicle_waypoints: Vec<TripWaypoint>
This field supports manual ordering of the waypoints for the trip. It contains all of the remaining waypoints of vehicle assigned, as well as the pickup and drop-off waypoints for this trip. If the trip hasn’t been assigned to a vehicle, then this field is ignored. For privacy reasons, this field is only populated by the server on UpdateTrip and CreateTrip calls, and NOT on GetTrip calls.
route: Vec<LatLng>
Anticipated route for this trip to the first entry in remaining_waypoints. If back_to_back or shared trips are enabled, the waypoint may belong to a different trip.
current_route_segment_end_point: Option<TripWaypoint>
The waypoint where current_route_segment ends. This can be supplied by drivers on UpdateVehicle calls either as a full trip waypoint, a waypoint latlng, or as a the last latlng of the current_route_segment. FleetEngine will then do its best to interpolate to an actual waypoint if it is not fully specified. It will be returned in GetTrip calls. It is not respected in Create/Update Trip calls.
remaining_distance_meters: Option<i32>
The remaining driving distance in Trip.current_route_segment field. This field facilitates journey sharing between a driver and rider and Fleet Engine does not update it. Your driver app is responsible for setting field on all of its current trips by passing Vehicle.remaining_distance_meters to an Vehicle.update call. The value is unspecified if the trip is not assigned to a vehicle, or the trip is inactive (completed or cancelled), or driver hasn’t updated this value.
eta_to_first_waypoint: Option<Timestamp>
Output only. The ETA to the next waypoint (the first entry in the Trip.remaining_waypoints field). This field facilitates journey sharing between a driver and a consumer. Fleet Engine does not update this value. Your driver app is responsible for setting this field by passing Vehicle.remaining_time_seconds in a call to Vehicle.update. FleetEngine converts the Vehicle.remaining_time_seconds to Trip.eta_to_first_waypoint, and returns it to the rider. The value is unspecified if the trip is not assigned to a vehicle, or the trip is inactive (completed or cancelled), or driver hasn’t updated this value.
remaining_time_to_first_waypoint: Option<Duration>
Output only. The duration from when the Trip data is returned to the time in Trip.eta_to_first_waypoint.
remaining_waypoints_version: Option<Timestamp>
Indicates the last time that remaining_waypoints
was changed (a
waypoint was added, removed, or changed).
remaining_waypoints_route_version: Option<Timestamp>
Indicates the last time the remaining_waypoints.path_to_waypoint and remaining_waypoints.traffic_to_waypoint were modified. Your client app should cache this value and pass it in GetTripRequest to ensure the paths and traffic for remaining_waypoints are only returned if updated.
number_of_passengers: i32
Indicates the number of passengers on this trip and does not include the driver. A vehicle must have available_capacity to be returned in SearchTrips.
last_location: Option<VehicleLocation>
Indicates the last reported location of the vehicle along the route.
last_location_snappable: bool
Indicates whether the vehicle’s last_location can be snapped to the current_route_segment. False if last_location or current_route_segment doesn’t exist. It is computed by Fleet Engine. Any update from clients will be ignored.
view: i32
The subset of Trip fields that are populated and how they should be interpreted.
Implementations
Returns the enum value of trip_status
, or the default if the field is set to an invalid enum value.
Sets trip_status
to the provided enum value.
Returns the enum value of trip_type
, or the default if the field is set to an invalid enum value.
Sets trip_type
to the provided enum value.
Returns the enum value of view
, or the default if the field is set to an invalid enum value.
Trait Implementations
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
Returns the encoded length of the message without a length delimiter.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self
. Read more
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Trip
impl UnwindSafe for Trip
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more