Class OptimizeToursResponse.Metrics.Builder (1.52.0)

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

Overall metrics, aggregated over all routes.

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OptimizeToursResponse.Metrics.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

build()

public OptimizeToursResponse.Metrics build()
Returns
Type Description
OptimizeToursResponse.Metrics

buildPartial()

public OptimizeToursResponse.Metrics buildPartial()
Returns
Type Description
OptimizeToursResponse.Metrics

clear()

public OptimizeToursResponse.Metrics.Builder clear()
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

clearAggregatedRouteMetrics()

public OptimizeToursResponse.Metrics.Builder clearAggregatedRouteMetrics()

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

clearCosts()

public OptimizeToursResponse.Metrics.Builder clearCosts()
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

clearEarliestVehicleStartTime()

public OptimizeToursResponse.Metrics.Builder clearEarliestVehicleStartTime()

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

clearField(Descriptors.FieldDescriptor field)

public OptimizeToursResponse.Metrics.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

clearLatestVehicleEndTime()

public OptimizeToursResponse.Metrics.Builder clearLatestVehicleEndTime()

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

clearOneof(Descriptors.OneofDescriptor oneof)

public OptimizeToursResponse.Metrics.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

clearSkippedMandatoryShipmentCount()

public OptimizeToursResponse.Metrics.Builder clearSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Returns
Type Description
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

clearTotalCost()

public OptimizeToursResponse.Metrics.Builder clearTotalCost()

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()

public OptimizeToursResponse.Metrics.Builder clearUsedVehicleCount()

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()

public OptimizeToursResponse.Metrics.Builder clone()
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

containsCosts(String key)

public boolean containsCosts(String key)

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
boolean

getAggregatedRouteMetrics()

public AggregatedMetrics getAggregatedRouteMetrics()

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()

public AggregatedMetrics.Builder getAggregatedRouteMetricsBuilder()

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

getAggregatedRouteMetricsOrBuilder()

public AggregatedMetricsOrBuilder getAggregatedRouteMetricsOrBuilder()

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
AggregatedMetricsOrBuilder

getCosts() (deprecated)

public Map<String,Double> getCosts()

Use #getCostsMap() instead.

Returns
Type Description
Map<String,Double>

getCostsCount()

public int getCostsCount()

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()

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

getCostsOrDefault(String key, double defaultValue)

public double getCostsOrDefault(String key, double defaultValue)

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
double

getCostsOrThrow(String key)

public double getCostsOrThrow(String key)

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
double

getDefaultInstanceForType()

public OptimizeToursResponse.Metrics getDefaultInstanceForType()
Returns
Type Description
OptimizeToursResponse.Metrics

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEarliestVehicleStartTime()

public Timestamp getEarliestVehicleStartTime()

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()

public Timestamp.Builder getEarliestVehicleStartTimeBuilder()

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
Builder

getEarliestVehicleStartTimeOrBuilder()

public TimestampOrBuilder getEarliestVehicleStartTimeOrBuilder()

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
TimestampOrBuilder

getLatestVehicleEndTime()

public Timestamp getLatestVehicleEndTime()

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()

public Timestamp.Builder getLatestVehicleEndTimeBuilder()

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
Builder

getLatestVehicleEndTimeOrBuilder()

public TimestampOrBuilder getLatestVehicleEndTimeOrBuilder()

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
TimestampOrBuilder

getMutableCosts() (deprecated)

public Map<String,Double> getMutableCosts()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Double>

getSkippedMandatoryShipmentCount()

public int getSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Returns
Type Description
int

The skippedMandatoryShipmentCount.

getTotalCost()

public double getTotalCost()

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()

public int getUsedVehicleCount()

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()

public boolean hasAggregatedRouteMetrics()

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()

public boolean hasEarliestVehicleStartTime()

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()

public boolean hasLatestVehicleEndTime()

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()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

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

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAggregatedRouteMetrics(AggregatedMetrics value)

public OptimizeToursResponse.Metrics.Builder mergeAggregatedRouteMetrics(AggregatedMetrics value)

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
value AggregatedMetrics
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

mergeEarliestVehicleStartTime(Timestamp value)

public OptimizeToursResponse.Metrics.Builder mergeEarliestVehicleStartTime(Timestamp value)

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

mergeFrom(OptimizeToursResponse.Metrics other)

public OptimizeToursResponse.Metrics.Builder mergeFrom(OptimizeToursResponse.Metrics other)
Parameter
Name Description
other OptimizeToursResponse.Metrics
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OptimizeToursResponse.Metrics.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public OptimizeToursResponse.Metrics.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

mergeLatestVehicleEndTime(Timestamp value)

public OptimizeToursResponse.Metrics.Builder mergeLatestVehicleEndTime(Timestamp value)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OptimizeToursResponse.Metrics.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

putAllCosts(Map<String,Double> values)

public OptimizeToursResponse.Metrics.Builder putAllCosts(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
OptimizeToursResponse.Metrics.Builder

putCosts(String key, double value)

public OptimizeToursResponse.Metrics.Builder putCosts(String key, double value)

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

removeCosts(String key)

public OptimizeToursResponse.Metrics.Builder removeCosts(String key)

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

setAggregatedRouteMetrics(AggregatedMetrics value)

public OptimizeToursResponse.Metrics.Builder setAggregatedRouteMetrics(AggregatedMetrics value)

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
value AggregatedMetrics
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

setAggregatedRouteMetrics(AggregatedMetrics.Builder builderForValue)

public OptimizeToursResponse.Metrics.Builder setAggregatedRouteMetrics(AggregatedMetrics.Builder builderForValue)

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

setEarliestVehicleStartTime(Timestamp value)

public OptimizeToursResponse.Metrics.Builder setEarliestVehicleStartTime(Timestamp value)

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

setEarliestVehicleStartTime(Timestamp.Builder builderForValue)

public OptimizeToursResponse.Metrics.Builder setEarliestVehicleStartTime(Timestamp.Builder builderForValue)

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

setField(Descriptors.FieldDescriptor field, Object value)

public OptimizeToursResponse.Metrics.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

setLatestVehicleEndTime(Timestamp value)

public OptimizeToursResponse.Metrics.Builder setLatestVehicleEndTime(Timestamp value)

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

setLatestVehicleEndTime(Timestamp.Builder builderForValue)

public OptimizeToursResponse.Metrics.Builder setLatestVehicleEndTime(Timestamp.Builder builderForValue)

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

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

public OptimizeToursResponse.Metrics.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

setSkippedMandatoryShipmentCount(int value)

public OptimizeToursResponse.Metrics.Builder setSkippedMandatoryShipmentCount(int value)

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)

public OptimizeToursResponse.Metrics.Builder setTotalCost(double value)

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)

public final OptimizeToursResponse.Metrics.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

setUsedVehicleCount(int value)

public OptimizeToursResponse.Metrics.Builder setUsedVehicleCount(int value)

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.