Class AggregatedMetrics

  • All Implemented Interfaces:
    AggregatedMetricsOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class AggregatedMetrics
    extends com.google.protobuf.GeneratedMessageV3
    implements AggregatedMetricsOrBuilder
     Aggregated metrics for
     [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp. for
     [OptimizeToursResponse][google.cloud.optimization.v1.OptimizeToursResponse]
     over all [Transition][google.cloud.optimization.v1.ShipmentRoute.Transition]
     and/or [Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] (resp. over
     all [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]) elements.
     
    Protobuf type google.cloud.optimization.v1.AggregatedMetrics
    See Also:
    Serialized Form
    • Field Detail

      • PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER

        public static final int PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAVEL_DURATION_FIELD_NUMBER

        public static final int TRAVEL_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • WAIT_DURATION_FIELD_NUMBER

        public static final int WAIT_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DELAY_DURATION_FIELD_NUMBER

        public static final int DELAY_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • BREAK_DURATION_FIELD_NUMBER

        public static final int BREAK_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • VISIT_DURATION_FIELD_NUMBER

        public static final int VISIT_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TOTAL_DURATION_FIELD_NUMBER

        public static final int TOTAL_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAVEL_DISTANCE_METERS_FIELD_NUMBER

        public static final int TRAVEL_DISTANCE_METERS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TOTAL_COST_FIELD_NUMBER

        public static final int TOTAL_COST_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getPerformedShipmentCount

        public int getPerformedShipmentCount()
         Number of shipments performed. Note that a pickup and delivery pair only
         counts once.
         
        int32 performed_shipment_count = 1;
        Specified by:
        getPerformedShipmentCount in interface AggregatedMetricsOrBuilder
        Returns:
        The performedShipmentCount.
      • hasTravelDuration

        public boolean hasTravelDuration()
         Total travel duration for a route or a solution.
         
        .google.protobuf.Duration travel_duration = 2;
        Specified by:
        hasTravelDuration in interface AggregatedMetricsOrBuilder
        Returns:
        Whether the travelDuration field is set.
      • getTravelDuration

        public com.google.protobuf.Duration getTravelDuration()
         Total travel duration for a route or a solution.
         
        .google.protobuf.Duration travel_duration = 2;
        Specified by:
        getTravelDuration in interface AggregatedMetricsOrBuilder
        Returns:
        The travelDuration.
      • getTravelDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder()
         Total travel duration for a route or a solution.
         
        .google.protobuf.Duration travel_duration = 2;
        Specified by:
        getTravelDurationOrBuilder in interface AggregatedMetricsOrBuilder
      • hasWaitDuration

        public boolean hasWaitDuration()
         Total wait duration for a route or a solution.
         
        .google.protobuf.Duration wait_duration = 3;
        Specified by:
        hasWaitDuration in interface AggregatedMetricsOrBuilder
        Returns:
        Whether the waitDuration field is set.
      • getWaitDuration

        public com.google.protobuf.Duration getWaitDuration()
         Total wait duration for a route or a solution.
         
        .google.protobuf.Duration wait_duration = 3;
        Specified by:
        getWaitDuration in interface AggregatedMetricsOrBuilder
        Returns:
        The waitDuration.
      • getWaitDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getWaitDurationOrBuilder()
         Total wait duration for a route or a solution.
         
        .google.protobuf.Duration wait_duration = 3;
        Specified by:
        getWaitDurationOrBuilder in interface AggregatedMetricsOrBuilder
      • hasDelayDuration

        public boolean hasDelayDuration()
         Total delay duration for a route or a solution.
         
        .google.protobuf.Duration delay_duration = 4;
        Specified by:
        hasDelayDuration in interface AggregatedMetricsOrBuilder
        Returns:
        Whether the delayDuration field is set.
      • getDelayDuration

        public com.google.protobuf.Duration getDelayDuration()
         Total delay duration for a route or a solution.
         
        .google.protobuf.Duration delay_duration = 4;
        Specified by:
        getDelayDuration in interface AggregatedMetricsOrBuilder
        Returns:
        The delayDuration.
      • getDelayDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getDelayDurationOrBuilder()
         Total delay duration for a route or a solution.
         
        .google.protobuf.Duration delay_duration = 4;
        Specified by:
        getDelayDurationOrBuilder in interface AggregatedMetricsOrBuilder
      • hasBreakDuration

        public boolean hasBreakDuration()
         Total break duration for a route or a solution.
         
        .google.protobuf.Duration break_duration = 5;
        Specified by:
        hasBreakDuration in interface AggregatedMetricsOrBuilder
        Returns:
        Whether the breakDuration field is set.
      • getBreakDuration

        public com.google.protobuf.Duration getBreakDuration()
         Total break duration for a route or a solution.
         
        .google.protobuf.Duration break_duration = 5;
        Specified by:
        getBreakDuration in interface AggregatedMetricsOrBuilder
        Returns:
        The breakDuration.
      • getBreakDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getBreakDurationOrBuilder()
         Total break duration for a route or a solution.
         
        .google.protobuf.Duration break_duration = 5;
        Specified by:
        getBreakDurationOrBuilder in interface AggregatedMetricsOrBuilder
      • hasVisitDuration

        public boolean hasVisitDuration()
         Total visit duration for a route or a solution.
         
        .google.protobuf.Duration visit_duration = 6;
        Specified by:
        hasVisitDuration in interface AggregatedMetricsOrBuilder
        Returns:
        Whether the visitDuration field is set.
      • getVisitDuration

        public com.google.protobuf.Duration getVisitDuration()
         Total visit duration for a route or a solution.
         
        .google.protobuf.Duration visit_duration = 6;
        Specified by:
        getVisitDuration in interface AggregatedMetricsOrBuilder
        Returns:
        The visitDuration.
      • getVisitDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getVisitDurationOrBuilder()
         Total visit duration for a route or a solution.
         
        .google.protobuf.Duration visit_duration = 6;
        Specified by:
        getVisitDurationOrBuilder in interface AggregatedMetricsOrBuilder
      • 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][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
         `-`
         [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]
         
        .google.protobuf.Duration total_duration = 7;
        Specified by:
        hasTotalDuration in interface AggregatedMetricsOrBuilder
        Returns:
        Whether the totalDuration field is set.
      • getTotalDuration

        public com.google.protobuf.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][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
         `-`
         [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]
         
        .google.protobuf.Duration total_duration = 7;
        Specified by:
        getTotalDuration in interface AggregatedMetricsOrBuilder
        Returns:
        The totalDuration.
      • getTotalDurationOrBuilder

        public com.google.protobuf.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][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
         `-`
         [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]
         
        .google.protobuf.Duration total_duration = 7;
        Specified by:
        getTotalDurationOrBuilder in interface AggregatedMetricsOrBuilder
      • getTravelDistanceMeters

        public double getTravelDistanceMeters()
         Total travel distance for a route or a solution.
         
        double travel_distance_meters = 8;
        Specified by:
        getTravelDistanceMeters in interface AggregatedMetricsOrBuilder
        Returns:
        The travelDistanceMeters.
      • getMaxLoadsCount

        public int getMaxLoadsCount()
        Description copied from interface: AggregatedMetricsOrBuilder
         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][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
         (resp.
         [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;
        Specified by:
        getMaxLoadsCount in interface AggregatedMetricsOrBuilder
      • containsMaxLoads

        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][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
         (resp.
         [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;
        Specified by:
        containsMaxLoads in interface AggregatedMetricsOrBuilder
      • 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][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
         (resp.
         [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;
        Specified by:
        getMaxLoadsMap in interface AggregatedMetricsOrBuilder
      • getMaxLoadsOrDefault

        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][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
         (resp.
         [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;
        Specified by:
        getMaxLoadsOrDefault in interface AggregatedMetricsOrBuilder
      • getMaxLoadsOrThrow

        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][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
         (resp.
         [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9;
        Specified by:
        getMaxLoadsOrThrow in interface AggregatedMetricsOrBuilder
      • getCostsCount

        @Deprecated
        public int getCostsCount()
        Deprecated.
        Description copied from interface: AggregatedMetricsOrBuilder
         Deprecated: Use
         [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
         and
         [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
         instead.
         
        map<string, double> costs = 10 [deprecated = true];
        Specified by:
        getCostsCount in interface AggregatedMetricsOrBuilder
      • containsCosts

        @Deprecated
        public boolean containsCosts​(String key)
        Deprecated.
         Deprecated: Use
         [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
         and
         [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
         instead.
         
        map<string, double> costs = 10 [deprecated = true];
        Specified by:
        containsCosts in interface AggregatedMetricsOrBuilder
      • getCostsMap

        @Deprecated
        public Map<String,​Double> getCostsMap()
        Deprecated.
         Deprecated: Use
         [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
         and
         [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
         instead.
         
        map<string, double> costs = 10 [deprecated = true];
        Specified by:
        getCostsMap in interface AggregatedMetricsOrBuilder
      • getCostsOrDefault

        @Deprecated
        public double getCostsOrDefault​(String key,
                                        double defaultValue)
        Deprecated.
         Deprecated: Use
         [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
         and
         [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
         instead.
         
        map<string, double> costs = 10 [deprecated = true];
        Specified by:
        getCostsOrDefault in interface AggregatedMetricsOrBuilder
      • getCostsOrThrow

        @Deprecated
        public double getCostsOrThrow​(String key)
        Deprecated.
         Deprecated: Use
         [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
         and
         [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
         instead.
         
        map<string, double> costs = 10 [deprecated = true];
        Specified by:
        getCostsOrThrow in interface AggregatedMetricsOrBuilder
      • getTotalCost

        @Deprecated
        public double getTotalCost()
        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][google.cloud.optimization.v1.ShipmentRoute.route_total_cost]
         and
         [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
         instead.
         
        double total_cost = 11 [deprecated = true];
        Specified by:
        getTotalCost in interface AggregatedMetricsOrBuilder
        Returns:
        The totalCost.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static AggregatedMetrics parseFrom​(ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AggregatedMetrics parseFrom​(ByteBuffer data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AggregatedMetrics parseFrom​(com.google.protobuf.ByteString data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AggregatedMetrics parseFrom​(com.google.protobuf.ByteString data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AggregatedMetrics parseFrom​(byte[] data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AggregatedMetrics parseFrom​(byte[] data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AggregatedMetrics parseFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws IOException
        Throws:
        IOException
      • newBuilderForType

        public AggregatedMetrics.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public AggregatedMetrics.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected AggregatedMetrics.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<AggregatedMetrics> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public AggregatedMetrics getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder