AI-generated Key Takeaways
- 
          
Vehicleobjects store metadata about vehicles in a fleet, including their operational state, location, and trip assignments. - 
          
VehicleStatedefines the operational status of a vehicle, such asONLINEfor accepting trips andOFFLINEfor not accepting trips. - 
          
VehicleAttributeallows describing vehicle characteristics using key-value pairs, supporting string, boolean, and numeric values. - 
          
VehicleTypecategorizes vehicles into types likeAUTO,TAXI,TRUCK, and more, providing a way to classify them. - 
          
Traffic conditions along a vehicle's route are represented by
TrafficPolylineData, using visual styles to indicate traffic speed and potential delays. 
- Resource: Vehicle
 - VehicleState
 - VehicleAttribute
 - VehicleType
 - Category
 - LicensePlate
 - TrafficPolylineData
 - VisualTrafficReportPolylineRendering
 - RoadStretch
 - Style
 - NavigationStatus
 - DeviceSettings
 - LocationPowerSaveMode
 - BatteryInfo
 - BatteryStatus
 - PowerSource
 - Methods
 
Resource: Vehicle
Vehicle metadata.
| JSON representation | 
|---|
{ "name": string, "vehicleState": enum (  | 
              
| Fields | |
|---|---|
name | 
                
                   
 Output only. The unique name for this vehicle. The format is   | 
              
vehicleState | 
                
                   
 The vehicle state.  | 
              
supportedTripTypes[] | 
                
                   
 Trip types supported by this vehicle.  | 
              
currentTrips[] | 
                
                   
 Output only. List of   | 
              
lastLocation | 
                
                   
 Last reported location of the vehicle.  | 
              
pastLocations[] | 
                
                   
 Input only. Locations where this vehicle has been in the past that haven't yet been reported to Fleet Engine. This is used in   | 
              
maximumCapacity | 
                
                   
 The total numbers of riders this vehicle can carry. The driver is not considered in this value. This value must be greater than or equal to one.  | 
              
attributes[] | 
                
                   
 List of vehicle attributes. A vehicle can have at most 100 attributes, and each attribute must have a unique key.  | 
              
vehicleType | 
                
                   
 Required. The type of this vehicle. Can be used to filter vehicles in   | 
              
licensePlate | 
                
                   
 License plate information for the vehicle.  | 
              
route[] | 
                
                   
 Deprecated: Use   | 
              
currentRouteSegment | 
                
                   
 The polyline specifying the route the driver app intends to take to the next waypoint. This list is also returned in  Note: This field is intended only for use by the Driver SDK. Decoding is not yet supported.  | 
              
currentRouteSegmentTraffic | 
                
                   
 Input only. Fleet Engine uses this information to improve journey sharing. Note: This field is intended only for use by the Driver SDK.  | 
              
currentRouteSegmentVersion | 
                
                   
 Output only. Time when  Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
              
currentRouteSegmentEndPoint | 
                
                   
 The waypoint where   | 
              
remainingDistanceMeters | 
                
                   
 The remaining driving distance for the   | 
              
etaToFirstWaypoint | 
                
                   
 The ETA to the first entry in the  When updating a vehicle,  Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
              
remainingTimeSeconds | 
                
                   
 Input only. The remaining driving time for the  When updating a vehicle,   | 
              
waypoints[] | 
                
                   
 The remaining waypoints assigned to this Vehicle.  | 
              
waypointsVersion | 
                
                   
 Output only. Last time the  Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
              
backToBackEnabled | 
                
                   
 Indicates if the driver accepts back-to-back trips. If   | 
              
navigationStatus | 
                
                   
 The vehicle's navigation status.  | 
              
deviceSettings | 
                
                   
 Input only. Information about settings in the mobile device being used by the driver.  | 
              
VehicleState
The state of a Vehicle.
| Enums | |
|---|---|
UNKNOWN_VEHICLE_STATE | 
                Default, used for unspecified or unrecognized vehicle states. | 
OFFLINE | 
                The vehicle is not accepting new trips. Note: the vehicle may continue to operate in this state while completing a trip assigned to it. | 
ONLINE | 
                The vehicle is accepting new trips. | 
VehicleAttribute
Describes a vehicle attribute as a key-value pair. The "key:value" string length cannot exceed 256 characters.
| JSON representation | 
|---|
{ "key": string, "value": string, // Union field  | 
              
| Fields | |
|---|---|
key | 
                
                   
 The attribute's key. Keys may not contain the colon character (:).  | 
              
value | 
                
                   
 The attribute's value.  | 
              
Union field vehicle_attribute_value. The attribute's value, can be in string, bool, or double type. vehicle_attribute_value can be only one of the following: | 
              |
stringValue | 
                
                   
 String typed attribute value. Note: This is identical to the   | 
              
boolValue | 
                
                   
 Boolean typed attribute value.  | 
              
numberValue | 
                
                   
 Double typed attribute value.  | 
              
VehicleType
The type of vehicle.
| JSON representation | 
|---|
{
  "category": enum ( | 
              
| Fields | |
|---|---|
category | 
                
                   
 Vehicle type category  | 
              
Category
Vehicle type categories
| Enums | |
|---|---|
UNKNOWN | 
                Default, used for unspecified or unrecognized vehicle categories. | 
AUTO | 
                An automobile. | 
TAXI | 
                Any vehicle that acts as a taxi (typically licensed or regulated). | 
TRUCK | 
                Generally, a vehicle with a large storage capacity. | 
TWO_WHEELER | 
                A motorcycle, moped, or other two-wheeled vehicle | 
BICYCLE | 
                Human-powered transport. | 
PEDESTRIAN | 
                A human transporter, typically walking or running, traveling along pedestrian pathways. | 
LicensePlate
The license plate information of the Vehicle. To avoid storing personally-identifiable information, only the minimum information about the license plate is stored as part of the entity.
| JSON representation | 
|---|
{ "countryCode": string, "lastCharacter": string }  | 
              
| Fields | |
|---|---|
countryCode | 
                
                   
 Required. CLDR Country/Region Code. For example,   | 
              
lastCharacter | 
                
                   
 The last digit of the license plate or "-1" to denote no numeric value is present in the license plate. 
  | 
              
TrafficPolylineData
Traffic conditions along the expected vehicle route.
| JSON representation | 
|---|
{
  "trafficRendering": {
    object ( | 
              
| Fields | |
|---|---|
trafficRendering | 
                
                   
 A polyline rendering of how fast traffic is for all regions along one stretch of a customer ride.  | 
              
VisualTrafficReportPolylineRendering
Describes how clients should color one portion of the polyline along the route.
| JSON representation | 
|---|
{
  "roadStretch": [
    {
      object ( | 
              
| Fields | |
|---|---|
roadStretch[] | 
                
                   
 Optional. Road stretches that should be rendered along the polyline. Stretches are guaranteed to not overlap, and do not necessarily span the full route. In the absence of a road stretch to style, the client should apply the default for the route.  | 
              
RoadStretch
One road stretch that should be rendered.
| JSON representation | 
|---|
{
  "style": enum ( | 
              
| Fields | |
|---|---|
style | 
                
                   
 Required. The style to apply.  | 
              
offsetMeters | 
                
                   
 Required. The style should be applied between   | 
              
lengthMeters | 
                
                   
 Required. The length of the path where to apply the style.  | 
              
Style
The traffic style, indicating traffic speed.
| Enums | |
|---|---|
STYLE_UNSPECIFIED | 
                No style selected. | 
SLOWER_TRAFFIC | 
                Traffic is slowing down. | 
TRAFFIC_JAM | 
                There is a traffic jam. | 
DeviceSettings
Information about various settings on the mobile device.
| JSON representation | 
|---|
{ "locationPowerSaveMode": enum (  | 
              
| Fields | |
|---|---|
locationPowerSaveMode | 
                
                   
 How location features are set to behave on the device when battery saver is on.  | 
              
isPowerSaveMode | 
                
                   
 Whether the device is currently in power save mode.  | 
              
isInteractive | 
                
                   
 Whether the device is in an interactive state.  | 
              
batteryInfo | 
                
                   
 Information about the battery state.  | 
              
LocationPowerSaveMode
How location features are configured to behave on the mobile device when the devices "battery saver" feature is on. (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode())
| Enums | |
|---|---|
UNKNOWN_LOCATION_POWER_SAVE_MODE | 
                Undefined LocationPowerSaveMode | 
LOCATION_MODE_NO_CHANGE | 
                Either the location providers shouldn't be affected by battery saver, or battery saver is off. | 
LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF | 
                The GPS based location provider should be disabled when battery saver is on and the device is non-interactive. | 
LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF | 
                All location providers should be disabled when battery saver is on and the device is non-interactive. | 
LOCATION_MODE_FOREGROUND_ONLY | 
                All the location providers will be kept available, but location fixes should only be provided to foreground apps. | 
LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF | 
                Location will not be turned off, but LocationManager will throttle all requests to providers when the device is non-interactive. | 
BatteryInfo
Information about the device's battery.
| JSON representation | 
|---|
{ "batteryStatus": enum (  | 
              
| Fields | |
|---|---|
batteryStatus | 
                
                   
 Status of the battery, whether full or charging etc.  | 
              
powerSource | 
                
                   
 Status of battery power source.  | 
              
batteryPercentage | 
                
                   
 Current battery percentage [0-100].  | 
              
BatteryStatus
Status of the battery, whether full or charging etc.
| Enums | |
|---|---|
UNKNOWN_BATTERY_STATUS | 
                Battery status unknown. | 
BATTERY_STATUS_CHARGING | 
                Battery is being charged. | 
BATTERY_STATUS_DISCHARGING | 
                Battery is discharging. | 
BATTERY_STATUS_FULL | 
                Battery is full. | 
BATTERY_STATUS_NOT_CHARGING | 
                Battery is not charging. | 
BATTERY_STATUS_POWER_LOW | 
                Battery is low on power. | 
PowerSource
Type of the charger being used to charge the battery.
| Enums | |
|---|---|
UNKNOWN_POWER_SOURCE | 
                Power source unknown. | 
POWER_SOURCE_AC | 
                Power source is an AC charger. | 
POWER_SOURCE_USB | 
                Power source is a USB port. | 
POWER_SOURCE_WIRELESS | 
                Power source is wireless. | 
POWER_SOURCE_UNPLUGGED | 
                Battery is unplugged. | 
Methods | 
            |
|---|---|
                
 | 
              Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. | 
                
 | 
              Deletes a Vehicle from the Fleet Engine. | 
                
 | 
              Returns a vehicle from the Fleet Engine. | 
                
 | 
              Returns a paginated list of vehicles associated with a provider that match the request options. | 
                
 | 
              Returns a list of vehicles that match the request options. | 
                
 | 
              Writes updated vehicle data to the Fleet Engine. | 
                
 | 
              Partially updates a vehicle's attributes. |