Class AggregatedMetrics (1.28.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
TypeDescription
int

COSTS_FIELD_NUMBER

public static final int COSTS_FIELD_NUMBER
Field Value
TypeDescription
int

DELAY_DURATION_FIELD_NUMBER

public static final int DELAY_DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

MAX_LOADS_FIELD_NUMBER

public static final int MAX_LOADS_FIELD_NUMBER
Field Value
TypeDescription
int

PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER

public static final int PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

TOTAL_COST_FIELD_NUMBER

public static final int TOTAL_COST_FIELD_NUMBER
Field Value
TypeDescription
int

TOTAL_DURATION_FIELD_NUMBER

public static final int TOTAL_DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

TRAVEL_DISTANCE_METERS_FIELD_NUMBER

public static final int TRAVEL_DISTANCE_METERS_FIELD_NUMBER
Field Value
TypeDescription
int

TRAVEL_DURATION_FIELD_NUMBER

public static final int TRAVEL_DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

VISIT_DURATION_FIELD_NUMBER

public static final int VISIT_DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

WAIT_DURATION_FIELD_NUMBER

public static final int WAIT_DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AggregatedMetrics getDefaultInstance()
Returns
TypeDescription
AggregatedMetrics

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static AggregatedMetrics.Builder newBuilder()
Returns
TypeDescription
AggregatedMetrics.Builder

newBuilder(AggregatedMetrics prototype)

public static AggregatedMetrics.Builder newBuilder(AggregatedMetrics prototype)
Parameter
NameDescription
prototypeAggregatedMetrics
Returns
TypeDescription
AggregatedMetrics.Builder

parseDelimitedFrom(InputStream input)

public static AggregatedMetrics parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AggregatedMetrics parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AggregatedMetrics parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AggregatedMetrics parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AggregatedMetrics parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AggregatedMetrics parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AggregatedMetrics parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AggregatedMetrics
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AggregatedMetrics> parser()
Returns
TypeDescription
Parser<AggregatedMetrics>

Methods

containsCosts(String key)

public boolean containsCosts(String key)

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

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

Parameter
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBreakDuration()

public Duration getBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
TypeDescription
Duration

The breakDuration.

getBreakDurationOrBuilder()

public DurationOrBuilder getBreakDurationOrBuilder()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

Returns
TypeDescription
DurationOrBuilder

getCosts()

public Map<String,Double> getCosts()

Use #getCostsMap() instead.

Returns
TypeDescription
Map<String,Double>

getCostsCount()

public int getCostsCount()

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

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

Returns
TypeDescription
int

getCostsMap()

public Map<String,Double> getCostsMap()

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

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

Returns
TypeDescription
Map<String,Double>

getCostsOrDefault(String key, double defaultValue)

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

getCostsOrThrow(String key)

public double getCostsOrThrow(String key)

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

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

Parameter
NameDescription
keyString
Returns
TypeDescription
double

getDefaultInstanceForType()

public AggregatedMetrics getDefaultInstanceForType()
Returns
TypeDescription
AggregatedMetrics

getDelayDuration()

public Duration getDelayDuration()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
TypeDescription
Duration

The delayDuration.

getDelayDurationOrBuilder()

public DurationOrBuilder getDelayDurationOrBuilder()

Total delay duration for a route or a solution.

.google.protobuf.Duration delay_duration = 4;

Returns
TypeDescription
DurationOrBuilder

getMaxLoads()

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

Use #getMaxLoadsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueShipmentRoute.VehicleLoad
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
ShipmentRoute.VehicleLoad

getParserForType()

public Parser<AggregatedMetrics> getParserForType()
Returns
TypeDescription
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
TypeDescription
int

The performedShipmentCount.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
DurationOrBuilder

getTravelDistanceMeters()

public double getTravelDistanceMeters()

Total travel distance for a route or a solution.

double travel_distance_meters = 8;

Returns
TypeDescription
double

The travelDistanceMeters.

getTravelDuration()

public Duration getTravelDuration()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
TypeDescription
Duration

The travelDuration.

getTravelDurationOrBuilder()

public DurationOrBuilder getTravelDurationOrBuilder()

Total travel duration for a route or a solution.

.google.protobuf.Duration travel_duration = 2;

Returns
TypeDescription
DurationOrBuilder

getVisitDuration()

public Duration getVisitDuration()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
TypeDescription
Duration

The visitDuration.

getVisitDurationOrBuilder()

public DurationOrBuilder getVisitDurationOrBuilder()

Total visit duration for a route or a solution.

.google.protobuf.Duration visit_duration = 6;

Returns
TypeDescription
DurationOrBuilder

getWaitDuration()

public Duration getWaitDuration()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
TypeDescription
Duration

The waitDuration.

getWaitDurationOrBuilder()

public DurationOrBuilder getWaitDurationOrBuilder()

Total wait duration for a route or a solution.

.google.protobuf.Duration wait_duration = 3;

Returns
TypeDescription
DurationOrBuilder

hasBreakDuration()

public boolean hasBreakDuration()

Total break duration for a route or a solution.

.google.protobuf.Duration break_duration = 5;

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

Whether the waitDuration field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AggregatedMetrics.Builder newBuilderForType()
Returns
TypeDescription
AggregatedMetrics.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AggregatedMetrics.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AggregatedMetrics.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AggregatedMetrics.Builder toBuilder()
Returns
TypeDescription
AggregatedMetrics.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException