Class AggregatedMetrics.Builder (1.18.0)

public static final class AggregatedMetrics.Builder extends GeneratedMessageV3.Builder<AggregatedMetrics.Builder> implements AggregatedMetricsOrBuilder

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AggregatedMetrics build()
Returns
TypeDescription
AggregatedMetrics

buildPartial()

public AggregatedMetrics buildPartial()
Returns
TypeDescription
AggregatedMetrics

clear()

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

clearBreakDuration()

public AggregatedMetrics.Builder clearBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
TypeDescription
AggregatedMetrics.Builder

clearCosts()

public AggregatedMetrics.Builder clearCosts()
Returns
TypeDescription
AggregatedMetrics.Builder

clearDelayDuration()

public AggregatedMetrics.Builder clearDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
TypeDescription
AggregatedMetrics.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearMaxLoads()

public AggregatedMetrics.Builder clearMaxLoads()
Returns
TypeDescription
AggregatedMetrics.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPerformedShipmentCount()

public AggregatedMetrics.Builder clearPerformedShipmentCount()

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

int32 performed_shipment_count = 1;

Returns
TypeDescription
AggregatedMetrics.Builder

This builder for chaining.

clearTotalCost() (deprecated)

public AggregatedMetrics.Builder clearTotalCost()

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

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

double total_cost = 11 [deprecated = true];

Returns
TypeDescription
AggregatedMetrics.Builder

This builder for chaining.

clearTotalDuration()

public AggregatedMetrics.Builder clearTotalDuration()

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

clearTravelDistanceMeters()

public AggregatedMetrics.Builder clearTravelDistanceMeters()

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Returns
TypeDescription
AggregatedMetrics.Builder

This builder for chaining.

clearTravelDuration()

public AggregatedMetrics.Builder clearTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
TypeDescription
AggregatedMetrics.Builder

clearVisitDuration()

public AggregatedMetrics.Builder clearVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
TypeDescription
AggregatedMetrics.Builder

clearWaitDuration()

public AggregatedMetrics.Builder clearWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
TypeDescription
AggregatedMetrics.Builder

clone()

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

containsCosts(String key)

public boolean containsCosts(String key)

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

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

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsMaxLoads(String key)

public boolean containsMaxLoads(String key)

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
NameDescription
keyString
Returns
TypeDescription
boolean

getBreakDuration()

public Duration getBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
TypeDescription
Duration

The breakDuration.

getBreakDurationBuilder()

public Duration.Builder getBreakDurationBuilder()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
TypeDescription
Builder

getBreakDurationOrBuilder()

public DurationOrBuilder getBreakDurationOrBuilder()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
TypeDescription
DurationOrBuilder

getCosts()

public Map<String,Double> getCosts()

Use #getCostsMap() instead.

Returns
TypeDescription
Map<String,Double>

getCostsCount()

public int getCostsCount()

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

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

Returns
TypeDescription
int

getCostsMap()

public Map<String,Double> getCostsMap()

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

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

Returns
TypeDescription
Map<String,Double>

getCostsOrDefault(String key, double defaultValue)

public double getCostsOrDefault(String key, double defaultValue)

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

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

Parameters
NameDescription
keyString
defaultValuedouble
Returns
TypeDescription
double

getCostsOrThrow(String key)

public double getCostsOrThrow(String key)

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

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

Parameter
NameDescription
keyString
Returns
TypeDescription
double

getDefaultInstanceForType()

public AggregatedMetrics getDefaultInstanceForType()
Returns
TypeDescription
AggregatedMetrics

getDelayDuration()

public Duration getDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
TypeDescription
Duration

The delayDuration.

getDelayDurationBuilder()

public Duration.Builder getDelayDurationBuilder()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
TypeDescription
Builder

getDelayDurationOrBuilder()

public DurationOrBuilder getDelayDurationOrBuilder()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
TypeDescription
DurationOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMaxLoads()

public Map<String,ShipmentRoute.VehicleLoad> getMaxLoads()

Use #getMaxLoadsMap() instead.

Returns
TypeDescription
Map<String,VehicleLoad>

getMaxLoadsCount()

public int getMaxLoadsCount()

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

getMaxLoadsMap()

public Map<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
TypeDescription
Map<String,VehicleLoad>

getMaxLoadsOrDefault(String key, ShipmentRoute.VehicleLoad defaultValue)

public ShipmentRoute.VehicleLoad getMaxLoadsOrDefault(String key, ShipmentRoute.VehicleLoad defaultValue)

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
NameDescription
keyString
defaultValueShipmentRoute.VehicleLoad
Returns
TypeDescription
ShipmentRoute.VehicleLoad

getMaxLoadsOrThrow(String key)

public ShipmentRoute.VehicleLoad getMaxLoadsOrThrow(String key)

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
NameDescription
keyString
Returns
TypeDescription
ShipmentRoute.VehicleLoad

getMutableCosts()

public Map<String,Double> getMutableCosts()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Double>

getMutableMaxLoads()

public Map<String,ShipmentRoute.VehicleLoad> getMutableMaxLoads()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,VehicleLoad>

getPerformedShipmentCount()

public int getPerformedShipmentCount()

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

int32 performed_shipment_count = 1;

Returns
TypeDescription
int

The performedShipmentCount.

getTotalCost() (deprecated)

public double getTotalCost()

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

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

double total_cost = 11 [deprecated = true];

Returns
TypeDescription
double

The totalCost.

getTotalDuration()

public Duration getTotalDuration()

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

The totalDuration.

getTotalDurationBuilder()

public Duration.Builder getTotalDurationBuilder()

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

getTotalDurationOrBuilder()

public DurationOrBuilder getTotalDurationOrBuilder()

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

getTravelDistanceMeters()

public double getTravelDistanceMeters()

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Returns
TypeDescription
double

The travelDistanceMeters.

getTravelDuration()

public Duration getTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
TypeDescription
Duration

The travelDuration.

getTravelDurationBuilder()

public Duration.Builder getTravelDurationBuilder()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
TypeDescription
Builder

getTravelDurationOrBuilder()

public DurationOrBuilder getTravelDurationOrBuilder()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
TypeDescription
DurationOrBuilder

getVisitDuration()

public Duration getVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
TypeDescription
Duration

The visitDuration.

getVisitDurationBuilder()

public Duration.Builder getVisitDurationBuilder()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
TypeDescription
Builder

getVisitDurationOrBuilder()

public DurationOrBuilder getVisitDurationOrBuilder()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
TypeDescription
DurationOrBuilder

getWaitDuration()

public Duration getWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
TypeDescription
Duration

The waitDuration.

getWaitDurationBuilder()

public Duration.Builder getWaitDurationBuilder()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
TypeDescription
Builder

getWaitDurationOrBuilder()

public DurationOrBuilder getWaitDurationOrBuilder()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
TypeDescription
DurationOrBuilder

hasBreakDuration()

public boolean hasBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
TypeDescription
boolean

Whether the breakDuration field is set.

hasDelayDuration()

public boolean hasDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
TypeDescription
boolean

Whether the delayDuration field is set.

hasTotalDuration()

public boolean hasTotalDuration()

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

Whether the totalDuration field is set.

hasTravelDuration()

public boolean hasTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
TypeDescription
boolean

Whether the travelDuration field is set.

hasVisitDuration()

public boolean hasVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
TypeDescription
boolean

Whether the visitDuration field is set.

hasWaitDuration()

public boolean hasWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
TypeDescription
boolean

Whether the waitDuration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBreakDuration(Duration value)

public AggregatedMetrics.Builder mergeBreakDuration(Duration value)

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

mergeDelayDuration(Duration value)

public AggregatedMetrics.Builder mergeDelayDuration(Duration value)

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

mergeFrom(AggregatedMetrics other)

public AggregatedMetrics.Builder mergeFrom(AggregatedMetrics other)
Parameter
NameDescription
otherAggregatedMetrics
Returns
TypeDescription
AggregatedMetrics.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTotalDuration(Duration value)

public AggregatedMetrics.Builder mergeTotalDuration(Duration value)

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
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

mergeTravelDuration(Duration value)

public AggregatedMetrics.Builder mergeTravelDuration(Duration value)

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeVisitDuration(Duration value)

public AggregatedMetrics.Builder mergeVisitDuration(Duration value)

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

mergeWaitDuration(Duration value)

public AggregatedMetrics.Builder mergeWaitDuration(Duration value)

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

putAllCosts(Map<String,Double> values)

public AggregatedMetrics.Builder putAllCosts(Map<String,Double> values)

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

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

Parameter
NameDescription
valuesMap<String,Double>
Returns
TypeDescription
AggregatedMetrics.Builder

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

public AggregatedMetrics.Builder putAllMaxLoads(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
NameDescription
valuesMap<String,VehicleLoad>
Returns
TypeDescription
AggregatedMetrics.Builder

putCosts(String key, double value)

public AggregatedMetrics.Builder putCosts(String key, double value)

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

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

Parameters
NameDescription
keyString
valuedouble
Returns
TypeDescription
AggregatedMetrics.Builder

putMaxLoads(String key, ShipmentRoute.VehicleLoad value)

public AggregatedMetrics.Builder putMaxLoads(String key, ShipmentRoute.VehicleLoad value)

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
NameDescription
keyString
valueShipmentRoute.VehicleLoad
Returns
TypeDescription
AggregatedMetrics.Builder

removeCosts(String key)

public AggregatedMetrics.Builder removeCosts(String key)

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

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

Parameter
NameDescription
keyString
Returns
TypeDescription
AggregatedMetrics.Builder

removeMaxLoads(String key)

public AggregatedMetrics.Builder removeMaxLoads(String key)

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
NameDescription
keyString
Returns
TypeDescription
AggregatedMetrics.Builder

setBreakDuration(Duration value)

public AggregatedMetrics.Builder setBreakDuration(Duration value)

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

setBreakDuration(Duration.Builder builderForValue)

public AggregatedMetrics.Builder setBreakDuration(Duration.Builder builderForValue)

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AggregatedMetrics.Builder

setDelayDuration(Duration value)

public AggregatedMetrics.Builder setDelayDuration(Duration value)

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

setDelayDuration(Duration.Builder builderForValue)

public AggregatedMetrics.Builder setDelayDuration(Duration.Builder builderForValue)

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AggregatedMetrics.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPerformedShipmentCount(int value)

public AggregatedMetrics.Builder setPerformedShipmentCount(int value)

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

int32 performed_shipment_count = 1;

Parameter
NameDescription
valueint

The performedShipmentCount to set.

Returns
TypeDescription
AggregatedMetrics.Builder

This builder for chaining.

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

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

setTotalCost(double value) (deprecated)

public AggregatedMetrics.Builder setTotalCost(double value)

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

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

double total_cost = 11 [deprecated = true];

Parameter
NameDescription
valuedouble

The totalCost to set.

Returns
TypeDescription
AggregatedMetrics.Builder

This builder for chaining.

setTotalDuration(Duration value)

public AggregatedMetrics.Builder setTotalDuration(Duration value)

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
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

setTotalDuration(Duration.Builder builderForValue)

public AggregatedMetrics.Builder setTotalDuration(Duration.Builder builderForValue)

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
NameDescription
builderForValueBuilder
Returns
TypeDescription
AggregatedMetrics.Builder

setTravelDistanceMeters(double value)

public AggregatedMetrics.Builder setTravelDistanceMeters(double value)

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Parameter
NameDescription
valuedouble

The travelDistanceMeters to set.

Returns
TypeDescription
AggregatedMetrics.Builder

This builder for chaining.

setTravelDuration(Duration value)

public AggregatedMetrics.Builder setTravelDuration(Duration value)

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

setTravelDuration(Duration.Builder builderForValue)

public AggregatedMetrics.Builder setTravelDuration(Duration.Builder builderForValue)

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AggregatedMetrics.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setVisitDuration(Duration value)

public AggregatedMetrics.Builder setVisitDuration(Duration value)

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

setVisitDuration(Duration.Builder builderForValue)

public AggregatedMetrics.Builder setVisitDuration(Duration.Builder builderForValue)

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AggregatedMetrics.Builder

setWaitDuration(Duration value)

public AggregatedMetrics.Builder setWaitDuration(Duration value)

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AggregatedMetrics.Builder

setWaitDuration(Duration.Builder builderForValue)

public AggregatedMetrics.Builder setWaitDuration(Duration.Builder builderForValue)

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AggregatedMetrics.Builder