Class OptimizeToursResponse.Builder (1.18.0)

public static final class OptimizeToursResponse.Builder extends GeneratedMessageV3.Builder<OptimizeToursResponse.Builder> implements OptimizeToursResponseOrBuilder

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllRoutes(Iterable<? extends ShipmentRoute> values)

public OptimizeToursResponse.Builder addAllRoutes(Iterable<? extends ShipmentRoute> 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
NameDescription
valuesIterable<? extends com.google.cloud.optimization.v1.ShipmentRoute>
Returns
TypeDescription
OptimizeToursResponse.Builder

addAllSkippedShipments(Iterable<? extends SkippedShipment> values)

public OptimizeToursResponse.Builder addAllSkippedShipments(Iterable<? extends SkippedShipment> values)

The list of all shipments skipped.

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

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.optimization.v1.SkippedShipment>
Returns
TypeDescription
OptimizeToursResponse.Builder

addAllValidationErrors(Iterable<? extends OptimizeToursValidationError> values)

public OptimizeToursResponse.Builder addAllValidationErrors(Iterable<? extends OptimizeToursValidationError> 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
NameDescription
valuesIterable<? extends com.google.cloud.optimization.v1.OptimizeToursValidationError>
Returns
TypeDescription
OptimizeToursResponse.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OptimizeToursResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

addRoutes(ShipmentRoute value)

public OptimizeToursResponse.Builder addRoutes(ShipmentRoute value)

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
NameDescription
valueShipmentRoute
Returns
TypeDescription
OptimizeToursResponse.Builder

addRoutes(ShipmentRoute.Builder builderForValue)

public OptimizeToursResponse.Builder addRoutes(ShipmentRoute.Builder builderForValue)

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
NameDescription
builderForValueShipmentRoute.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

addRoutes(int index, ShipmentRoute value)

public OptimizeToursResponse.Builder addRoutes(int index, ShipmentRoute value)

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
NameDescription
indexint
valueShipmentRoute
Returns
TypeDescription
OptimizeToursResponse.Builder

addRoutes(int index, ShipmentRoute.Builder builderForValue)

public OptimizeToursResponse.Builder addRoutes(int index, ShipmentRoute.Builder builderForValue)

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
NameDescription
indexint
builderForValueShipmentRoute.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

addRoutesBuilder()

public ShipmentRoute.Builder addRoutesBuilder()

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
TypeDescription
ShipmentRoute.Builder

addRoutesBuilder(int index)

public ShipmentRoute.Builder addRoutesBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
ShipmentRoute.Builder

addSkippedShipments(SkippedShipment value)

public OptimizeToursResponse.Builder addSkippedShipments(SkippedShipment value)

The list of all shipments skipped.

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

Parameter
NameDescription
valueSkippedShipment
Returns
TypeDescription
OptimizeToursResponse.Builder

addSkippedShipments(SkippedShipment.Builder builderForValue)

public OptimizeToursResponse.Builder addSkippedShipments(SkippedShipment.Builder builderForValue)

The list of all shipments skipped.

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

Parameter
NameDescription
builderForValueSkippedShipment.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

addSkippedShipments(int index, SkippedShipment value)

public OptimizeToursResponse.Builder addSkippedShipments(int index, SkippedShipment value)

The list of all shipments skipped.

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

Parameters
NameDescription
indexint
valueSkippedShipment
Returns
TypeDescription
OptimizeToursResponse.Builder

addSkippedShipments(int index, SkippedShipment.Builder builderForValue)

public OptimizeToursResponse.Builder addSkippedShipments(int index, SkippedShipment.Builder builderForValue)

The list of all shipments skipped.

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

Parameters
NameDescription
indexint
builderForValueSkippedShipment.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

addSkippedShipmentsBuilder()

public SkippedShipment.Builder addSkippedShipmentsBuilder()

The list of all shipments skipped.

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

Returns
TypeDescription
SkippedShipment.Builder

addSkippedShipmentsBuilder(int index)

public SkippedShipment.Builder addSkippedShipmentsBuilder(int index)

The list of all shipments skipped.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SkippedShipment.Builder

addValidationErrors(OptimizeToursValidationError value)

public OptimizeToursResponse.Builder addValidationErrors(OptimizeToursValidationError value)

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
NameDescription
valueOptimizeToursValidationError
Returns
TypeDescription
OptimizeToursResponse.Builder

addValidationErrors(OptimizeToursValidationError.Builder builderForValue)

public OptimizeToursResponse.Builder addValidationErrors(OptimizeToursValidationError.Builder builderForValue)

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
NameDescription
builderForValueOptimizeToursValidationError.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

addValidationErrors(int index, OptimizeToursValidationError value)

public OptimizeToursResponse.Builder addValidationErrors(int index, OptimizeToursValidationError value)

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
NameDescription
indexint
valueOptimizeToursValidationError
Returns
TypeDescription
OptimizeToursResponse.Builder

addValidationErrors(int index, OptimizeToursValidationError.Builder builderForValue)

public OptimizeToursResponse.Builder addValidationErrors(int index, OptimizeToursValidationError.Builder builderForValue)

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
NameDescription
indexint
builderForValueOptimizeToursValidationError.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

addValidationErrorsBuilder()

public OptimizeToursValidationError.Builder addValidationErrorsBuilder()

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
TypeDescription
OptimizeToursValidationError.Builder

addValidationErrorsBuilder(int index)

public OptimizeToursValidationError.Builder addValidationErrorsBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
OptimizeToursValidationError.Builder

build()

public OptimizeToursResponse build()
Returns
TypeDescription
OptimizeToursResponse

buildPartial()

public OptimizeToursResponse buildPartial()
Returns
TypeDescription
OptimizeToursResponse

clear()

public OptimizeToursResponse.Builder clear()
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public OptimizeToursResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

clearMetrics()

public OptimizeToursResponse.Builder clearMetrics()

Duration, distance and usage metrics for this solution.

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

Returns
TypeDescription
OptimizeToursResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public OptimizeToursResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

clearRequestLabel()

public OptimizeToursResponse.Builder clearRequestLabel()

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

string request_label = 3;

Returns
TypeDescription
OptimizeToursResponse.Builder

This builder for chaining.

clearRoutes()

public OptimizeToursResponse.Builder clearRoutes()

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
TypeDescription
OptimizeToursResponse.Builder

clearSkippedShipments()

public OptimizeToursResponse.Builder clearSkippedShipments()

The list of all shipments skipped.

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

Returns
TypeDescription
OptimizeToursResponse.Builder

clearTotalCost() (deprecated)

public OptimizeToursResponse.Builder clearTotalCost()

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

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
TypeDescription
OptimizeToursResponse.Builder

This builder for chaining.

clearValidationErrors()

public OptimizeToursResponse.Builder clearValidationErrors()

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
TypeDescription
OptimizeToursResponse.Builder

clone()

public OptimizeToursResponse.Builder clone()
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

getDefaultInstanceForType()

public OptimizeToursResponse getDefaultInstanceForType()
Returns
TypeDescription
OptimizeToursResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMetrics()

public OptimizeToursResponse.Metrics getMetrics()

Duration, distance and usage metrics for this solution.

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

Returns
TypeDescription
OptimizeToursResponse.Metrics

The metrics.

getMetricsBuilder()

public OptimizeToursResponse.Metrics.Builder getMetricsBuilder()

Duration, distance and usage metrics for this solution.

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

Returns
TypeDescription
OptimizeToursResponse.Metrics.Builder

getMetricsOrBuilder()

public OptimizeToursResponse.MetricsOrBuilder getMetricsOrBuilder()

Duration, distance and usage metrics for this solution.

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

Returns
TypeDescription
OptimizeToursResponse.MetricsOrBuilder

getRequestLabel()

public String getRequestLabel()

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

string request_label = 3;

Returns
TypeDescription
String

The requestLabel.

getRequestLabelBytes()

public ByteString getRequestLabelBytes()

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

string request_label = 3;

Returns
TypeDescription
ByteString

The bytes for requestLabel.

getRoutes(int index)

public ShipmentRoute getRoutes(int index)

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
NameDescription
indexint
Returns
TypeDescription
ShipmentRoute

getRoutesBuilder(int index)

public ShipmentRoute.Builder getRoutesBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
ShipmentRoute.Builder

getRoutesBuilderList()

public List<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
TypeDescription
List<Builder>

getRoutesCount()

public int getRoutesCount()

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
TypeDescription
int

getRoutesList()

public List<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
TypeDescription
List<ShipmentRoute>

getRoutesOrBuilder(int index)

public ShipmentRouteOrBuilder getRoutesOrBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
ShipmentRouteOrBuilder

getRoutesOrBuilderList()

public List<? extends ShipmentRouteOrBuilder> 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
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>

getSkippedShipments(int index)

public SkippedShipment getSkippedShipments(int index)

The list of all shipments skipped.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SkippedShipment

getSkippedShipmentsBuilder(int index)

public SkippedShipment.Builder getSkippedShipmentsBuilder(int index)

The list of all shipments skipped.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SkippedShipment.Builder

getSkippedShipmentsBuilderList()

public List<SkippedShipment.Builder> getSkippedShipmentsBuilderList()

The list of all shipments skipped.

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

Returns
TypeDescription
List<Builder>

getSkippedShipmentsCount()

public int getSkippedShipmentsCount()

The list of all shipments skipped.

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

Returns
TypeDescription
int

getSkippedShipmentsList()

public List<SkippedShipment> getSkippedShipmentsList()

The list of all shipments skipped.

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

Returns
TypeDescription
List<SkippedShipment>

getSkippedShipmentsOrBuilder(int index)

public SkippedShipmentOrBuilder getSkippedShipmentsOrBuilder(int index)

The list of all shipments skipped.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SkippedShipmentOrBuilder

getSkippedShipmentsOrBuilderList()

public List<? extends SkippedShipmentOrBuilder> getSkippedShipmentsOrBuilderList()

The list of all shipments skipped.

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

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

getTotalCost() (deprecated)

public double getTotalCost()

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

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
TypeDescription
double

The totalCost.

getValidationErrors(int index)

public OptimizeToursValidationError getValidationErrors(int index)

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
NameDescription
indexint
Returns
TypeDescription
OptimizeToursValidationError

getValidationErrorsBuilder(int index)

public OptimizeToursValidationError.Builder getValidationErrorsBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
OptimizeToursValidationError.Builder

getValidationErrorsBuilderList()

public List<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
TypeDescription
List<Builder>

getValidationErrorsCount()

public int getValidationErrorsCount()

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
TypeDescription
int

getValidationErrorsList()

public List<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
TypeDescription
List<OptimizeToursValidationError>

getValidationErrorsOrBuilder(int index)

public OptimizeToursValidationErrorOrBuilder getValidationErrorsOrBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
OptimizeToursValidationErrorOrBuilder

getValidationErrorsOrBuilderList()

public List<? extends OptimizeToursValidationErrorOrBuilder> 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
TypeDescription
List<? extends com.google.cloud.optimization.v1.OptimizeToursValidationErrorOrBuilder>

hasMetrics()

public boolean hasMetrics()

Duration, distance and usage metrics for this solution.

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

Returns
TypeDescription
boolean

Whether the metrics field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OptimizeToursResponse other)

public OptimizeToursResponse.Builder mergeFrom(OptimizeToursResponse other)
Parameter
NameDescription
otherOptimizeToursResponse
Returns
TypeDescription
OptimizeToursResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OptimizeToursResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public OptimizeToursResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

mergeMetrics(OptimizeToursResponse.Metrics value)

public OptimizeToursResponse.Builder mergeMetrics(OptimizeToursResponse.Metrics value)

Duration, distance and usage metrics for this solution.

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

Parameter
NameDescription
valueOptimizeToursResponse.Metrics
Returns
TypeDescription
OptimizeToursResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OptimizeToursResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

removeRoutes(int index)

public OptimizeToursResponse.Builder removeRoutes(int index)

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
NameDescription
indexint
Returns
TypeDescription
OptimizeToursResponse.Builder

removeSkippedShipments(int index)

public OptimizeToursResponse.Builder removeSkippedShipments(int index)

The list of all shipments skipped.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
OptimizeToursResponse.Builder

removeValidationErrors(int index)

public OptimizeToursResponse.Builder removeValidationErrors(int index)

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
NameDescription
indexint
Returns
TypeDescription
OptimizeToursResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public OptimizeToursResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

setMetrics(OptimizeToursResponse.Metrics value)

public OptimizeToursResponse.Builder setMetrics(OptimizeToursResponse.Metrics value)

Duration, distance and usage metrics for this solution.

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

Parameter
NameDescription
valueOptimizeToursResponse.Metrics
Returns
TypeDescription
OptimizeToursResponse.Builder

setMetrics(OptimizeToursResponse.Metrics.Builder builderForValue)

public OptimizeToursResponse.Builder setMetrics(OptimizeToursResponse.Metrics.Builder builderForValue)

Duration, distance and usage metrics for this solution.

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

Parameter
NameDescription
builderForValueOptimizeToursResponse.Metrics.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

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

public OptimizeToursResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

setRequestLabel(String value)

public OptimizeToursResponse.Builder setRequestLabel(String value)

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

string request_label = 3;

Parameter
NameDescription
valueString

The requestLabel to set.

Returns
TypeDescription
OptimizeToursResponse.Builder

This builder for chaining.

setRequestLabelBytes(ByteString value)

public OptimizeToursResponse.Builder setRequestLabelBytes(ByteString value)

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

string request_label = 3;

Parameter
NameDescription
valueByteString

The bytes for requestLabel to set.

Returns
TypeDescription
OptimizeToursResponse.Builder

This builder for chaining.

setRoutes(int index, ShipmentRoute value)

public OptimizeToursResponse.Builder setRoutes(int index, ShipmentRoute value)

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
NameDescription
indexint
valueShipmentRoute
Returns
TypeDescription
OptimizeToursResponse.Builder

setRoutes(int index, ShipmentRoute.Builder builderForValue)

public OptimizeToursResponse.Builder setRoutes(int index, ShipmentRoute.Builder builderForValue)

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
NameDescription
indexint
builderForValueShipmentRoute.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

setSkippedShipments(int index, SkippedShipment value)

public OptimizeToursResponse.Builder setSkippedShipments(int index, SkippedShipment value)

The list of all shipments skipped.

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

Parameters
NameDescription
indexint
valueSkippedShipment
Returns
TypeDescription
OptimizeToursResponse.Builder

setSkippedShipments(int index, SkippedShipment.Builder builderForValue)

public OptimizeToursResponse.Builder setSkippedShipments(int index, SkippedShipment.Builder builderForValue)

The list of all shipments skipped.

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

Parameters
NameDescription
indexint
builderForValueSkippedShipment.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder

setTotalCost(double value) (deprecated)

public OptimizeToursResponse.Builder setTotalCost(double value)

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

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
NameDescription
valuedouble

The totalCost to set.

Returns
TypeDescription
OptimizeToursResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final OptimizeToursResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

setValidationErrors(int index, OptimizeToursValidationError value)

public OptimizeToursResponse.Builder setValidationErrors(int index, OptimizeToursValidationError value)

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
NameDescription
indexint
valueOptimizeToursValidationError
Returns
TypeDescription
OptimizeToursResponse.Builder

setValidationErrors(int index, OptimizeToursValidationError.Builder builderForValue)

public OptimizeToursResponse.Builder setValidationErrors(int index, OptimizeToursValidationError.Builder builderForValue)

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
NameDescription
indexint
builderForValueOptimizeToursValidationError.Builder
Returns
TypeDescription
OptimizeToursResponse.Builder