Class AggregatedMetrics.Builder (1.71.0)

publicstaticfinalclass AggregatedMetrics.BuilderextendsGeneratedMessageV3.Builder<AggregatedMetrics.Builder>implementsAggregatedMetricsOrBuilder

Aggregated metrics for ShipmentRoute (resp. for OptimizeToursResponse over all Transition and/or Visit (resp. over all ShipmentRoute) elements.

Protobuf type google.cloud.optimization.v1.AggregatedMetrics

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicAggregatedMetrics.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AggregatedMetrics.Builder
Overrides

build()

publicAggregatedMetricsbuild()
Returns
Type Description
AggregatedMetrics

buildPartial()

publicAggregatedMetricsbuildPartial()
Returns
Type Description
AggregatedMetrics

clear()

publicAggregatedMetrics.Builderclear()
Returns
Type Description
AggregatedMetrics.Builder
Overrides

clearBreakDuration()

publicAggregatedMetrics.BuilderclearBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
AggregatedMetrics.Builder

clearCosts() (deprecated)

publicAggregatedMetrics.BuilderclearCosts()
Returns
Type Description
AggregatedMetrics.Builder

clearDelayDuration()

publicAggregatedMetrics.BuilderclearDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
AggregatedMetrics.Builder

clearField(Descriptors.FieldDescriptor field)

publicAggregatedMetrics.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AggregatedMetrics.Builder
Overrides

clearMaxLoads()

publicAggregatedMetrics.BuilderclearMaxLoads()
Returns
Type Description
AggregatedMetrics.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicAggregatedMetrics.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AggregatedMetrics.Builder
Overrides

clearPerformedShipmentCount()

publicAggregatedMetrics.BuilderclearPerformedShipmentCount()

Number of shipments performed. Note that a pickup and delivery pair only counts once.

int32 performed_shipment_count = 1;

Returns
Type Description
AggregatedMetrics.Builder

This builder for chaining.

clearTotalCost() (deprecated)

publicAggregatedMetrics.BuilderclearTotalCost()

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

Deprecated: Use ShipmentRoute.route_total_cost and OptimizeToursResponse.Metrics.total_cost instead.

double total_cost = 11 [deprecated = true];

Returns
Type Description
AggregatedMetrics.Builder

This builder for chaining.

clearTotalDuration()

publicAggregatedMetrics.BuilderclearTotalDuration()

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Returns
Type Description
AggregatedMetrics.Builder

clearTravelDistanceMeters()

publicAggregatedMetrics.BuilderclearTravelDistanceMeters()

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Returns
Type Description
AggregatedMetrics.Builder

This builder for chaining.

clearTravelDuration()

publicAggregatedMetrics.BuilderclearTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
Type Description
AggregatedMetrics.Builder

clearVisitDuration()

publicAggregatedMetrics.BuilderclearVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
Type Description
AggregatedMetrics.Builder

clearWaitDuration()

publicAggregatedMetrics.BuilderclearWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
Type Description
AggregatedMetrics.Builder

clone()

publicAggregatedMetrics.Builderclone()
Returns
Type Description
AggregatedMetrics.Builder
Overrides

containsCosts(String key) (deprecated)

publicbooleancontainsCosts(Stringkey)

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

Parameter
Name Description
key String
Returns
Type Description
boolean

containsMaxLoads(String key)

publicbooleancontainsMaxLoads(Stringkey)

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Parameter
Name Description
key String
Returns
Type Description
boolean

getBreakDuration()

publicDurationgetBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
Duration

The breakDuration.

getBreakDurationBuilder()

publicDuration.BuildergetBreakDurationBuilder()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
Builder

getBreakDurationOrBuilder()

publicDurationOrBuildergetBreakDurationOrBuilder()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
DurationOrBuilder

getCosts() (deprecated)

publicMap<String,Double>getCosts()

Use #getCostsMap() instead.

Returns
Type Description
Map<String,Double>

getCostsCount() (deprecated)

publicintgetCostsCount()

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

Returns
Type Description
int

getCostsMap() (deprecated)

publicMap<String,Double>getCostsMap()

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

Returns
Type Description
Map<String,Double>

getCostsOrDefault(String key, double defaultValue) (deprecated)

publicdoublegetCostsOrDefault(Stringkey,doubledefaultValue)

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

Parameters
Name Description
key String
defaultValue double
Returns
Type Description
double

getCostsOrThrow(String key) (deprecated)

publicdoublegetCostsOrThrow(Stringkey)

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

Parameter
Name Description
key String
Returns
Type Description
double

getDefaultInstanceForType()

publicAggregatedMetricsgetDefaultInstanceForType()
Returns
Type Description
AggregatedMetrics

getDelayDuration()

publicDurationgetDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
Duration

The delayDuration.

getDelayDurationBuilder()

publicDuration.BuildergetDelayDurationBuilder()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
Builder

getDelayDurationOrBuilder()

publicDurationOrBuildergetDelayDurationOrBuilder()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
DurationOrBuilder

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMaxLoads() (deprecated)

publicMap<String,ShipmentRoute.VehicleLoad>getMaxLoads()

Use #getMaxLoadsMap() instead.

Returns
Type Description
Map<String,VehicleLoad>

getMaxLoadsCount()

publicintgetMaxLoadsCount()

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Returns
Type Description
int

getMaxLoadsMap()

publicMap<String,ShipmentRoute.VehicleLoad>getMaxLoadsMap()

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Returns
Type Description
Map<String,VehicleLoad>

getMaxLoadsOrDefault(String key, ShipmentRoute.VehicleLoad defaultValue)

publicShipmentRoute.VehicleLoadgetMaxLoadsOrDefault(Stringkey,ShipmentRoute.VehicleLoaddefaultValue)

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Parameters
Name Description
key String
defaultValue ShipmentRoute.VehicleLoad
Returns
Type Description
ShipmentRoute.VehicleLoad

getMaxLoadsOrThrow(String key)

publicShipmentRoute.VehicleLoadgetMaxLoadsOrThrow(Stringkey)

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Parameter
Name Description
key String
Returns
Type Description
ShipmentRoute.VehicleLoad

getMutableCosts() (deprecated)

publicMap<String,Double>getMutableCosts()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Double>

getMutableMaxLoads() (deprecated)

publicMap<String,ShipmentRoute.VehicleLoad>getMutableMaxLoads()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,VehicleLoad>

getPerformedShipmentCount()

publicintgetPerformedShipmentCount()

Number of shipments performed. Note that a pickup and delivery pair only counts once.

int32 performed_shipment_count = 1;

Returns
Type Description
int

The performedShipmentCount.

getTotalCost() (deprecated)

publicdoublegetTotalCost()

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

Deprecated: Use ShipmentRoute.route_total_cost and OptimizeToursResponse.Metrics.total_cost instead.

double total_cost = 11 [deprecated = true];

Returns
Type Description
double

The totalCost.

getTotalDuration()

publicDurationgetTotalDuration()

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Returns
Type Description
Duration

The totalDuration.

getTotalDurationBuilder()

publicDuration.BuildergetTotalDurationBuilder()

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Returns
Type Description
Builder

getTotalDurationOrBuilder()

publicDurationOrBuildergetTotalDurationOrBuilder()

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Returns
Type Description
DurationOrBuilder

getTravelDistanceMeters()

publicdoublegetTravelDistanceMeters()

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Returns
Type Description
double

The travelDistanceMeters.

getTravelDuration()

publicDurationgetTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
Type Description
Duration

The travelDuration.

getTravelDurationBuilder()

publicDuration.BuildergetTravelDurationBuilder()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
Type Description
Builder

getTravelDurationOrBuilder()

publicDurationOrBuildergetTravelDurationOrBuilder()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
Type Description
DurationOrBuilder

getVisitDuration()

publicDurationgetVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
Type Description
Duration

The visitDuration.

getVisitDurationBuilder()

publicDuration.BuildergetVisitDurationBuilder()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
Type Description
Builder

getVisitDurationOrBuilder()

publicDurationOrBuildergetVisitDurationOrBuilder()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
Type Description
DurationOrBuilder

getWaitDuration()

publicDurationgetWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
Type Description
Duration

The waitDuration.

getWaitDurationBuilder()

publicDuration.BuildergetWaitDurationBuilder()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
Type Description
Builder

getWaitDurationOrBuilder()

publicDurationOrBuildergetWaitDurationOrBuilder()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
Type Description
DurationOrBuilder

hasBreakDuration()

publicbooleanhasBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
boolean

Whether the breakDuration field is set.

hasDelayDuration()

publicbooleanhasDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
boolean

Whether the delayDuration field is set.

hasTotalDuration()

publicbooleanhasTotalDuration()

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Returns
Type Description
boolean

Whether the totalDuration field is set.

hasTravelDuration()

publicbooleanhasTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
Type Description
boolean

Whether the travelDuration field is set.

hasVisitDuration()

publicbooleanhasVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
Type Description
boolean

Whether the visitDuration field is set.

hasWaitDuration()

publicbooleanhasWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
Type Description
boolean

Whether the waitDuration field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeBreakDuration(Duration value)

publicAggregatedMetrics.BuildermergeBreakDuration(Durationvalue)

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

mergeDelayDuration(Duration value)

publicAggregatedMetrics.BuildermergeDelayDuration(Durationvalue)

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

mergeFrom(AggregatedMetrics other)

publicAggregatedMetrics.BuildermergeFrom(AggregatedMetricsother)
Parameter
Name Description
other AggregatedMetrics
Returns
Type Description
AggregatedMetrics.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicAggregatedMetrics.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicAggregatedMetrics.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
AggregatedMetrics.Builder
Overrides

mergeTotalDuration(Duration value)

publicAggregatedMetrics.BuildermergeTotalDuration(Durationvalue)

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

mergeTravelDuration(Duration value)

publicAggregatedMetrics.BuildermergeTravelDuration(Durationvalue)

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalAggregatedMetrics.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AggregatedMetrics.Builder
Overrides

mergeVisitDuration(Duration value)

publicAggregatedMetrics.BuildermergeVisitDuration(Durationvalue)

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

mergeWaitDuration(Duration value)

publicAggregatedMetrics.BuildermergeWaitDuration(Durationvalue)

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

putAllCosts(Map<String,Double> values) (deprecated)

publicAggregatedMetrics.BuilderputAllCosts(Map<String,Double>values)

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

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

putAllMaxLoads(Map<String,ShipmentRoute.VehicleLoad> values)

publicAggregatedMetrics.BuilderputAllMaxLoads(Map<String,ShipmentRoute.VehicleLoad>values)

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Parameter
Name Description
values Map<String,VehicleLoad>
Returns
Type Description
AggregatedMetrics.Builder

putCosts(String key, double value) (deprecated)

publicAggregatedMetrics.BuilderputCosts(Stringkey,doublevalue)

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

Parameters
Name Description
key String
value double
Returns
Type Description
AggregatedMetrics.Builder

putMaxLoads(String key, ShipmentRoute.VehicleLoad value)

publicAggregatedMetrics.BuilderputMaxLoads(Stringkey,ShipmentRoute.VehicleLoadvalue)

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Parameters
Name Description
key String
value ShipmentRoute.VehicleLoad
Returns
Type Description
AggregatedMetrics.Builder

putMaxLoadsBuilderIfAbsent(String key)

publicShipmentRoute.VehicleLoad.BuilderputMaxLoadsBuilderIfAbsent(Stringkey)

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Parameter
Name Description
key String
Returns
Type Description
ShipmentRoute.VehicleLoad.Builder

removeCosts(String key) (deprecated)

publicAggregatedMetrics.BuilderremoveCosts(Stringkey)

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

map<string, double> costs = 10 [deprecated = true];

Parameter
Name Description
key String
Returns
Type Description
AggregatedMetrics.Builder

removeMaxLoads(String key)

publicAggregatedMetrics.BuilderremoveMaxLoads(Stringkey)

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;

Parameter
Name Description
key String
Returns
Type Description
AggregatedMetrics.Builder

setBreakDuration(Duration value)

publicAggregatedMetrics.BuildersetBreakDuration(Durationvalue)

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

setBreakDuration(Duration.Builder builderForValue)

publicAggregatedMetrics.BuildersetBreakDuration(Duration.BuilderbuilderForValue)

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AggregatedMetrics.Builder

setDelayDuration(Duration value)

publicAggregatedMetrics.BuildersetDelayDuration(Durationvalue)

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

setDelayDuration(Duration.Builder builderForValue)

publicAggregatedMetrics.BuildersetDelayDuration(Duration.BuilderbuilderForValue)

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AggregatedMetrics.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicAggregatedMetrics.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AggregatedMetrics.Builder
Overrides

setPerformedShipmentCount(int value)

publicAggregatedMetrics.BuildersetPerformedShipmentCount(intvalue)

Number of shipments performed. Note that a pickup and delivery pair only counts once.

int32 performed_shipment_count = 1;

Parameter
Name Description
value int

The performedShipmentCount to set.

Returns
Type Description
AggregatedMetrics.Builder

This builder for chaining.

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

publicAggregatedMetrics.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AggregatedMetrics.Builder
Overrides

setTotalCost(double value) (deprecated)

publicAggregatedMetrics.BuildersetTotalCost(doublevalue)

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

Deprecated: Use ShipmentRoute.route_total_cost and OptimizeToursResponse.Metrics.total_cost instead.

double total_cost = 11 [deprecated = true];

Parameter
Name Description
value double

The totalCost to set.

Returns
Type Description
AggregatedMetrics.Builder

This builder for chaining.

setTotalDuration(Duration value)

publicAggregatedMetrics.BuildersetTotalDuration(Durationvalue)

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

setTotalDuration(Duration.Builder builderForValue)

publicAggregatedMetrics.BuildersetTotalDuration(Duration.BuilderbuilderForValue)

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

.google.protobuf.Duration total_duration = 7;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AggregatedMetrics.Builder

setTravelDistanceMeters(double value)

publicAggregatedMetrics.BuildersetTravelDistanceMeters(doublevalue)

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Parameter
Name Description
value double

The travelDistanceMeters to set.

Returns
Type Description
AggregatedMetrics.Builder

This builder for chaining.

setTravelDuration(Duration value)

publicAggregatedMetrics.BuildersetTravelDuration(Durationvalue)

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

setTravelDuration(Duration.Builder builderForValue)

publicAggregatedMetrics.BuildersetTravelDuration(Duration.BuilderbuilderForValue)

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AggregatedMetrics.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalAggregatedMetrics.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AggregatedMetrics.Builder
Overrides

setVisitDuration(Duration value)

publicAggregatedMetrics.BuildersetVisitDuration(Durationvalue)

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

setVisitDuration(Duration.Builder builderForValue)

publicAggregatedMetrics.BuildersetVisitDuration(Duration.BuilderbuilderForValue)

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AggregatedMetrics.Builder

setWaitDuration(Duration value)

publicAggregatedMetrics.BuildersetWaitDuration(Durationvalue)

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Parameter
Name Description
value Duration
Returns
Type Description
AggregatedMetrics.Builder

setWaitDuration(Duration.Builder builderForValue)

publicAggregatedMetrics.BuildersetWaitDuration(Duration.BuilderbuilderForValue)

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AggregatedMetrics.Builder

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.