Page Summary
-
DeliveryVehicle.Builderis used to create instances ofDeliveryVehiclewith specific attributes. -
You can set the provider ID, vehicle ID, name, and current stops for the vehicle.
-
The
build()method creates a newDeliveryVehicleobject with the specified values. -
Vehicle stops set using the Builder are ignored in requests but returned in responses.
-
Fleet Engine provides the actual vehicle stop information, and drivers should update them via
VehicleReporter.
Builder class for DeliveryVehicle.
Public Method Summary
| DeliveryVehicle |
build()
Returns new DeliveryVehicle instance with the state set by the Builder.
|
| abstract DeliveryVehicle.Builder | |
| abstract DeliveryVehicle.Builder | |
| abstract DeliveryVehicle.Builder |
setVehicleName(String vehicleName)
Sets the unique name for this vehicle, in the format
"providers/{provider_id}/delivery_vehicles/{vehicle_id}".
|
| abstract DeliveryVehicle.Builder |
setVehicleStops(List<VehicleStop>
value)
Sets the stops currently assigned to this vehicle as reported by FleetEngine.
|
Inherited Method Summary
Public Methods
public DeliveryVehicle build ()
Returns new DeliveryVehicle instance with the state set by the Builder.
Throws
| IllegalArgumentException | if set with an invalid vehicle name. |
|---|
public abstract DeliveryVehicle.Builder setProviderId (String providerId)
Returns the unique identifier for this provider.
public abstract DeliveryVehicle.Builder setVehicleId (String vehicleId)
Sets the unique identifier for this vehicle for this provider.
public abstract DeliveryVehicle.Builder setVehicleName (String vehicleName)
Sets the unique name for this vehicle, in the format "providers/{provider_id}/delivery_vehicles/{vehicle_id}".
public abstract DeliveryVehicle.Builder setVehicleStops (List<VehicleStop> value)
Sets the stops currently assigned to this vehicle as reported by FleetEngine.
This field is ignored when used to generate requests, but will be returned in responses. DriverSdk users are expected to set vehicle stops using the VehicleReporter.