Show / Hide Table of Contents

Class VehicleServiceClientImpl

VehicleService client wrapper implementation, for convenient use.

Inheritance
object
VehicleServiceClient
VehicleServiceClientImpl
Inherited Members
VehicleServiceClient.DefaultEndpoint
VehicleServiceClient.DefaultScopes
VehicleServiceClient.ServiceMetadata
VehicleServiceClient.CreateAsync(CancellationToken)
VehicleServiceClient.Create()
VehicleServiceClient.ShutdownDefaultChannelsAsync()
VehicleServiceClient.CreateVehicleAsync(CreateVehicleRequest, CancellationToken)
VehicleServiceClient.GetVehicleAsync(GetVehicleRequest, CancellationToken)
VehicleServiceClient.DeleteVehicleAsync(DeleteVehicleRequest, CancellationToken)
VehicleServiceClient.DeleteVehicle(string, CallSettings)
VehicleServiceClient.DeleteVehicleAsync(string, CallSettings)
VehicleServiceClient.DeleteVehicleAsync(string, CancellationToken)
VehicleServiceClient.DeleteVehicle(VehicleName, CallSettings)
VehicleServiceClient.DeleteVehicleAsync(VehicleName, CallSettings)
VehicleServiceClient.DeleteVehicleAsync(VehicleName, CancellationToken)
VehicleServiceClient.UpdateVehicleAsync(UpdateVehicleRequest, CancellationToken)
VehicleServiceClient.UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest, CancellationToken)
VehicleServiceClient.SearchVehiclesAsync(SearchVehiclesRequest, CancellationToken)
object.GetHashCode()
object.GetType()
object.ToString()
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
VehicleServiceClient.GrpcClient

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:

  • 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 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
VehicleServiceClient.CreateVehicle(CreateVehicleRequest, CallSettings)

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:

  • 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 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
VehicleServiceClient.CreateVehicleAsync(CreateVehicleRequest, CallSettings)

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
VehicleServiceClient.DeleteVehicle(DeleteVehicleRequest, CallSettings)

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
VehicleServiceClient.DeleteVehicleAsync(DeleteVehicleRequest, CallSettings)

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
VehicleServiceClient.GetVehicle(GetVehicleRequest, CallSettings)

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
VehicleServiceClient.GetVehicleAsync(GetVehicleRequest, CallSettings)

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
VehicleServiceClient.ListVehicles(ListVehiclesRequest, CallSettings)

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
VehicleServiceClient.ListVehiclesAsync(ListVehiclesRequest, CallSettings)

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
VehicleServiceClient.SearchVehicles(SearchVehiclesRequest, CallSettings)

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
VehicleServiceClient.SearchVehiclesAsync(SearchVehiclesRequest, CallSettings)

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:

  • 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 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
VehicleServiceClient.UpdateVehicle(UpdateVehicleRequest, CallSettings)

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:

  • 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 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
VehicleServiceClient.UpdateVehicleAsync(UpdateVehicleRequest, CallSettings)

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
VehicleServiceClient.UpdateVehicleAttributes(UpdateVehicleAttributesRequest, CallSettings)

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.

Overrides
VehicleServiceClient.UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest, CallSettings)
In this article
Back to top Generated by DocFX