# Interface AggregatedMetricsOrBuilder (1.91.0)

1.91.0 (latest) 1.89.0 1.86.0 1.85.0 1.83.0 1.81.0 1.80.0 1.78.0 1.76.0 1.74.0 1.73.0 1.72.0 1.71.0 1.70.0 1.68.0 1.66.0 1.65.0 1.62.0 1.61.0 1.60.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.0 1.51.0 1.50.0 1.49.0 1.47.0 1.46.0 1.45.0 1.44.0 1.43.0 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.14 0.1.2

    public interface AggregatedMetricsOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsCosts(String key) (deprecated)

    public abstract boolean containsCosts(String key)

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

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### containsMaxLoads(String key)

    public abstract 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** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getBreakDuration()

    public abstract Duration getBreakDuration()

Total break duration for a route or a solution.

`.google.protobuf.Duration break_duration = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The breakDuration. |

### getBreakDurationOrBuilder()

    public abstract DurationOrBuilder getBreakDurationOrBuilder()

Total break duration for a route or a solution.

`.google.protobuf.Duration break_duration = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getCosts() (deprecated)

    public abstract Map<String,Double> getCosts()

Use [#getCostsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.AggregatedMetricsOrBuilder#com_google_cloud_optimization_v1_AggregatedMetricsOrBuilder_getCostsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html>` |   |

### getCostsCount() (deprecated)

    public abstract int getCostsCount()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCostsMap() (deprecated)

    public abstract Map<String,Double> getCostsMap()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html>` |   |

### getCostsOrDefault(String key, double defaultValue) (deprecated)

    public abstract double getCostsOrDefault(String key, double defaultValue)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCostsOrThrow(String key) (deprecated)

    public abstract double getCostsOrThrow(String key)

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

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getDelayDuration()

    public abstract Duration getDelayDuration()

Total delay duration for a route or a solution.

`.google.protobuf.Duration delay_duration = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The delayDuration. |

### getDelayDurationOrBuilder()

    public abstract DurationOrBuilder getDelayDurationOrBuilder()

Total delay duration for a route or a solution.

`.google.protobuf.Duration delay_duration = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getMaxLoads() (deprecated)

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

Use [#getMaxLoadsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.AggregatedMetricsOrBuilder#com_google_cloud_optimization_v1_AggregatedMetricsOrBuilder_getMaxLoadsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>` |   |

### getMaxLoadsCount()

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getMaxLoadsMap()

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>` |   |

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

    public abstract 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** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad` |   |

### getMaxLoadsOrThrow(String key)

    public abstract 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** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad` |   |

### getPerformedShipmentCount()

    public abstract int getPerformedShipmentCount()

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

`int32 performed_shipment_count = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The performedShipmentCount. |

### getTotalCost() (deprecated)

    public abstract double getTotalCost()

**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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The totalCost. |

### getTotalDuration()

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The totalDuration. |

### getTotalDurationOrBuilder()

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getTravelDistanceMeters()

    public abstract double getTravelDistanceMeters()

Total travel distance for a route or a solution.

`double travel_distance_meters = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The travelDistanceMeters. |

### getTravelDuration()

    public abstract Duration getTravelDuration()

Total travel duration for a route or a solution.

`.google.protobuf.Duration travel_duration = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The travelDuration. |

### getTravelDurationOrBuilder()

    public abstract DurationOrBuilder getTravelDurationOrBuilder()

Total travel duration for a route or a solution.

`.google.protobuf.Duration travel_duration = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getVisitDuration()

    public abstract Duration getVisitDuration()

Total visit duration for a route or a solution.

`.google.protobuf.Duration visit_duration = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The visitDuration. |

### getVisitDurationOrBuilder()

    public abstract DurationOrBuilder getVisitDurationOrBuilder()

Total visit duration for a route or a solution.

`.google.protobuf.Duration visit_duration = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getWaitDuration()

    public abstract Duration getWaitDuration()

Total wait duration for a route or a solution.

`.google.protobuf.Duration wait_duration = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The waitDuration. |

### getWaitDurationOrBuilder()

    public abstract DurationOrBuilder getWaitDurationOrBuilder()

Total wait duration for a route or a solution.

`.google.protobuf.Duration wait_duration = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### hasBreakDuration()

    public abstract boolean hasBreakDuration()

Total break duration for a route or a solution.

`.google.protobuf.Duration break_duration = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the breakDuration field is set. |

### hasDelayDuration()

    public abstract boolean hasDelayDuration()

Total delay duration for a route or a solution.

`.google.protobuf.Duration delay_duration = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the delayDuration field is set. |

### hasTotalDuration()

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the totalDuration field is set. |

### hasTravelDuration()

    public abstract boolean hasTravelDuration()

Total travel duration for a route or a solution.

`.google.protobuf.Duration travel_duration = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the travelDuration field is set. |

### hasVisitDuration()

    public abstract boolean hasVisitDuration()

Total visit duration for a route or a solution.

`.google.protobuf.Duration visit_duration = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the visitDuration field is set. |

### hasWaitDuration()

    public abstract boolean hasWaitDuration()

Total wait duration for a route or a solution.

`.google.protobuf.Duration wait_duration = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the waitDuration field is set. |