Class OptimizeToursResponse.Metrics.Builder (0.1.2)

publicstaticfinalclass OptimizeToursResponse.Metrics.BuilderextendsGeneratedMessageV3.Builder<OptimizeToursResponse.Metrics.Builder>implementsOptimizeToursResponse.MetricsOrBuilder

Overall metrics, aggregated over all routes.

Protobuf type google.cloud.optimization.v1.OptimizeToursResponse.Metrics

Inherited Members

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicOptimizeToursResponse.Metricsbuild()
Returns
Type Description

buildPartial()

publicOptimizeToursResponse.MetricsbuildPartial()
Returns
Type Description

clear()

publicOptimizeToursResponse.Metrics.Builderclear()
Returns
Type Description
Overrides

clearAggregatedRouteMetrics()

publicOptimizeToursResponse.Metrics.BuilderclearAggregatedRouteMetrics()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description

clearCosts()

publicOptimizeToursResponse.Metrics.BuilderclearCosts()
Returns
Type Description

clearEarliestVehicleStartTime()

publicOptimizeToursResponse.Metrics.BuilderclearEarliestVehicleStartTime()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description

clearField(Descriptors.FieldDescriptor field)

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

clearLatestVehicleEndTime()

publicOptimizeToursResponse.Metrics.BuilderclearLatestVehicleEndTime()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSkippedMandatoryShipmentCount()

publicOptimizeToursResponse.Metrics.BuilderclearSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Returns
Type Description
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

clearTotalCost()

publicOptimizeToursResponse.Metrics.BuilderclearTotalCost()

Total cost of the solution. The sum of all values in the costs map.

double total_cost = 6;

Returns
Type Description
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

clearUsedVehicleCount()

publicOptimizeToursResponse.Metrics.BuilderclearUsedVehicleCount()

Number of vehicles used. Note: if a vehicle route is empty and Vehicle.used_if_route_is_empty is true, the vehicle is considered used.

int32 used_vehicle_count = 3;

Returns
Type Description
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

clone()

publicOptimizeToursResponse.Metrics.Builderclone()
Returns
Type Description
Overrides

containsCosts(String key)

publicbooleancontainsCosts(Stringkey)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameter
Name Description
key String
Returns
Type Description

getAggregatedRouteMetrics()

publicAggregatedMetricsgetAggregatedRouteMetrics()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
AggregatedMetrics

The aggregatedRouteMetrics.

getAggregatedRouteMetricsBuilder()

publicAggregatedMetrics.BuildergetAggregatedRouteMetricsBuilder()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description

getAggregatedRouteMetricsOrBuilder()

publicAggregatedMetricsOrBuildergetAggregatedRouteMetricsOrBuilder()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description

getCosts()

publicMap<String,Double>getCosts()

Use #getCostsMap() instead.

Returns
Type Description

getCostsCount()

publicintgetCostsCount()

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Returns
Type Description
int

getCostsMap()

publicMap<String,Double>getCostsMap()

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Returns
Type Description

getCostsOrDefault(String key, double defaultValue)

publicdoublegetCostsOrDefault(Stringkey,doubledefaultValue)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameters
Name Description
key String
defaultValue double
Returns
Type Description

getCostsOrThrow(String key)

publicdoublegetCostsOrThrow(Stringkey)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameter
Name Description
key String
Returns
Type Description

getDefaultInstanceForType()

publicOptimizeToursResponse.MetricsgetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getEarliestVehicleStartTime()

publicTimestampgetEarliestVehicleStartTime()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
Timestamp

The earliestVehicleStartTime.

getEarliestVehicleStartTimeBuilder()

publicTimestamp.BuildergetEarliestVehicleStartTimeBuilder()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description

getEarliestVehicleStartTimeOrBuilder()

publicTimestampOrBuildergetEarliestVehicleStartTimeOrBuilder()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description

getLatestVehicleEndTime()

publicTimestampgetLatestVehicleEndTime()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
Timestamp

The latestVehicleEndTime.

getLatestVehicleEndTimeBuilder()

publicTimestamp.BuildergetLatestVehicleEndTimeBuilder()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description

getLatestVehicleEndTimeOrBuilder()

publicTimestampOrBuildergetLatestVehicleEndTimeOrBuilder()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description

getMutableCosts()

publicMap<String,Double>getMutableCosts()

Use alternate mutation accessors instead.

Returns
Type Description

getSkippedMandatoryShipmentCount()

publicintgetSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Returns
Type Description
int

The skippedMandatoryShipmentCount.

getTotalCost()

publicdoublegetTotalCost()

Total cost of the solution. The sum of all values in the costs map.

double total_cost = 6;

Returns
Type Description
double

The totalCost.

getUsedVehicleCount()

publicintgetUsedVehicleCount()

Number of vehicles used. Note: if a vehicle route is empty and Vehicle.used_if_route_is_empty is true, the vehicle is considered used.

int32 used_vehicle_count = 3;

Returns
Type Description
int

The usedVehicleCount.

hasAggregatedRouteMetrics()

publicbooleanhasAggregatedRouteMetrics()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
boolean

Whether the aggregatedRouteMetrics field is set.

hasEarliestVehicleStartTime()

publicbooleanhasEarliestVehicleStartTime()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
boolean

Whether the earliestVehicleStartTime field is set.

hasLatestVehicleEndTime()

publicbooleanhasLatestVehicleEndTime()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
boolean

Whether the latestVehicleEndTime field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

internalGetMutableMapField(int number)

protectedMapFieldinternalGetMutableMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeAggregatedRouteMetrics(AggregatedMetrics value)

publicOptimizeToursResponse.Metrics.BuildermergeAggregatedRouteMetrics(AggregatedMetricsvalue)

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Parameter
Name Description
Returns
Type Description

mergeEarliestVehicleStartTime(Timestamp value)

publicOptimizeToursResponse.Metrics.BuildermergeEarliestVehicleStartTime(Timestampvalue)

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description

mergeFrom(OptimizeToursResponse.Metrics other)

publicOptimizeToursResponse.Metrics.BuildermergeFrom(OptimizeToursResponse.Metricsother)
Parameter
Name Description
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeLatestVehicleEndTime(Timestamp value)

publicOptimizeToursResponse.Metrics.BuildermergeLatestVehicleEndTime(Timestampvalue)

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllCosts(Map<String,Double> values)

publicOptimizeToursResponse.Metrics.BuilderputAllCosts(Map<String,Double>values)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameter
Name Description
values Map<String,Double>
Returns
Type Description

putCosts(String key, double value)

publicOptimizeToursResponse.Metrics.BuilderputCosts(Stringkey,doublevalue)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameters
Name Description
key String
value double
Returns
Type Description

removeCosts(String key)

publicOptimizeToursResponse.Metrics.BuilderremoveCosts(Stringkey)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameter
Name Description
key String
Returns
Type Description

setAggregatedRouteMetrics(AggregatedMetrics value)

publicOptimizeToursResponse.Metrics.BuildersetAggregatedRouteMetrics(AggregatedMetricsvalue)

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Parameter
Name Description
Returns
Type Description

setAggregatedRouteMetrics(AggregatedMetrics.Builder builderForValue)

publicOptimizeToursResponse.Metrics.BuildersetAggregatedRouteMetrics(AggregatedMetrics.BuilderbuilderForValue)

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Parameter
Name Description
builderForValue AggregatedMetrics.Builder
Returns
Type Description

setEarliestVehicleStartTime(Timestamp value)

publicOptimizeToursResponse.Metrics.BuildersetEarliestVehicleStartTime(Timestampvalue)

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description

setEarliestVehicleStartTime(Timestamp.Builder builderForValue)

publicOptimizeToursResponse.Metrics.BuildersetEarliestVehicleStartTime(Timestamp.BuilderbuilderForValue)

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

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

setLatestVehicleEndTime(Timestamp value)

publicOptimizeToursResponse.Metrics.BuildersetLatestVehicleEndTime(Timestampvalue)

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description

setLatestVehicleEndTime(Timestamp.Builder builderForValue)

publicOptimizeToursResponse.Metrics.BuildersetLatestVehicleEndTime(Timestamp.BuilderbuilderForValue)

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Parameter
Name Description
builderForValue Builder
Returns
Type Description

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

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

setSkippedMandatoryShipmentCount(int value)

publicOptimizeToursResponse.Metrics.BuildersetSkippedMandatoryShipmentCount(intvalue)

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Parameter
Name Description
value int

The skippedMandatoryShipmentCount to set.

Returns
Type Description
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

setTotalCost(double value)

publicOptimizeToursResponse.Metrics.BuildersetTotalCost(doublevalue)

Total cost of the solution. The sum of all values in the costs map.

double total_cost = 6;

Parameter
Name Description
value double

The totalCost to set.

Returns
Type Description
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUsedVehicleCount(int value)

publicOptimizeToursResponse.Metrics.BuildersetUsedVehicleCount(intvalue)

Number of vehicles used. Note: if a vehicle route is empty and Vehicle.used_if_route_is_empty is true, the vehicle is considered used.

int32 used_vehicle_count = 3;

Parameter
Name Description
value int

The usedVehicleCount to set.

Returns
Type Description
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

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.