Class OptimizeToursResponse.Builder (1.4.0)

publicstaticfinalclass OptimizeToursResponse.BuilderextendsGeneratedMessageV3.Builder<OptimizeToursResponse.Builder>implementsOptimizeToursResponseOrBuilder

Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.

Protobuf type google.cloud.optimization.v1.OptimizeToursResponse

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addAllRoutes(Iterable<? extends ShipmentRoute> values)

publicOptimizeToursResponse.BuilderaddAllRoutes(Iterable<?extendsShipmentRoute>values)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute>
Returns
Type Description

addAllSkippedShipments(Iterable<? extends SkippedShipment> values)

publicOptimizeToursResponse.BuilderaddAllSkippedShipments(Iterable<?extendsSkippedShipment>values)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.SkippedShipment>
Returns
Type Description

addAllValidationErrors(Iterable<? extends OptimizeToursValidationError> values)

publicOptimizeToursResponse.BuilderaddAllValidationErrors(Iterable<?extendsOptimizeToursValidationError>values)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.OptimizeToursValidationError>
Returns
Type Description

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicOptimizeToursResponse.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

addRoutes(ShipmentRoute value)

publicOptimizeToursResponse.BuilderaddRoutes(ShipmentRoutevalue)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
Returns
Type Description

addRoutes(ShipmentRoute.Builder builderForValue)

publicOptimizeToursResponse.BuilderaddRoutes(ShipmentRoute.BuilderbuilderForValue)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
builderForValue ShipmentRoute.Builder
Returns
Type Description

addRoutes(int index, ShipmentRoute value)

publicOptimizeToursResponse.BuilderaddRoutes(intindex,ShipmentRoutevalue)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameters
Name Description
index int
Returns
Type Description

addRoutes(int index, ShipmentRoute.Builder builderForValue)

publicOptimizeToursResponse.BuilderaddRoutes(intindex,ShipmentRoute.BuilderbuilderForValue)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameters
Name Description
index int
builderForValue ShipmentRoute.Builder
Returns
Type Description

addRoutesBuilder()

publicShipmentRoute.BuilderaddRoutesBuilder()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description

addRoutesBuilder(int index)

publicShipmentRoute.BuilderaddRoutesBuilder(intindex)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
index int
Returns
Type Description

addSkippedShipments(SkippedShipment value)

publicOptimizeToursResponse.BuilderaddSkippedShipments(SkippedShipmentvalue)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
Returns
Type Description

addSkippedShipments(SkippedShipment.Builder builderForValue)

publicOptimizeToursResponse.BuilderaddSkippedShipments(SkippedShipment.BuilderbuilderForValue)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
builderForValue SkippedShipment.Builder
Returns
Type Description

addSkippedShipments(int index, SkippedShipment value)

publicOptimizeToursResponse.BuilderaddSkippedShipments(intindex,SkippedShipmentvalue)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameters
Name Description
index int
Returns
Type Description

addSkippedShipments(int index, SkippedShipment.Builder builderForValue)

publicOptimizeToursResponse.BuilderaddSkippedShipments(intindex,SkippedShipment.BuilderbuilderForValue)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameters
Name Description
index int
builderForValue SkippedShipment.Builder
Returns
Type Description

addSkippedShipmentsBuilder()

publicSkippedShipment.BuilderaddSkippedShipmentsBuilder()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description

addSkippedShipmentsBuilder(int index)

publicSkippedShipment.BuilderaddSkippedShipmentsBuilder(intindex)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description

addValidationErrors(OptimizeToursValidationError value)

publicOptimizeToursResponse.BuilderaddValidationErrors(OptimizeToursValidationErrorvalue)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
Returns
Type Description

addValidationErrors(OptimizeToursValidationError.Builder builderForValue)

publicOptimizeToursResponse.BuilderaddValidationErrors(OptimizeToursValidationError.BuilderbuilderForValue)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
Returns
Type Description

addValidationErrors(int index, OptimizeToursValidationError value)

publicOptimizeToursResponse.BuilderaddValidationErrors(intindex,OptimizeToursValidationErrorvalue)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameters
Name Description
index int
Returns
Type Description

addValidationErrors(int index, OptimizeToursValidationError.Builder builderForValue)

publicOptimizeToursResponse.BuilderaddValidationErrors(intindex,OptimizeToursValidationError.BuilderbuilderForValue)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameters
Name Description
index int
Returns
Type Description

addValidationErrorsBuilder()

publicOptimizeToursValidationError.BuilderaddValidationErrorsBuilder()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description

addValidationErrorsBuilder(int index)

publicOptimizeToursValidationError.BuilderaddValidationErrorsBuilder(intindex)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
index int
Returns
Type Description

build()

publicOptimizeToursResponsebuild()
Returns
Type Description

buildPartial()

publicOptimizeToursResponsebuildPartial()
Returns
Type Description

clear()

publicOptimizeToursResponse.Builderclear()
Returns
Type Description
Overrides

clearField(Descriptors.FieldDescriptor field)

publicOptimizeToursResponse.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearMetrics()

publicOptimizeToursResponse.BuilderclearMetrics()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description

clearOneof(Descriptors.OneofDescriptor oneof)

publicOptimizeToursResponse.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clearRequestLabel()

publicOptimizeToursResponse.BuilderclearRequestLabel()

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

string request_label = 3;

Returns
Type Description
OptimizeToursResponse.Builder

This builder for chaining.

clearRoutes()

publicOptimizeToursResponse.BuilderclearRoutes()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description

clearSkippedShipments()

publicOptimizeToursResponse.BuilderclearSkippedShipments()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description

clearTotalCost() (deprecated)

publicOptimizeToursResponse.BuilderclearTotalCost()

Deprecated. google.cloud.optimization.v1.OptimizeToursResponse.total_cost is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=394

Deprecated: Use [Metrics.total_cost][] instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.

double total_cost = 2 [deprecated = true];

Returns
Type Description
OptimizeToursResponse.Builder

This builder for chaining.

clearValidationErrors()

publicOptimizeToursResponse.BuilderclearValidationErrors()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description

clone()

publicOptimizeToursResponse.Builderclone()
Returns
Type Description
Overrides

getDefaultInstanceForType()

publicOptimizeToursResponsegetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getMetrics()

publicOptimizeToursResponse.MetricsgetMetrics()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description

getMetricsBuilder()

publicOptimizeToursResponse.Metrics.BuildergetMetricsBuilder()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description

getMetricsOrBuilder()

publicOptimizeToursResponse.MetricsOrBuildergetMetricsOrBuilder()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description

getRequestLabel()

publicStringgetRequestLabel()

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

string request_label = 3;

Returns
Type Description
String

The requestLabel.

getRequestLabelBytes()

publicByteStringgetRequestLabelBytes()

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

string request_label = 3;

Returns
Type Description
ByteString

The bytes for requestLabel.

getRoutes(int index)

publicShipmentRoutegetRoutes(intindex)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
index int
Returns
Type Description

getRoutesBuilder(int index)

publicShipmentRoute.BuildergetRoutesBuilder(intindex)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
index int
Returns
Type Description

getRoutesBuilderList()

publicList<ShipmentRoute.Builder>getRoutesBuilderList()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description

getRoutesCount()

publicintgetRoutesCount()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description
int

getRoutesList()

publicList<ShipmentRoute>getRoutesList()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description

getRoutesOrBuilder(int index)

publicShipmentRouteOrBuildergetRoutesOrBuilder(intindex)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
index int
Returns
Type Description

getRoutesOrBuilderList()

publicList<?extendsShipmentRouteOrBuilder>getRoutesOrBuilderList()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>

getSkippedShipments(int index)

publicSkippedShipmentgetSkippedShipments(intindex)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description

getSkippedShipmentsBuilder(int index)

publicSkippedShipment.BuildergetSkippedShipmentsBuilder(intindex)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description

getSkippedShipmentsBuilderList()

publicList<SkippedShipment.Builder>getSkippedShipmentsBuilderList()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description

getSkippedShipmentsCount()

publicintgetSkippedShipmentsCount()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description
int

getSkippedShipmentsList()

publicList<SkippedShipment>getSkippedShipmentsList()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description

getSkippedShipmentsOrBuilder(int index)

publicSkippedShipmentOrBuildergetSkippedShipmentsOrBuilder(intindex)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description

getSkippedShipmentsOrBuilderList()

publicList<?extendsSkippedShipmentOrBuilder>getSkippedShipmentsOrBuilderList()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.SkippedShipmentOrBuilder>

getTotalCost() (deprecated)

publicdoublegetTotalCost()

Deprecated. google.cloud.optimization.v1.OptimizeToursResponse.total_cost is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=394

Deprecated: Use [Metrics.total_cost][] instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.

double total_cost = 2 [deprecated = true];

Returns
Type Description
double

The totalCost.

getValidationErrors(int index)

publicOptimizeToursValidationErrorgetValidationErrors(intindex)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
index int
Returns
Type Description

getValidationErrorsBuilder(int index)

publicOptimizeToursValidationError.BuildergetValidationErrorsBuilder(intindex)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
index int
Returns
Type Description

getValidationErrorsBuilderList()

publicList<OptimizeToursValidationError.Builder>getValidationErrorsBuilderList()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description

getValidationErrorsCount()

publicintgetValidationErrorsCount()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description
int

getValidationErrorsList()

publicList<OptimizeToursValidationError>getValidationErrorsList()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description

getValidationErrorsOrBuilder(int index)

publicOptimizeToursValidationErrorOrBuildergetValidationErrorsOrBuilder(intindex)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
index int
Returns
Type Description

getValidationErrorsOrBuilderList()

publicList<?extendsOptimizeToursValidationErrorOrBuilder>getValidationErrorsOrBuilderList()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.OptimizeToursValidationErrorOrBuilder>

hasMetrics()

publicbooleanhasMetrics()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description
boolean

Whether the metrics field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeFrom(OptimizeToursResponse other)

publicOptimizeToursResponse.BuildermergeFrom(OptimizeToursResponseother)
Parameter
Name Description
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicOptimizeToursResponse.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicOptimizeToursResponse.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeMetrics(OptimizeToursResponse.Metrics value)

publicOptimizeToursResponse.BuildermergeMetrics(OptimizeToursResponse.Metricsvalue)

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Parameter
Name Description
Returns
Type Description

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalOptimizeToursResponse.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

removeRoutes(int index)

publicOptimizeToursResponse.BuilderremoveRoutes(intindex)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
index int
Returns
Type Description

removeSkippedShipments(int index)

publicOptimizeToursResponse.BuilderremoveSkippedShipments(intindex)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description

removeValidationErrors(int index)

publicOptimizeToursResponse.BuilderremoveValidationErrors(intindex)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
index int
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicOptimizeToursResponse.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setMetrics(OptimizeToursResponse.Metrics value)

publicOptimizeToursResponse.BuildersetMetrics(OptimizeToursResponse.Metricsvalue)

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Parameter
Name Description
Returns
Type Description

setMetrics(OptimizeToursResponse.Metrics.Builder builderForValue)

publicOptimizeToursResponse.BuildersetMetrics(OptimizeToursResponse.Metrics.BuilderbuilderForValue)

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Parameter
Name Description
Returns
Type Description

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicOptimizeToursResponse.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setRequestLabel(String value)

publicOptimizeToursResponse.BuildersetRequestLabel(Stringvalue)

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

string request_label = 3;

Parameter
Name Description
value String

The requestLabel to set.

Returns
Type Description
OptimizeToursResponse.Builder

This builder for chaining.

setRequestLabelBytes(ByteString value)

publicOptimizeToursResponse.BuildersetRequestLabelBytes(ByteStringvalue)

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

string request_label = 3;

Parameter
Name Description
value ByteString

The bytes for requestLabel to set.

Returns
Type Description
OptimizeToursResponse.Builder

This builder for chaining.

setRoutes(int index, ShipmentRoute value)

publicOptimizeToursResponse.BuildersetRoutes(intindex,ShipmentRoutevalue)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameters
Name Description
index int
Returns
Type Description

setRoutes(int index, ShipmentRoute.Builder builderForValue)

publicOptimizeToursResponse.BuildersetRoutes(intindex,ShipmentRoute.BuilderbuilderForValue)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameters
Name Description
index int
builderForValue ShipmentRoute.Builder
Returns
Type Description

setSkippedShipments(int index, SkippedShipment value)

publicOptimizeToursResponse.BuildersetSkippedShipments(intindex,SkippedShipmentvalue)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameters
Name Description
index int
Returns
Type Description

setSkippedShipments(int index, SkippedShipment.Builder builderForValue)

publicOptimizeToursResponse.BuildersetSkippedShipments(intindex,SkippedShipment.BuilderbuilderForValue)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameters
Name Description
index int
builderForValue SkippedShipment.Builder
Returns
Type Description

setTotalCost(double value) (deprecated)

publicOptimizeToursResponse.BuildersetTotalCost(doublevalue)

Deprecated. google.cloud.optimization.v1.OptimizeToursResponse.total_cost is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=394

Deprecated: Use [Metrics.total_cost][] instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.

double total_cost = 2 [deprecated = true];

Parameter
Name Description
value double

The totalCost to set.

Returns
Type Description
OptimizeToursResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalOptimizeToursResponse.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

setValidationErrors(int index, OptimizeToursValidationError value)

publicOptimizeToursResponse.BuildersetValidationErrors(intindex,OptimizeToursValidationErrorvalue)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameters
Name Description
index int
Returns
Type Description

setValidationErrors(int index, OptimizeToursValidationError.Builder builderForValue)

publicOptimizeToursResponse.BuildersetValidationErrors(intindex,OptimizeToursValidationError.BuilderbuilderForValue)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameters
Name Description
index int
Returns
Type Description

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.