Class AggregatedMetrics (1.51.0)

public final class AggregatedMetrics extends GeneratedMessageV3 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 Fields

BREAK_DURATION_FIELD_NUMBER

public static final int BREAK_DURATION_FIELD_NUMBER
Field Value
Type Description
int

COSTS_FIELD_NUMBER

public static final int COSTS_FIELD_NUMBER
Field Value
Type Description
int

DELAY_DURATION_FIELD_NUMBER

public static final int DELAY_DURATION_FIELD_NUMBER
Field Value
Type Description
int

MAX_LOADS_FIELD_NUMBER

public static final int MAX_LOADS_FIELD_NUMBER
Field Value
Type Description
int

PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER

public static final int PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_COST_FIELD_NUMBER

public static final int TOTAL_COST_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_DURATION_FIELD_NUMBER

public static final int TOTAL_DURATION_FIELD_NUMBER
Field Value
Type Description
int

TRAVEL_DISTANCE_METERS_FIELD_NUMBER

public static final int TRAVEL_DISTANCE_METERS_FIELD_NUMBER
Field Value
Type Description
int

TRAVEL_DURATION_FIELD_NUMBER

public static final int TRAVEL_DURATION_FIELD_NUMBER
Field Value
Type Description
int

VISIT_DURATION_FIELD_NUMBER

public static final int VISIT_DURATION_FIELD_NUMBER
Field Value
Type Description
int

WAIT_DURATION_FIELD_NUMBER

public static final int WAIT_DURATION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AggregatedMetrics getDefaultInstance()
Returns
Type Description
AggregatedMetrics

getDescriptor()

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

newBuilder()

public static AggregatedMetrics.Builder newBuilder()
Returns
Type Description
AggregatedMetrics.Builder

newBuilder(AggregatedMetrics prototype)

public static AggregatedMetrics.Builder newBuilder(AggregatedMetrics prototype)
Parameter
Name Description
prototype AggregatedMetrics
Returns
Type Description
AggregatedMetrics.Builder

parseDelimitedFrom(InputStream input)

public static AggregatedMetrics parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AggregatedMetrics parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AggregatedMetrics parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AggregatedMetrics parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AggregatedMetrics parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AggregatedMetrics parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregatedMetrics
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AggregatedMetrics> parser()
Returns
Type Description
Parser<AggregatedMetrics>

Methods

containsCosts(String key) (deprecated)

public 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 String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBreakDuration()

public Duration getBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
Duration

The breakDuration.

getBreakDurationOrBuilder()

public DurationOrBuilder getBreakDurationOrBuilder()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
DurationOrBuilder

getCosts() (deprecated)

public Map<String,Double> getCosts()

Use #getCostsMap() instead.

Returns
Type Description
Map<String,Double>

getCostsCount() (deprecated)

public int getCostsCount()

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

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

Returns
Type Description
int

getCostsMap() (deprecated)

public Map<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) (deprecated)

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
Name Description
key String
defaultValue double
Returns
Type Description
double

getCostsOrThrow(String key) (deprecated)

public 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 String
Returns
Type Description
double

getDefaultInstanceForType()

public AggregatedMetrics getDefaultInstanceForType()
Returns
Type Description
AggregatedMetrics

getDelayDuration()

public Duration getDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
Duration

The delayDuration.

getDelayDurationOrBuilder()

public DurationOrBuilder getDelayDurationOrBuilder()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
DurationOrBuilder

getMaxLoads() (deprecated)

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

Use #getMaxLoadsMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue ShipmentRoute.VehicleLoad
Returns
Type Description
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
Name Description
key String
Returns
Type Description
ShipmentRoute.VehicleLoad

getParserForType()

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

getPerformedShipmentCount()

public int getPerformedShipmentCount()

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

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTotalCost() (deprecated)

public 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
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
Type Description
Duration

The totalDuration.

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
Type Description
DurationOrBuilder

getTravelDistanceMeters()

public double getTravelDistanceMeters()

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Returns
Type Description
double

The travelDistanceMeters.

getTravelDuration()

public Duration getTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
Type Description
Duration

The travelDuration.

getTravelDurationOrBuilder()

public DurationOrBuilder getTravelDurationOrBuilder()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
Type Description
DurationOrBuilder

getVisitDuration()

public Duration getVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
Type Description
Duration

The visitDuration.

getVisitDurationOrBuilder()

public DurationOrBuilder getVisitDurationOrBuilder()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
Type Description
DurationOrBuilder

getWaitDuration()

public Duration getWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
Type Description
Duration

The waitDuration.

getWaitDurationOrBuilder()

public DurationOrBuilder getWaitDurationOrBuilder()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
Type Description
DurationOrBuilder

hasBreakDuration()

public boolean hasBreakDuration()

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

public boolean hasDelayDuration()

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

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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the waitDuration field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

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.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AggregatedMetrics.Builder newBuilderForType()
Returns
Type Description
AggregatedMetrics.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AggregatedMetrics.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AggregatedMetrics.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AggregatedMetrics.Builder toBuilder()
Returns
Type Description
AggregatedMetrics.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException