Class VehicleService.VehicleServiceBase
Base class for server-side implementations of VehicleService
Namespace: Google.Maps.FleetEngine.V1
Assembly: Google.Maps.FleetEngine.V1.dll
Syntax
[BindServiceMethod(typeof(VehicleService), "BindService")]
public abstract class VehicleService.VehicleServiceBase
Methods
CreateVehicle(CreateVehicleRequest, ServerCallContext)
Instantiates a new vehicle associated with an on-demand rideshare or
deliveries provider. Each Vehicle
must have a unique vehicle ID.
The following Vehicle
fields are required when creating a Vehicle
:
vehicleState
supportedTripTypes
maximumCapacity
vehicleType
The following Vehicle
fields are ignored when creating a Vehicle
:
name
currentTrips
availableCapacity
current_route_segment
current_route_segment_end_point
current_route_segment_version
current_route_segment_traffic
route
waypoints
waypoints_version
remaining_distance_meters
remaining_time_seconds
eta_to_next_waypoint
navigation_status
All other fields are optional and used if provided.
Declaration
public virtual Task<Vehicle> CreateVehicle(CreateVehicleRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
CreateVehicleRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<Vehicle> | The response to send back to the client (wrapped by a task). |
GetVehicle(GetVehicleRequest, ServerCallContext)
Returns a vehicle from the Fleet Engine.
Declaration
public virtual Task<Vehicle> GetVehicle(GetVehicleRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
GetVehicleRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<Vehicle> | The response to send back to the client (wrapped by a task). |
ListVehicles(ListVehiclesRequest, ServerCallContext)
Returns a paginated list of vehicles associated with a provider that match the request options.
Declaration
public virtual Task<ListVehiclesResponse> ListVehicles(ListVehiclesRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
ListVehiclesRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<ListVehiclesResponse> | The response to send back to the client (wrapped by a task). |
SearchVehicles(SearchVehiclesRequest, ServerCallContext)
Returns a list of vehicles that match the request options.
Declaration
public virtual Task<SearchVehiclesResponse> SearchVehicles(SearchVehiclesRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
SearchVehiclesRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<SearchVehiclesResponse> | The response to send back to the client (wrapped by a task). |
UpdateVehicle(UpdateVehicleRequest, ServerCallContext)
Writes updated vehicle data to the Fleet Engine.
When updating a Vehicle
, the following fields cannot be updated since
they are managed by the server:
currentTrips
availableCapacity
current_route_segment_version
waypoints_version
The vehicle name
also cannot be updated.
If the attributes
field is updated, all the vehicle's attributes are
replaced with the attributes provided in the request. If you want to update
only some attributes, see the UpdateVehicleAttributes
method. Likewise,
the waypoints
field can be updated, but must contain all the waypoints
currently on the vehicle, and no other waypoints.
Declaration
public virtual Task<Vehicle> UpdateVehicle(UpdateVehicleRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
UpdateVehicleRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<Vehicle> | The response to send back to the client (wrapped by a task). |
UpdateVehicleAttributes(UpdateVehicleAttributesRequest, ServerCallContext)
Partially updates a vehicle's attributes.
Only the attributes mentioned in the request will be updated, other
attributes will NOT be altered. Note: this is different in UpdateVehicle
,
where the whole attributes
field will be replaced by the one in
UpdateVehicleRequest
, attributes not in the request would be removed.
Declaration
public virtual Task<UpdateVehicleAttributesResponse> UpdateVehicleAttributes(UpdateVehicleAttributesRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
UpdateVehicleAttributesRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<UpdateVehicleAttributesResponse> | The response to send back to the client (wrapped by a task). |