Class OptimizeToursResponse.Metrics.Builder (1.15.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public OptimizeToursResponse.Metrics build()
Returns
TypeDescription
OptimizeToursResponse.Metrics

buildPartial()

public OptimizeToursResponse.Metrics buildPartial()
Returns
TypeDescription
OptimizeToursResponse.Metrics

clear()

public OptimizeToursResponse.Metrics.Builder clear()
Returns
TypeDescription
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
TypeDescription
OptimizeToursResponse.Metrics.Builder

clearCosts()

public OptimizeToursResponse.Metrics.Builder clearCosts()
Returns
TypeDescription
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
TypeDescription
OptimizeToursResponse.Metrics.Builder

clearField(Descriptors.FieldDescriptor field)

public OptimizeToursResponse.Metrics.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
OptimizeToursResponse.Metrics.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSkippedMandatoryShipmentCount()

public OptimizeToursResponse.Metrics.Builder clearSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

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

This builder for chaining.

clone()

public OptimizeToursResponse.Metrics.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
AggregatedMetricsOrBuilder

getCosts()

public Map<String,Double> getCosts()

Use #getCostsMap() instead.

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

getDefaultInstanceForType()

public OptimizeToursResponse.Metrics getDefaultInstanceForType()
Returns
TypeDescription
OptimizeToursResponse.Metrics

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getMutableCosts()

public Map<String,Double> getMutableCosts()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Double>

getSkippedMandatoryShipmentCount()

public int getSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

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

Whether the latestVehicleEndTime 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

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
NameDescription
valueAggregatedMetrics
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
OptimizeToursResponse.Metrics.Builder

mergeFrom(OptimizeToursResponse.Metrics other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public OptimizeToursResponse.Metrics.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
OptimizeToursResponse.Metrics.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OptimizeToursResponse.Metrics.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,Double>
Returns
TypeDescription
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
NameDescription
keyString
valuedouble
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
valueAggregatedMetrics
Returns
TypeDescription
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
NameDescription
builderForValueAggregatedMetrics.Builder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
OptimizeToursResponse.Metrics.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public OptimizeToursResponse.Metrics.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
OptimizeToursResponse.Metrics.Builder

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

public OptimizeToursResponse.Metrics.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The skippedMandatoryShipmentCount to set.

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

The totalCost to set.

Returns
TypeDescription
OptimizeToursResponse.Metrics.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final OptimizeToursResponse.Metrics.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueint

The usedVehicleCount to set.

Returns
TypeDescription
OptimizeToursResponse.Metrics.Builder

This builder for chaining.