Class RouteOptimizationClientImpl
RouteOptimization client wrapper implementation, for convenient use.
Inherited Members
Namespace: Google.Maps.RouteOptimization.V1
Assembly: Google.Maps.RouteOptimization.V1.dll
Syntax
public sealed class RouteOptimizationClientImpl : RouteOptimizationClient
Remarks
A service for optimizing vehicle tours.
Validity of certain types of fields:
google.protobuf.Timestamp- Times are in Unix time: seconds since 1970-01-01T00:00:00+00:00.
- seconds must be in [0, 253402300799], i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
- nanos must be unset or set to 0.
google.protobuf.Duration- seconds must be in [0, 253402300799], i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
- nanos must be unset or set to 0.
google.type.LatLng- latitude must be in [-90.0, 90.0].
- longitude must be in [-180.0, 180.0].
- at least one of latitude and longitude must be non-zero.
Constructors
RouteOptimizationClientImpl(RouteOptimizationClient, RouteOptimizationSettings, ILogger)
Constructs a client wrapper for the RouteOptimization service, with the specified gRPC client and settings.
Declaration
public RouteOptimizationClientImpl(RouteOptimization.RouteOptimizationClient grpcClient, RouteOptimizationSettings settings, ILogger logger)
Parameters
| Type | Name | Description |
|---|---|---|
| RouteOptimization.RouteOptimizationClient | grpcClient | The underlying gRPC client. |
| RouteOptimizationSettings | settings | The base RouteOptimizationSettings used within this client. |
| ILogger | logger | Optional ILogger to use within this client. |
Properties
BatchOptimizeToursOperationsClient
The long-running operations client for BatchOptimizeTours.
Declaration
public override OperationsClient BatchOptimizeToursOperationsClient { get; }
Property Value
| Type | Description |
|---|---|
| OperationsClient |
Overrides
GrpcClient
The underlying gRPC RouteOptimization client
Declaration
public override RouteOptimization.RouteOptimizationClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| RouteOptimization.RouteOptimizationClient |
Overrides
OptimizeToursLongRunningOperationsClient
The long-running operations client for OptimizeToursLongRunning.
Declaration
public override OperationsClient OptimizeToursLongRunningOperationsClient { get; }
Property Value
| Type | Description |
|---|---|
| OperationsClient |
Overrides
OptimizeToursUriOperationsClient
The long-running operations client for OptimizeToursUri.
Declaration
public override OperationsClient OptimizeToursUriOperationsClient { get; }
Property Value
| Type | Description |
|---|---|
| OperationsClient |
Overrides
Methods
BatchOptimizeTours(BatchOptimizeToursRequest, CallSettings)
Optimizes vehicle tours for one or more OptimizeToursRequest
messages as a batch.
This method is a Long Running Operation (LRO). The inputs for optimization
(OptimizeToursRequest messages) and outputs (OptimizeToursResponse
messages) are read from and written to Cloud Storage in user-specified
format. Like the OptimizeTours method, each OptimizeToursRequest
contains a ShipmentModel and returns an OptimizeToursResponse
containing ShipmentRoute fields, which are a set of routes to be
performed by vehicles minimizing the overall cost.
The user can poll operations.get to check the status of the LRO:
If the LRO done field is false, then at least one request is still
being processed. Other requests may have completed successfully and their
results are available in Cloud Storage.
If the LRO's done field is true, then all requests have been processed.
Any successfully processed requests will have their results available in
Cloud Storage. Any requests that failed will not have their results
available in Cloud Storage. If the LRO's error field is set, then it
contains the error from one of the failed requests.
Declaration
public override Operation<BatchOptimizeToursResponse, BatchOptimizeToursMetadata> BatchOptimizeTours(BatchOptimizeToursRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchOptimizeToursRequest | 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 |
|---|---|
| Operation<BatchOptimizeToursResponse, BatchOptimizeToursMetadata> | The RPC response. |
Overrides
BatchOptimizeToursAsync(BatchOptimizeToursRequest, CallSettings)
Optimizes vehicle tours for one or more OptimizeToursRequest
messages as a batch.
This method is a Long Running Operation (LRO). The inputs for optimization
(OptimizeToursRequest messages) and outputs (OptimizeToursResponse
messages) are read from and written to Cloud Storage in user-specified
format. Like the OptimizeTours method, each OptimizeToursRequest
contains a ShipmentModel and returns an OptimizeToursResponse
containing ShipmentRoute fields, which are a set of routes to be
performed by vehicles minimizing the overall cost.
The user can poll operations.get to check the status of the LRO:
If the LRO done field is false, then at least one request is still
being processed. Other requests may have completed successfully and their
results are available in Cloud Storage.
If the LRO's done field is true, then all requests have been processed.
Any successfully processed requests will have their results available in
Cloud Storage. Any requests that failed will not have their results
available in Cloud Storage. If the LRO's error field is set, then it
contains the error from one of the failed requests.
Declaration
public override Task<Operation<BatchOptimizeToursResponse, BatchOptimizeToursMetadata>> BatchOptimizeToursAsync(BatchOptimizeToursRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchOptimizeToursRequest | 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<Operation<BatchOptimizeToursResponse, BatchOptimizeToursMetadata>> | A Task containing the RPC response. |
Overrides
OptimizeTours(OptimizeToursRequest, CallSettings)
Sends an OptimizeToursRequest containing a ShipmentModel and returns an
OptimizeToursResponse containing ShipmentRoutes, which are a set of
routes to be performed by vehicles minimizing the overall cost.
A ShipmentModel model consists mainly of Shipments that need to be
carried out and Vehicles that can be used to transport the Shipments.
The ShipmentRoutes assign Shipments to Vehicles. More specifically,
they assign a series of Visits to each vehicle, where a Visit
corresponds to a VisitRequest, which is a pickup or delivery for a
Shipment.
The goal is to provide an assignment of ShipmentRoutes to Vehicles that
minimizes the total cost where cost has many components defined in the
ShipmentModel.
Declaration
public override OptimizeToursResponse OptimizeTours(OptimizeToursRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OptimizeToursRequest | 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 |
|---|---|
| OptimizeToursResponse | The RPC response. |
Overrides
OptimizeToursAsync(OptimizeToursRequest, CallSettings)
Sends an OptimizeToursRequest containing a ShipmentModel and returns an
OptimizeToursResponse containing ShipmentRoutes, which are a set of
routes to be performed by vehicles minimizing the overall cost.
A ShipmentModel model consists mainly of Shipments that need to be
carried out and Vehicles that can be used to transport the Shipments.
The ShipmentRoutes assign Shipments to Vehicles. More specifically,
they assign a series of Visits to each vehicle, where a Visit
corresponds to a VisitRequest, which is a pickup or delivery for a
Shipment.
The goal is to provide an assignment of ShipmentRoutes to Vehicles that
minimizes the total cost where cost has many components defined in the
ShipmentModel.
Declaration
public override Task<OptimizeToursResponse> OptimizeToursAsync(OptimizeToursRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OptimizeToursRequest | 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<OptimizeToursResponse> | A Task containing the RPC response. |
Overrides
OptimizeToursLongRunning(OptimizeToursRequest, CallSettings)
This is a variant of the
[OptimizeTours][google.maps.routeoptimization.v1.RouteOptimization.OptimizeTours]
method designed for
optimizations with large timeout values. It should be preferred over the
OptimizeTours method for optimizations that take longer than
a few minutes.
The returned [long-running operation][google.longrunning.Operation] (LRO)
will have a name of the format
<parent>/operations/<operation_id> and can be used to track
progress of the computation. The
[metadata][google.longrunning.Operation.metadata] field type is
[OptimizeToursLongRunningMetadata][google.maps.routeoptimization.v1.OptimizeToursLongRunningMetadata].
The [response][google.longrunning.Operation.response] field type is
[OptimizeToursResponse][google.maps.routeoptimization.v1.OptimizeToursResponse],
if successful.
Experimental: See https://developers.google.com/maps/tt/route-optimization/experimental/otlr/make-request for more details.
Declaration
public override Operation<OptimizeToursResponse, OptimizeToursLongRunningMetadata> OptimizeToursLongRunning(OptimizeToursRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OptimizeToursRequest | 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 |
|---|---|
| Operation<OptimizeToursResponse, OptimizeToursLongRunningMetadata> | The RPC response. |
Overrides
OptimizeToursLongRunningAsync(OptimizeToursRequest, CallSettings)
This is a variant of the
[OptimizeTours][google.maps.routeoptimization.v1.RouteOptimization.OptimizeTours]
method designed for
optimizations with large timeout values. It should be preferred over the
OptimizeTours method for optimizations that take longer than
a few minutes.
The returned [long-running operation][google.longrunning.Operation] (LRO)
will have a name of the format
<parent>/operations/<operation_id> and can be used to track
progress of the computation. The
[metadata][google.longrunning.Operation.metadata] field type is
[OptimizeToursLongRunningMetadata][google.maps.routeoptimization.v1.OptimizeToursLongRunningMetadata].
The [response][google.longrunning.Operation.response] field type is
[OptimizeToursResponse][google.maps.routeoptimization.v1.OptimizeToursResponse],
if successful.
Experimental: See https://developers.google.com/maps/tt/route-optimization/experimental/otlr/make-request for more details.
Declaration
public override Task<Operation<OptimizeToursResponse, OptimizeToursLongRunningMetadata>> OptimizeToursLongRunningAsync(OptimizeToursRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OptimizeToursRequest | 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<Operation<OptimizeToursResponse, OptimizeToursLongRunningMetadata>> | A Task containing the RPC response. |
Overrides
OptimizeToursUri(OptimizeToursUriRequest, CallSettings)
This is a variant of the [OptimizeToursLongRunning][google.maps.routeoptimization.v1.RouteOptimization.OptimizeToursLongRunning] method designed for optimizations with large timeout values and large input/output sizes.
The client specifies the URI of the OptimizeToursRequest stored
in Google Cloud Storage and the server writes the OptimizeToursResponse
to a client-specified Google Cloud Storage URI.
This method should be preferred over the OptimizeTours method for
optimizations that take longer than a few minutes and input/output sizes
that are larger than 8MB, though it can be used for shorter and smaller
optimizations as well.
The returned [long-running operation][google.longrunning.Operation] (LRO)
will have a name of the format
<parent>/operations/<operation_id> and can be used to track
progress of the computation. The
[metadata][google.longrunning.Operation.metadata] field type is
[OptimizeToursLongRunningMetadata][google.maps.routeoptimization.v1.OptimizeToursUriMetadata].
The [response][google.longrunning.Operation.response] field type is
[OptimizeToursUriResponse][google.maps.routeoptimization.v1.OptimizeToursUriResponse],
if successful.
Experimental: See https://developers.google.com/maps/tt/route-optimization/experimental/otlr/make-request for more details.
Declaration
public override Operation<OptimizeToursUriResponse, OptimizeToursUriMetadata> OptimizeToursUri(OptimizeToursUriRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OptimizeToursUriRequest | 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 |
|---|---|
| Operation<OptimizeToursUriResponse, OptimizeToursUriMetadata> | The RPC response. |
Overrides
OptimizeToursUriAsync(OptimizeToursUriRequest, CallSettings)
This is a variant of the [OptimizeToursLongRunning][google.maps.routeoptimization.v1.RouteOptimization.OptimizeToursLongRunning] method designed for optimizations with large timeout values and large input/output sizes.
The client specifies the URI of the OptimizeToursRequest stored
in Google Cloud Storage and the server writes the OptimizeToursResponse
to a client-specified Google Cloud Storage URI.
This method should be preferred over the OptimizeTours method for
optimizations that take longer than a few minutes and input/output sizes
that are larger than 8MB, though it can be used for shorter and smaller
optimizations as well.
The returned [long-running operation][google.longrunning.Operation] (LRO)
will have a name of the format
<parent>/operations/<operation_id> and can be used to track
progress of the computation. The
[metadata][google.longrunning.Operation.metadata] field type is
[OptimizeToursLongRunningMetadata][google.maps.routeoptimization.v1.OptimizeToursUriMetadata].
The [response][google.longrunning.Operation.response] field type is
[OptimizeToursUriResponse][google.maps.routeoptimization.v1.OptimizeToursUriResponse],
if successful.
Experimental: See https://developers.google.com/maps/tt/route-optimization/experimental/otlr/make-request for more details.
Declaration
public override Task<Operation<OptimizeToursUriResponse, OptimizeToursUriMetadata>> OptimizeToursUriAsync(OptimizeToursUriRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OptimizeToursUriRequest | 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<Operation<OptimizeToursUriResponse, OptimizeToursUriMetadata>> | A Task containing the RPC response. |