Class OptimizeToursResponse.Metrics

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.optimization.v1.OptimizeToursResponse.Metrics
All Implemented Interfaces:
OptimizeToursResponse.MetricsOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
OptimizeToursResponse

public static final class OptimizeToursResponse.Metrics extends com.google.protobuf.GeneratedMessage implements OptimizeToursResponse.MetricsOrBuilder
 Overall metrics, aggregated over all routes.
 
Protobuf type google.cloud.optimization.v1.OptimizeToursResponse.Metrics
See Also:
  • Field Details

    • AGGREGATED_ROUTE_METRICS_FIELD_NUMBER

      public static final int AGGREGATED_ROUTE_METRICS_FIELD_NUMBER
      See Also:
    • SKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER

      public static final int SKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER
      See Also:
    • USED_VEHICLE_COUNT_FIELD_NUMBER

      public static final int USED_VEHICLE_COUNT_FIELD_NUMBER
      See Also:
    • EARLIEST_VEHICLE_START_TIME_FIELD_NUMBER

      public static final int EARLIEST_VEHICLE_START_TIME_FIELD_NUMBER
      See Also:
    • LATEST_VEHICLE_END_TIME_FIELD_NUMBER

      public static final int LATEST_VEHICLE_END_TIME_FIELD_NUMBER
      See Also:
    • COSTS_FIELD_NUMBER

      public static final int COSTS_FIELD_NUMBER
      See Also:
    • TOTAL_COST_FIELD_NUMBER

      public static final int TOTAL_COST_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • hasAggregatedRouteMetrics

      public boolean hasAggregatedRouteMetrics()
       Aggregated over the routes. Each metric is the sum (or max, for loads)
       over all
       [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics]
       fields of the same name.
       
      .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
      Specified by:
      hasAggregatedRouteMetrics in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      Whether the aggregatedRouteMetrics field is set.
    • getAggregatedRouteMetrics

      public AggregatedMetrics getAggregatedRouteMetrics()
       Aggregated over the routes. Each metric is the sum (or max, for loads)
       over all
       [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics]
       fields of the same name.
       
      .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
      Specified by:
      getAggregatedRouteMetrics in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      The aggregatedRouteMetrics.
    • getAggregatedRouteMetricsOrBuilder

      public AggregatedMetricsOrBuilder getAggregatedRouteMetricsOrBuilder()
       Aggregated over the routes. Each metric is the sum (or max, for loads)
       over all
       [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics]
       fields of the same name.
       
      .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
      Specified by:
      getAggregatedRouteMetricsOrBuilder in interface OptimizeToursResponse.MetricsOrBuilder
    • getSkippedMandatoryShipmentCount

      public int getSkippedMandatoryShipmentCount()
       Number of mandatory shipments skipped.
       
      int32 skipped_mandatory_shipment_count = 2;
      Specified by:
      getSkippedMandatoryShipmentCount in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      The skippedMandatoryShipmentCount.
    • getUsedVehicleCount

      public int getUsedVehicleCount()
       Number of vehicles used. Note: if a vehicle route is empty and
       [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty]
       is true, the vehicle is considered used.
       
      int32 used_vehicle_count = 3;
      Specified by:
      getUsedVehicleCount in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      The usedVehicleCount.
    • hasEarliestVehicleStartTime

      public boolean hasEarliestVehicleStartTime()
       The earliest start time for a used vehicle, computed as the minimum over
       all used vehicles of
       [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
       
      .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
      Specified by:
      hasEarliestVehicleStartTime in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      Whether the earliestVehicleStartTime field is set.
    • getEarliestVehicleStartTime

      public com.google.protobuf.Timestamp getEarliestVehicleStartTime()
       The earliest start time for a used vehicle, computed as the minimum over
       all used vehicles of
       [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
       
      .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
      Specified by:
      getEarliestVehicleStartTime in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      The earliestVehicleStartTime.
    • getEarliestVehicleStartTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getEarliestVehicleStartTimeOrBuilder()
       The earliest start time for a used vehicle, computed as the minimum over
       all used vehicles of
       [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
       
      .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
      Specified by:
      getEarliestVehicleStartTimeOrBuilder in interface OptimizeToursResponse.MetricsOrBuilder
    • hasLatestVehicleEndTime

      public boolean hasLatestVehicleEndTime()
       The latest end time for a used vehicle, computed as the maximum over all
       used vehicles of
       [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time].
       
      .google.protobuf.Timestamp latest_vehicle_end_time = 5;
      Specified by:
      hasLatestVehicleEndTime in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      Whether the latestVehicleEndTime field is set.
    • getLatestVehicleEndTime

      public com.google.protobuf.Timestamp getLatestVehicleEndTime()
       The latest end time for a used vehicle, computed as the maximum over all
       used vehicles of
       [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time].
       
      .google.protobuf.Timestamp latest_vehicle_end_time = 5;
      Specified by:
      getLatestVehicleEndTime in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      The latestVehicleEndTime.
    • getLatestVehicleEndTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getLatestVehicleEndTimeOrBuilder()
       The latest end time for a used vehicle, computed as the maximum over all
       used vehicles of
       [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time].
       
      .google.protobuf.Timestamp latest_vehicle_end_time = 5;
      Specified by:
      getLatestVehicleEndTimeOrBuilder in interface OptimizeToursResponse.MetricsOrBuilder
    • getCostsCount

      public int getCostsCount()
      Description copied from interface: OptimizeToursResponse.MetricsOrBuilder
       Cost of the solution, broken down by cost-related request fields.
       The keys are proto paths, relative to the input OptimizeToursRequest,
       e.g. "model.shipments.pickups.cost", and the values are the total cost
       generated by the corresponding cost field, aggregated over the whole
       solution. In other words, costs["model.shipments.pickups.cost"] is the
       sum of all pickup costs over the solution. All costs defined in the model
       are reported in detail here with the exception of costs related to
       TransitionAttributes that are only reported in an aggregated way as of
       2022/01.
       
      map<string, double> costs = 10;
      Specified by:
      getCostsCount in interface OptimizeToursResponse.MetricsOrBuilder
    • containsCosts

      public boolean containsCosts(String key)
       Cost of the solution, broken down by cost-related request fields.
       The keys are proto paths, relative to the input OptimizeToursRequest,
       e.g. "model.shipments.pickups.cost", and the values are the total cost
       generated by the corresponding cost field, aggregated over the whole
       solution. In other words, costs["model.shipments.pickups.cost"] is the
       sum of all pickup costs over the solution. All costs defined in the model
       are reported in detail here with the exception of costs related to
       TransitionAttributes that are only reported in an aggregated way as of
       2022/01.
       
      map<string, double> costs = 10;
      Specified by:
      containsCosts in interface OptimizeToursResponse.MetricsOrBuilder
    • getCosts

      @Deprecated public Map<String,Double> getCosts()
      Deprecated.
      Use getCostsMap() instead.
      Specified by:
      getCosts in interface OptimizeToursResponse.MetricsOrBuilder
    • getCostsMap

      public Map<String,Double> getCostsMap()
       Cost of the solution, broken down by cost-related request fields.
       The keys are proto paths, relative to the input OptimizeToursRequest,
       e.g. "model.shipments.pickups.cost", and the values are the total cost
       generated by the corresponding cost field, aggregated over the whole
       solution. In other words, costs["model.shipments.pickups.cost"] is the
       sum of all pickup costs over the solution. All costs defined in the model
       are reported in detail here with the exception of costs related to
       TransitionAttributes that are only reported in an aggregated way as of
       2022/01.
       
      map<string, double> costs = 10;
      Specified by:
      getCostsMap in interface OptimizeToursResponse.MetricsOrBuilder
    • getCostsOrDefault

      public double getCostsOrDefault(String key, double defaultValue)
       Cost of the solution, broken down by cost-related request fields.
       The keys are proto paths, relative to the input OptimizeToursRequest,
       e.g. "model.shipments.pickups.cost", and the values are the total cost
       generated by the corresponding cost field, aggregated over the whole
       solution. In other words, costs["model.shipments.pickups.cost"] is the
       sum of all pickup costs over the solution. All costs defined in the model
       are reported in detail here with the exception of costs related to
       TransitionAttributes that are only reported in an aggregated way as of
       2022/01.
       
      map<string, double> costs = 10;
      Specified by:
      getCostsOrDefault in interface OptimizeToursResponse.MetricsOrBuilder
    • getCostsOrThrow

      public double getCostsOrThrow(String key)
       Cost of the solution, broken down by cost-related request fields.
       The keys are proto paths, relative to the input OptimizeToursRequest,
       e.g. "model.shipments.pickups.cost", and the values are the total cost
       generated by the corresponding cost field, aggregated over the whole
       solution. In other words, costs["model.shipments.pickups.cost"] is the
       sum of all pickup costs over the solution. All costs defined in the model
       are reported in detail here with the exception of costs related to
       TransitionAttributes that are only reported in an aggregated way as of
       2022/01.
       
      map<string, double> costs = 10;
      Specified by:
      getCostsOrThrow in interface OptimizeToursResponse.MetricsOrBuilder
    • getTotalCost

      public double getTotalCost()
       Total cost of the solution. The sum of all values in the costs map.
       
      double total_cost = 6;
      Specified by:
      getTotalCost in interface OptimizeToursResponse.MetricsOrBuilder
      Returns:
      The totalCost.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • 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.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • 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 OptimizeToursResponse.Metrics parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      public static OptimizeToursResponse.Metrics parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OptimizeToursResponse.Metrics parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OptimizeToursResponse.Metrics parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OptimizeToursResponse.Metrics parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OptimizeToursResponse.Metrics parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public OptimizeToursResponse.Metrics.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OptimizeToursResponse.Metrics.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OptimizeToursResponse.Metrics.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static OptimizeToursResponse.Metrics getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OptimizeToursResponse.Metrics> parser()
    • getParserForType

      public com.google.protobuf.Parser<OptimizeToursResponse.Metrics> 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.GeneratedMessage
    • getDefaultInstanceForType

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