Struct googapis::maps::fleetengine::v1::Vehicle[][src]

pub struct Vehicle {
Show 22 fields pub name: String, pub vehicle_state: i32, pub supported_trip_types: Vec<i32>, pub current_trips: Vec<String>, pub last_location: Option<VehicleLocation>, pub maximum_capacity: i32, pub available_capacity: i32, pub attributes: Vec<VehicleAttribute>, pub vehicle_type: Option<VehicleType>, pub license_plate: Option<LicensePlate>, pub route: Vec<TerminalLocation>, pub current_route_segment: String, pub current_route_segment_version: Option<Timestamp>, pub current_route_segment_end_point: Option<TripWaypoint>, pub remaining_distance_meters: Option<i32>, pub eta_to_first_waypoint: Option<Timestamp>, pub remaining_time_seconds: Option<i32>, pub waypoints: Vec<TripWaypoint>, pub waypoints_version: Option<Timestamp>, pub back_to_back_enabled: bool, pub navigation_status: i32, pub device_settings: Option<DeviceSettings>,
}
Expand description

Vehicle metadata.

Fields

name: String

The unique name for this vehicle. The format is providers/{provider}/vehicles/{vehicle}

vehicle_state: i32

The vehicle state.

supported_trip_types: Vec<i32>

Supported trip types.

current_trips: Vec<String>

List of IDs for trips in progress.

last_location: Option<VehicleLocation>

Last reported location of the vehicle.

maximum_capacity: i32

Maximum capacity of the vehicle. This is the total numbers of riders on trips this vehicle can contain. The driver is not considered in this value. This value must be greater than or equal to one.

available_capacity: i32

The current available capacity of the vehicle. This is the maximum_capacity minus the current number of riders.

attributes: Vec<VehicleAttribute>

List of vehicle service attributes.

vehicle_type: Option<VehicleType>

The type of this Vehicle. Can be filtered during SearchVehicles. Also influences ETA and route calculations.

license_plate: Option<LicensePlate>

License plate information for the vehicle.

route: Vec<TerminalLocation>
👎 Deprecated

Deprecated. Use vehicle.waypoint instead.

current_route_segment: String

The polyline specifying the route the driver app intends to take to the next waypoint. Your driver app updates this every time a waypoint is passed or the driver reroutes. This list is also returned in Trip.current_route_segment for all active trips assigned to the vehicle. Note: This field is intended only for use by the Driver SDK.

current_route_segment_version: Option<Timestamp>

Time when current_route_segment was set. This field is ignored in UpdateVehicleRequests as it is calculated by the server. It should be stored by client and passed in to future requests to prevent returning routes to first way point that haven’t changed.

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 latlnt, 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. This field is ignored in UpdateVehicle calls unless current_route_segment is also specified.

remaining_distance_meters: Option<i32>

The remaining driving distance for the ‘current_route_segment’. This field facilitates journey sharing between the Driver app and the Consumer app. This value is updated by the Driver SDK. Fleet Engine does not update it. This field is also returned in Trip.remaining_distance_meters for all active trips assigned to the vehicle. The value is unspecified if the Vehicle.current_route_segment field is empty, or if the Driver app has not updated its value.

eta_to_first_waypoint: Option<Timestamp>

The ETA to the next waypoint that is the first entry in Vehicle.waypoint field. This field facilitates journey sharing between a Driver app and a Consumer app and is updated by the Driver SDK, and Fleet Engine does not update it. This field is also returned in Trip.eta_to_first_waypoint for all active trips assigned to the vehicle. The value is unspecified if the Vehicle.waypoint field is empty, or the Driver app has not updated its value.

remaining_time_seconds: Option<i32>

The remaining driving time for the ‘current_route_segment’. This field facilitates journey sharing between the Driver app and the Consumer app. This value is updated by the Driver SDK. Fleet Engine does not update it. The value is unspecified if the Vehicle.current_route_segment field is empty, or if the Driver app has not updated its value. This value should match eta_to_first_waypoint - current_time if all parties are using the same clock. This field is currently write-only and will not yet be populated in Vehicle’s get/update/search operations. When updating a vehicle, if you update both eta_to_first_waypoint and remaining_time_seconds in the same request, then only remaining_time_seconds is considered.

waypoints: Vec<TripWaypoint>

The remaining set of waypoints assigned to this Vehicle.

waypoints_version: Option<Timestamp>

Last time the waypoints was updated. Client should cache this value and pass it in GetVehicleRequest to ensure the waypoints.path_to_waypoint is only returned if it is updated

back_to_back_enabled: bool

Indicates if the driver accepts back-to-back rides. If true, services include the vehicle for back-to-back matches. If false, services exclude the vehicle from back-to-back matches. Default value is false.

navigation_status: i32

Vehicle’s navigation status.

device_settings: Option<DeviceSettings>

Information about various device settings. This is internal debug only field, not included in the response.

Implementations

Returns the enum value of vehicle_state, or the default if the field is set to an invalid enum value.

Sets vehicle_state to the provided enum value.

Returns an iterator which yields the valid enum values contained in supported_trip_types.

Appends the provided enum value to supported_trip_types.

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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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