Class AggregatedMetrics (1.25.0)

publicfinalclass AggregatedMetricsextendsGeneratedMessageV3implementsAggregatedMetricsOrBuilder

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.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)

Static Fields

BREAK_DURATION_FIELD_NUMBER

publicstaticfinalintBREAK_DURATION_FIELD_NUMBER
Field Value
Type Description
int

COSTS_FIELD_NUMBER

publicstaticfinalintCOSTS_FIELD_NUMBER
Field Value
Type Description
int

DELAY_DURATION_FIELD_NUMBER

publicstaticfinalintDELAY_DURATION_FIELD_NUMBER
Field Value
Type Description
int

MAX_LOADS_FIELD_NUMBER

publicstaticfinalintMAX_LOADS_FIELD_NUMBER
Field Value
Type Description
int

PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER

publicstaticfinalintPERFORMED_SHIPMENT_COUNT_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_COST_FIELD_NUMBER

publicstaticfinalintTOTAL_COST_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_DURATION_FIELD_NUMBER

publicstaticfinalintTOTAL_DURATION_FIELD_NUMBER
Field Value
Type Description
int

TRAVEL_DISTANCE_METERS_FIELD_NUMBER

publicstaticfinalintTRAVEL_DISTANCE_METERS_FIELD_NUMBER
Field Value
Type Description
int

TRAVEL_DURATION_FIELD_NUMBER

publicstaticfinalintTRAVEL_DURATION_FIELD_NUMBER
Field Value
Type Description
int

VISIT_DURATION_FIELD_NUMBER

publicstaticfinalintVISIT_DURATION_FIELD_NUMBER
Field Value
Type Description
int

WAIT_DURATION_FIELD_NUMBER

publicstaticfinalintWAIT_DURATION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticAggregatedMetricsgetDefaultInstance()
Returns
Type Description
AggregatedMetrics

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticAggregatedMetrics.BuildernewBuilder()
Returns
Type Description
AggregatedMetrics.Builder

newBuilder(AggregatedMetrics prototype)

publicstaticAggregatedMetrics.BuildernewBuilder(AggregatedMetricsprototype)
Parameter
Name Description
prototype AggregatedMetrics
Returns
Type Description
AggregatedMetrics.Builder

parseDelimitedFrom(InputStream input)

publicstaticAggregatedMetricsparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAggregatedMetricsparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticAggregatedMetricsparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticAggregatedMetricsparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticAggregatedMetricsparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticAggregatedMetricsparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticAggregatedMetricsparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAggregatedMetricsparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticAggregatedMetricsparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAggregatedMetricsparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticAggregatedMetricsparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticAggregatedMetricsparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<AggregatedMetrics>parser()
Returns
Type Description
Parser<AggregatedMetrics>

Methods

containsCosts(String key)

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

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBreakDuration()

publicDurationgetBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
Duration

The breakDuration.

getBreakDurationOrBuilder()

publicDurationOrBuildergetBreakDurationOrBuilder()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
DurationOrBuilder

getCosts()

publicMap<String,Double>getCosts()

Use #getCostsMap() instead.

Returns
Type Description
Map<String,Double>

getCostsCount()

publicintgetCostsCount()

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

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

Returns
Type Description
int

getCostsMap()

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)

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)

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.

getDelayDurationOrBuilder()

publicDurationOrBuildergetDelayDurationOrBuilder()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
DurationOrBuilder

getMaxLoads()

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

getParserForType()

publicParser<AggregatedMetrics>getParserForType()
Returns
Type Description
Parser<AggregatedMetrics>
Overrides

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.

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getTotalCost() (deprecated)

publicdoublegetTotalCost()

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

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.

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.

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.

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.

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicAggregatedMetrics.BuildernewBuilderForType()
Returns
Type Description
AggregatedMetrics.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedAggregatedMetrics.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AggregatedMetrics.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicAggregatedMetrics.BuildertoBuilder()
Returns
Type Description
AggregatedMetrics.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.