Class VehicleServiceClientImpl
VehicleService client wrapper implementation, for convenient use.
Inherited Members
Namespace: Google.Maps.FleetEngine.V1
Assembly: Google.Maps.FleetEngine.V1.dll
Syntax
public sealed class VehicleServiceClientImpl : VehicleServiceClient
Remarks
Vehicle management service.
Constructors
VehicleServiceClientImpl(VehicleServiceClient, VehicleServiceSettings, ILogger)
Constructs a client wrapper for the VehicleService service, with the specified gRPC client and settings.
Declaration
public VehicleServiceClientImpl(VehicleService.VehicleServiceClient grpcClient, VehicleServiceSettings settings, ILogger logger)
Parameters
| Type | Name | Description |
|---|---|---|
| VehicleService.VehicleServiceClient | grpcClient | The underlying gRPC client. |
| VehicleServiceSettings | settings | The base VehicleServiceSettings used within this client. |
| ILogger | logger | Optional ILogger to use within this client. |
Properties
GrpcClient
The underlying gRPC VehicleService client
Declaration
public override VehicleService.VehicleServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| VehicleService.VehicleServiceClient |
Overrides
Methods
CreateVehicle(CreateVehicleRequest, CallSettings)
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:
vehicleStatesupportedTripTypesmaximumCapacityvehicleType
The following Vehicle fields are ignored when creating a Vehicle:
namecurrentTripsavailableCapacitycurrent_route_segmentcurrent_route_segment_end_pointcurrent_route_segment_versioncurrent_route_segment_trafficroutewaypointswaypoints_versionremaining_distance_metersremaining_time_secondseta_to_next_waypointnavigation_status
All other fields are optional and used if provided.
Declaration
public override Vehicle CreateVehicle(CreateVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Vehicle | The RPC response. |
Overrides
CreateVehicleAsync(CreateVehicleRequest, CallSettings)
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:
vehicleStatesupportedTripTypesmaximumCapacityvehicleType
The following Vehicle fields are ignored when creating a Vehicle:
namecurrentTripsavailableCapacitycurrent_route_segmentcurrent_route_segment_end_pointcurrent_route_segment_versioncurrent_route_segment_trafficroutewaypointswaypoints_versionremaining_distance_metersremaining_time_secondseta_to_next_waypointnavigation_status
All other fields are optional and used if provided.
Declaration
public override Task<Vehicle> CreateVehicleAsync(CreateVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Vehicle> | A Task containing the RPC response. |
Overrides
DeleteVehicle(DeleteVehicleRequest, CallSettings)
Deletes a Vehicle from the Fleet Engine.
Returns FAILED_PRECONDITION if the Vehicle has active Trips. assigned to it.
Declaration
public override void DeleteVehicle(DeleteVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Overrides
DeleteVehicleAsync(DeleteVehicleRequest, CallSettings)
Deletes a Vehicle from the Fleet Engine.
Returns FAILED_PRECONDITION if the Vehicle has active Trips. assigned to it.
Declaration
public override Task DeleteVehicleAsync(DeleteVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task | A Task containing the RPC response. |
Overrides
GetVehicle(GetVehicleRequest, CallSettings)
Returns a vehicle from the Fleet Engine.
Declaration
public override Vehicle GetVehicle(GetVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Vehicle | The RPC response. |
Overrides
GetVehicleAsync(GetVehicleRequest, CallSettings)
Returns a vehicle from the Fleet Engine.
Declaration
public override Task<Vehicle> GetVehicleAsync(GetVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Vehicle> | A Task containing the RPC response. |
Overrides
ListVehicles(ListVehiclesRequest, CallSettings)
Returns a paginated list of vehicles associated with a provider that match the request options.
Declaration
public override PagedEnumerable<ListVehiclesResponse, Vehicle> ListVehicles(ListVehiclesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListVehiclesRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListVehiclesResponse, Vehicle> | A pageable sequence of Vehicle resources. |
Overrides
ListVehiclesAsync(ListVehiclesRequest, CallSettings)
Returns a paginated list of vehicles associated with a provider that match the request options.
Declaration
public override PagedAsyncEnumerable<ListVehiclesResponse, Vehicle> ListVehiclesAsync(ListVehiclesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListVehiclesRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListVehiclesResponse, Vehicle> | A pageable asynchronous sequence of Vehicle resources. |
Overrides
SearchVehicles(SearchVehiclesRequest, CallSettings)
Returns a list of vehicles that match the request options.
Declaration
public override SearchVehiclesResponse SearchVehicles(SearchVehiclesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchVehiclesRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| SearchVehiclesResponse | The RPC response. |
Overrides
SearchVehiclesAsync(SearchVehiclesRequest, CallSettings)
Returns a list of vehicles that match the request options.
Declaration
public override Task<SearchVehiclesResponse> SearchVehiclesAsync(SearchVehiclesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchVehiclesRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<SearchVehiclesResponse> | A Task containing the RPC response. |
Overrides
UpdateVehicle(UpdateVehicleRequest, CallSettings)
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:
currentTripsavailableCapacitycurrent_route_segment_versionwaypoints_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 override Vehicle UpdateVehicle(UpdateVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Vehicle | The RPC response. |
Overrides
UpdateVehicleAsync(UpdateVehicleRequest, CallSettings)
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:
currentTripsavailableCapacitycurrent_route_segment_versionwaypoints_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 override Task<Vehicle> UpdateVehicleAsync(UpdateVehicleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateVehicleRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Vehicle> | A Task containing the RPC response. |
Overrides
UpdateVehicleAttributes(UpdateVehicleAttributesRequest, CallSettings)
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 override UpdateVehicleAttributesResponse UpdateVehicleAttributes(UpdateVehicleAttributesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateVehicleAttributesRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| UpdateVehicleAttributesResponse | The RPC response. |
Overrides
UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest, CallSettings)
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 override Task<UpdateVehicleAttributesResponse> UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateVehicleAttributesRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<UpdateVehicleAttributesResponse> | A Task containing the RPC response. |