Show / Hide Table of Contents

Class VehicleService.VehicleServiceClient

Client for VehicleService

Inheritance
object
ClientBase
ClientBase<VehicleService.VehicleServiceClient>
VehicleService.VehicleServiceClient
Inherited Members
ClientBase<VehicleService.VehicleServiceClient>.WithHost(string)
ClientBase.CallInvoker
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Maps.FleetEngine.V1
Assembly: Google.Maps.FleetEngine.V1.dll
Syntax
public class VehicleService.VehicleServiceClient : ClientBase<VehicleService.VehicleServiceClient>

Constructors

VehicleServiceClient()

Protected parameterless constructor to allow creation of test doubles.

Declaration
protected VehicleServiceClient()

VehicleServiceClient(CallInvoker)

Creates a new client for VehicleService that uses a custom CallInvoker.

Declaration
public VehicleServiceClient(CallInvoker callInvoker)
Parameters
Type Name Description
CallInvoker callInvoker

The callInvoker to use to make remote calls.

VehicleServiceClient(ChannelBase)

Creates a new client for VehicleService

Declaration
public VehicleServiceClient(ChannelBase channel)
Parameters
Type Name Description
ChannelBase channel

The channel to use to make remote calls.

VehicleServiceClient(ClientBaseConfiguration)

Protected constructor to allow creation of configured clients.

Declaration
protected VehicleServiceClient(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type Name Description
ClientBase.ClientBaseConfiguration configuration

The client configuration.

Methods

CreateVehicle(CreateVehicleRequest, CallOptions)

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 Vehicle CreateVehicle(CreateVehicleRequest request, CallOptions options)
Parameters
Type Name Description
CreateVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Vehicle

The response received from the server.

CreateVehicle(CreateVehicleRequest, Metadata, DateTime?, CancellationToken)

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 Vehicle CreateVehicle(CreateVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Vehicle

The response received from the server.

CreateVehicleAsync(CreateVehicleRequest, CallOptions)

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 AsyncUnaryCall<Vehicle> CreateVehicleAsync(CreateVehicleRequest request, CallOptions options)
Parameters
Type Name Description
CreateVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Vehicle>

The call object.

CreateVehicleAsync(CreateVehicleRequest, Metadata, DateTime?, CancellationToken)

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 AsyncUnaryCall<Vehicle> CreateVehicleAsync(CreateVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Vehicle>

The call object.

DeleteVehicle(DeleteVehicleRequest, CallOptions)

Deletes a Vehicle from the Fleet Engine.

Returns FAILED_PRECONDITION if the Vehicle has active Trips. assigned to it.

Declaration
public virtual Empty DeleteVehicle(DeleteVehicleRequest request, CallOptions options)
Parameters
Type Name Description
DeleteVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteVehicle(DeleteVehicleRequest, Metadata, DateTime?, CancellationToken)

Deletes a Vehicle from the Fleet Engine.

Returns FAILED_PRECONDITION if the Vehicle has active Trips. assigned to it.

Declaration
public virtual Empty DeleteVehicle(DeleteVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteVehicleAsync(DeleteVehicleRequest, CallOptions)

Deletes a Vehicle from the Fleet Engine.

Returns FAILED_PRECONDITION if the Vehicle has active Trips. assigned to it.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteVehicleAsync(DeleteVehicleRequest request, CallOptions options)
Parameters
Type Name Description
DeleteVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteVehicleAsync(DeleteVehicleRequest, Metadata, DateTime?, CancellationToken)

Deletes a Vehicle from the Fleet Engine.

Returns FAILED_PRECONDITION if the Vehicle has active Trips. assigned to it.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteVehicleAsync(DeleteVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

GetVehicle(GetVehicleRequest, CallOptions)

Returns a vehicle from the Fleet Engine.

Declaration
public virtual Vehicle GetVehicle(GetVehicleRequest request, CallOptions options)
Parameters
Type Name Description
GetVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Vehicle

The response received from the server.

GetVehicle(GetVehicleRequest, Metadata, DateTime?, CancellationToken)

Returns a vehicle from the Fleet Engine.

Declaration
public virtual Vehicle GetVehicle(GetVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Vehicle

The response received from the server.

GetVehicleAsync(GetVehicleRequest, CallOptions)

Returns a vehicle from the Fleet Engine.

Declaration
public virtual AsyncUnaryCall<Vehicle> GetVehicleAsync(GetVehicleRequest request, CallOptions options)
Parameters
Type Name Description
GetVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Vehicle>

The call object.

GetVehicleAsync(GetVehicleRequest, Metadata, DateTime?, CancellationToken)

Returns a vehicle from the Fleet Engine.

Declaration
public virtual AsyncUnaryCall<Vehicle> GetVehicleAsync(GetVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Vehicle>

The call object.

ListVehicles(ListVehiclesRequest, CallOptions)

Returns a paginated list of vehicles associated with a provider that match the request options.

Declaration
public virtual ListVehiclesResponse ListVehicles(ListVehiclesRequest request, CallOptions options)
Parameters
Type Name Description
ListVehiclesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListVehiclesResponse

The response received from the server.

ListVehicles(ListVehiclesRequest, Metadata, DateTime?, CancellationToken)

Returns a paginated list of vehicles associated with a provider that match the request options.

Declaration
public virtual ListVehiclesResponse ListVehicles(ListVehiclesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListVehiclesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListVehiclesResponse

The response received from the server.

ListVehiclesAsync(ListVehiclesRequest, CallOptions)

Returns a paginated list of vehicles associated with a provider that match the request options.

Declaration
public virtual AsyncUnaryCall<ListVehiclesResponse> ListVehiclesAsync(ListVehiclesRequest request, CallOptions options)
Parameters
Type Name Description
ListVehiclesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListVehiclesResponse>

The call object.

ListVehiclesAsync(ListVehiclesRequest, Metadata, DateTime?, CancellationToken)

Returns a paginated list of vehicles associated with a provider that match the request options.

Declaration
public virtual AsyncUnaryCall<ListVehiclesResponse> ListVehiclesAsync(ListVehiclesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListVehiclesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListVehiclesResponse>

The call object.

NewInstance(ClientBaseConfiguration)

Creates a new instance of client from given ClientBaseConfiguration.

Declaration
protected override VehicleService.VehicleServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type Name Description
ClientBase.ClientBaseConfiguration configuration
Returns
Type Description
VehicleService.VehicleServiceClient
Overrides
Grpc.Core.ClientBase<Google.Maps.FleetEngine.V1.VehicleService.VehicleServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

SearchVehicles(SearchVehiclesRequest, CallOptions)

Returns a list of vehicles that match the request options.

Declaration
public virtual SearchVehiclesResponse SearchVehicles(SearchVehiclesRequest request, CallOptions options)
Parameters
Type Name Description
SearchVehiclesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
SearchVehiclesResponse

The response received from the server.

SearchVehicles(SearchVehiclesRequest, Metadata, DateTime?, CancellationToken)

Returns a list of vehicles that match the request options.

Declaration
public virtual SearchVehiclesResponse SearchVehicles(SearchVehiclesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SearchVehiclesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
SearchVehiclesResponse

The response received from the server.

SearchVehiclesAsync(SearchVehiclesRequest, CallOptions)

Returns a list of vehicles that match the request options.

Declaration
public virtual AsyncUnaryCall<SearchVehiclesResponse> SearchVehiclesAsync(SearchVehiclesRequest request, CallOptions options)
Parameters
Type Name Description
SearchVehiclesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<SearchVehiclesResponse>

The call object.

SearchVehiclesAsync(SearchVehiclesRequest, Metadata, DateTime?, CancellationToken)

Returns a list of vehicles that match the request options.

Declaration
public virtual AsyncUnaryCall<SearchVehiclesResponse> SearchVehiclesAsync(SearchVehiclesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SearchVehiclesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<SearchVehiclesResponse>

The call object.

UpdateVehicle(UpdateVehicleRequest, CallOptions)

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 Vehicle UpdateVehicle(UpdateVehicleRequest request, CallOptions options)
Parameters
Type Name Description
UpdateVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Vehicle

The response received from the server.

UpdateVehicle(UpdateVehicleRequest, Metadata, DateTime?, CancellationToken)

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 Vehicle UpdateVehicle(UpdateVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Vehicle

The response received from the server.

UpdateVehicleAsync(UpdateVehicleRequest, CallOptions)

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 AsyncUnaryCall<Vehicle> UpdateVehicleAsync(UpdateVehicleRequest request, CallOptions options)
Parameters
Type Name Description
UpdateVehicleRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Vehicle>

The call object.

UpdateVehicleAsync(UpdateVehicleRequest, Metadata, DateTime?, CancellationToken)

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 AsyncUnaryCall<Vehicle> UpdateVehicleAsync(UpdateVehicleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateVehicleRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Vehicle>

The call object.

UpdateVehicleAttributes(UpdateVehicleAttributesRequest, CallOptions)

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 UpdateVehicleAttributesResponse UpdateVehicleAttributes(UpdateVehicleAttributesRequest request, CallOptions options)
Parameters
Type Name Description
UpdateVehicleAttributesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
UpdateVehicleAttributesResponse

The response received from the server.

UpdateVehicleAttributes(UpdateVehicleAttributesRequest, Metadata, DateTime?, CancellationToken)

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 UpdateVehicleAttributesResponse UpdateVehicleAttributes(UpdateVehicleAttributesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateVehicleAttributesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
UpdateVehicleAttributesResponse

The response received from the server.

UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest, CallOptions)

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 AsyncUnaryCall<UpdateVehicleAttributesResponse> UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest request, CallOptions options)
Parameters
Type Name Description
UpdateVehicleAttributesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<UpdateVehicleAttributesResponse>

The call object.

UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest, Metadata, DateTime?, CancellationToken)

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 AsyncUnaryCall<UpdateVehicleAttributesResponse> UpdateVehicleAttributesAsync(UpdateVehicleAttributesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateVehicleAttributesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<UpdateVehicleAttributesResponse>

The call object.

In this article
Back to top Generated by DocFX