All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.maps.routeoptimization.v1.AggregatedMetrics Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/maps/routeoptimization/v1/route_optimization_service.proto

// Protobuf Java Version: 3.25.5
package com.google.maps.routeoptimization.v1;

/**
 *
 *
 * 
 * Aggregated metrics for
 * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute] (resp. for
 * [OptimizeToursResponse][google.maps.routeoptimization.v1.OptimizeToursResponse]
 * over all
 * [Transition][google.maps.routeoptimization.v1.ShipmentRoute.Transition]
 * and/or [Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit] (resp.
 * over all [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute])
 * elements.
 * 
* * Protobuf type {@code google.maps.routeoptimization.v1.AggregatedMetrics} */ public final class AggregatedMetrics extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.routeoptimization.v1.AggregatedMetrics) AggregatedMetricsOrBuilder { private static final long serialVersionUID = 0L; // Use AggregatedMetrics.newBuilder() to construct. private AggregatedMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AggregatedMetrics() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AggregatedMetrics(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_AggregatedMetrics_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 9: return internalGetMaxLoads(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_AggregatedMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.routeoptimization.v1.AggregatedMetrics.class, com.google.maps.routeoptimization.v1.AggregatedMetrics.Builder.class); } private int bitField0_; public static final int PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER = 1; private int performedShipmentCount_ = 0; /** * * *
   * Number of shipments performed. Note that a pickup and delivery pair only
   * counts once.
   * 
* * int32 performed_shipment_count = 1; * * @return The performedShipmentCount. */ @java.lang.Override public int getPerformedShipmentCount() { return performedShipmentCount_; } public static final int TRAVEL_DURATION_FIELD_NUMBER = 2; private com.google.protobuf.Duration travelDuration_; /** * * *
   * Total travel duration for a route or a solution.
   * 
* * .google.protobuf.Duration travel_duration = 2; * * @return Whether the travelDuration field is set. */ @java.lang.Override public boolean hasTravelDuration() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Total travel duration for a route or a solution.
   * 
* * .google.protobuf.Duration travel_duration = 2; * * @return The travelDuration. */ @java.lang.Override public com.google.protobuf.Duration getTravelDuration() { return travelDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : travelDuration_; } /** * * *
   * Total travel duration for a route or a solution.
   * 
* * .google.protobuf.Duration travel_duration = 2; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() { return travelDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : travelDuration_; } public static final int WAIT_DURATION_FIELD_NUMBER = 3; private com.google.protobuf.Duration waitDuration_; /** * * *
   * Total wait duration for a route or a solution.
   * 
* * .google.protobuf.Duration wait_duration = 3; * * @return Whether the waitDuration field is set. */ @java.lang.Override public boolean hasWaitDuration() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Total wait duration for a route or a solution.
   * 
* * .google.protobuf.Duration wait_duration = 3; * * @return The waitDuration. */ @java.lang.Override public com.google.protobuf.Duration getWaitDuration() { return waitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : waitDuration_; } /** * * *
   * Total wait duration for a route or a solution.
   * 
* * .google.protobuf.Duration wait_duration = 3; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getWaitDurationOrBuilder() { return waitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : waitDuration_; } public static final int DELAY_DURATION_FIELD_NUMBER = 4; private com.google.protobuf.Duration delayDuration_; /** * * *
   * Total delay duration for a route or a solution.
   * 
* * .google.protobuf.Duration delay_duration = 4; * * @return Whether the delayDuration field is set. */ @java.lang.Override public boolean hasDelayDuration() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Total delay duration for a route or a solution.
   * 
* * .google.protobuf.Duration delay_duration = 4; * * @return The delayDuration. */ @java.lang.Override public com.google.protobuf.Duration getDelayDuration() { return delayDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delayDuration_; } /** * * *
   * Total delay duration for a route or a solution.
   * 
* * .google.protobuf.Duration delay_duration = 4; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getDelayDurationOrBuilder() { return delayDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delayDuration_; } public static final int BREAK_DURATION_FIELD_NUMBER = 5; private com.google.protobuf.Duration breakDuration_; /** * * *
   * Total break duration for a route or a solution.
   * 
* * .google.protobuf.Duration break_duration = 5; * * @return Whether the breakDuration field is set. */ @java.lang.Override public boolean hasBreakDuration() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * Total break duration for a route or a solution.
   * 
* * .google.protobuf.Duration break_duration = 5; * * @return The breakDuration. */ @java.lang.Override public com.google.protobuf.Duration getBreakDuration() { return breakDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : breakDuration_; } /** * * *
   * Total break duration for a route or a solution.
   * 
* * .google.protobuf.Duration break_duration = 5; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getBreakDurationOrBuilder() { return breakDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : breakDuration_; } public static final int VISIT_DURATION_FIELD_NUMBER = 6; private com.google.protobuf.Duration visitDuration_; /** * * *
   * Total visit duration for a route or a solution.
   * 
* * .google.protobuf.Duration visit_duration = 6; * * @return Whether the visitDuration field is set. */ @java.lang.Override public boolean hasVisitDuration() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * Total visit duration for a route or a solution.
   * 
* * .google.protobuf.Duration visit_duration = 6; * * @return The visitDuration. */ @java.lang.Override public com.google.protobuf.Duration getVisitDuration() { return visitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : visitDuration_; } /** * * *
   * Total visit duration for a route or a solution.
   * 
* * .google.protobuf.Duration visit_duration = 6; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getVisitDurationOrBuilder() { return visitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : visitDuration_; } public static final int TOTAL_DURATION_FIELD_NUMBER = 7; private com.google.protobuf.Duration totalDuration_; /** * * *
   * The total duration should be equal to the sum of all durations above.
   * For routes, it also corresponds to:
   * ```
   * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
   * -
   * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
   * ```
   * 
* * .google.protobuf.Duration total_duration = 7; * * @return Whether the totalDuration field is set. */ @java.lang.Override public boolean hasTotalDuration() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
   * The total duration should be equal to the sum of all durations above.
   * For routes, it also corresponds to:
   * ```
   * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
   * -
   * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
   * ```
   * 
* * .google.protobuf.Duration total_duration = 7; * * @return The totalDuration. */ @java.lang.Override public com.google.protobuf.Duration getTotalDuration() { return totalDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : totalDuration_; } /** * * *
   * The total duration should be equal to the sum of all durations above.
   * For routes, it also corresponds to:
   * ```
   * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
   * -
   * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
   * ```
   * 
* * .google.protobuf.Duration total_duration = 7; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { return totalDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : totalDuration_; } public static final int TRAVEL_DISTANCE_METERS_FIELD_NUMBER = 8; private double travelDistanceMeters_ = 0D; /** * * *
   * Total travel distance for a route or a solution.
   * 
* * double travel_distance_meters = 8; * * @return The travelDistanceMeters. */ @java.lang.Override public double getTravelDistanceMeters() { return travelDistanceMeters_; } public static final int MAX_LOADS_FIELD_NUMBER = 9; private static final class MaxLoadsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> defaultEntry = com.google.protobuf.MapEntry . newDefaultInstance( com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_AggregatedMetrics_MaxLoadsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad .getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> maxLoads_; private com.google.protobuf.MapField< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> internalGetMaxLoads() { if (maxLoads_ == null) { return com.google.protobuf.MapField.emptyMapField(MaxLoadsDefaultEntryHolder.defaultEntry); } return maxLoads_; } public int getMaxLoadsCount() { return internalGetMaxLoads().getMap().size(); } /** * * *
   * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
   * (resp.
   * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
   * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public boolean containsMaxLoads(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetMaxLoads().getMap().containsKey(key); } /** Use {@link #getMaxLoadsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> getMaxLoads() { return 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
   * (resp.
   * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
   * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> getMaxLoadsMap() { return internalGetMaxLoads().getMap(); } /** * * *
   * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
   * (resp.
   * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
   * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public /* nullable */ com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrDefault( java.lang.String key, /* nullable */ com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMaxLoads().getMap(); return map.containsKey(key) ? map.get(key) : 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
   * (resp.
   * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
   * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMaxLoads().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (performedShipmentCount_ != 0) { output.writeInt32(1, performedShipmentCount_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getTravelDuration()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getWaitDuration()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getDelayDuration()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(5, getBreakDuration()); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(6, getVisitDuration()); } if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(7, getTotalDuration()); } if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) { output.writeDouble(8, travelDistanceMeters_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetMaxLoads(), MaxLoadsDefaultEntryHolder.defaultEntry, 9); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (performedShipmentCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, performedShipmentCount_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTravelDuration()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getWaitDuration()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDelayDuration()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getBreakDuration()); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getVisitDuration()); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTotalDuration()); } if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(8, travelDistanceMeters_); } for (java.util.Map.Entry< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> entry : internalGetMaxLoads().getMap().entrySet()) { com.google.protobuf.MapEntry< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> maxLoads__ = MaxLoadsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, maxLoads__); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.maps.routeoptimization.v1.AggregatedMetrics)) { return super.equals(obj); } com.google.maps.routeoptimization.v1.AggregatedMetrics other = (com.google.maps.routeoptimization.v1.AggregatedMetrics) obj; if (getPerformedShipmentCount() != other.getPerformedShipmentCount()) return false; if (hasTravelDuration() != other.hasTravelDuration()) return false; if (hasTravelDuration()) { if (!getTravelDuration().equals(other.getTravelDuration())) return false; } if (hasWaitDuration() != other.hasWaitDuration()) return false; if (hasWaitDuration()) { if (!getWaitDuration().equals(other.getWaitDuration())) return false; } if (hasDelayDuration() != other.hasDelayDuration()) return false; if (hasDelayDuration()) { if (!getDelayDuration().equals(other.getDelayDuration())) return false; } if (hasBreakDuration() != other.hasBreakDuration()) return false; if (hasBreakDuration()) { if (!getBreakDuration().equals(other.getBreakDuration())) return false; } if (hasVisitDuration() != other.hasVisitDuration()) return false; if (hasVisitDuration()) { if (!getVisitDuration().equals(other.getVisitDuration())) return false; } if (hasTotalDuration() != other.hasTotalDuration()) return false; if (hasTotalDuration()) { if (!getTotalDuration().equals(other.getTotalDuration())) return false; } if (java.lang.Double.doubleToLongBits(getTravelDistanceMeters()) != java.lang.Double.doubleToLongBits(other.getTravelDistanceMeters())) return false; if (!internalGetMaxLoads().equals(other.internalGetMaxLoads())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER; hash = (53 * hash) + getPerformedShipmentCount(); if (hasTravelDuration()) { hash = (37 * hash) + TRAVEL_DURATION_FIELD_NUMBER; hash = (53 * hash) + getTravelDuration().hashCode(); } if (hasWaitDuration()) { hash = (37 * hash) + WAIT_DURATION_FIELD_NUMBER; hash = (53 * hash) + getWaitDuration().hashCode(); } if (hasDelayDuration()) { hash = (37 * hash) + DELAY_DURATION_FIELD_NUMBER; hash = (53 * hash) + getDelayDuration().hashCode(); } if (hasBreakDuration()) { hash = (37 * hash) + BREAK_DURATION_FIELD_NUMBER; hash = (53 * hash) + getBreakDuration().hashCode(); } if (hasVisitDuration()) { hash = (37 * hash) + VISIT_DURATION_FIELD_NUMBER; hash = (53 * hash) + getVisitDuration().hashCode(); } if (hasTotalDuration()) { hash = (37 * hash) + TOTAL_DURATION_FIELD_NUMBER; hash = (53 * hash) + getTotalDuration().hashCode(); } hash = (37 * hash) + TRAVEL_DISTANCE_METERS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getTravelDistanceMeters())); if (!internalGetMaxLoads().getMap().isEmpty()) { hash = (37 * hash) + MAX_LOADS_FIELD_NUMBER; hash = (53 * hash) + internalGetMaxLoads().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.maps.routeoptimization.v1.AggregatedMetrics prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Aggregated metrics for
   * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute] (resp. for
   * [OptimizeToursResponse][google.maps.routeoptimization.v1.OptimizeToursResponse]
   * over all
   * [Transition][google.maps.routeoptimization.v1.ShipmentRoute.Transition]
   * and/or [Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit] (resp.
   * over all [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute])
   * elements.
   * 
* * Protobuf type {@code google.maps.routeoptimization.v1.AggregatedMetrics} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.routeoptimization.v1.AggregatedMetrics) com.google.maps.routeoptimization.v1.AggregatedMetricsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_AggregatedMetrics_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 9: return internalGetMaxLoads(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 9: return internalGetMutableMaxLoads(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_AggregatedMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.routeoptimization.v1.AggregatedMetrics.class, com.google.maps.routeoptimization.v1.AggregatedMetrics.Builder.class); } // Construct using com.google.maps.routeoptimization.v1.AggregatedMetrics.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getTravelDurationFieldBuilder(); getWaitDurationFieldBuilder(); getDelayDurationFieldBuilder(); getBreakDurationFieldBuilder(); getVisitDurationFieldBuilder(); getTotalDurationFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; performedShipmentCount_ = 0; travelDuration_ = null; if (travelDurationBuilder_ != null) { travelDurationBuilder_.dispose(); travelDurationBuilder_ = null; } waitDuration_ = null; if (waitDurationBuilder_ != null) { waitDurationBuilder_.dispose(); waitDurationBuilder_ = null; } delayDuration_ = null; if (delayDurationBuilder_ != null) { delayDurationBuilder_.dispose(); delayDurationBuilder_ = null; } breakDuration_ = null; if (breakDurationBuilder_ != null) { breakDurationBuilder_.dispose(); breakDurationBuilder_ = null; } visitDuration_ = null; if (visitDurationBuilder_ != null) { visitDurationBuilder_.dispose(); visitDurationBuilder_ = null; } totalDuration_ = null; if (totalDurationBuilder_ != null) { totalDurationBuilder_.dispose(); totalDurationBuilder_ = null; } travelDistanceMeters_ = 0D; internalGetMutableMaxLoads().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_AggregatedMetrics_descriptor; } @java.lang.Override public com.google.maps.routeoptimization.v1.AggregatedMetrics getDefaultInstanceForType() { return com.google.maps.routeoptimization.v1.AggregatedMetrics.getDefaultInstance(); } @java.lang.Override public com.google.maps.routeoptimization.v1.AggregatedMetrics build() { com.google.maps.routeoptimization.v1.AggregatedMetrics result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.routeoptimization.v1.AggregatedMetrics buildPartial() { com.google.maps.routeoptimization.v1.AggregatedMetrics result = new com.google.maps.routeoptimization.v1.AggregatedMetrics(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.maps.routeoptimization.v1.AggregatedMetrics result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.performedShipmentCount_ = performedShipmentCount_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.travelDuration_ = travelDurationBuilder_ == null ? travelDuration_ : travelDurationBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.waitDuration_ = waitDurationBuilder_ == null ? waitDuration_ : waitDurationBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { result.delayDuration_ = delayDurationBuilder_ == null ? delayDuration_ : delayDurationBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { result.breakDuration_ = breakDurationBuilder_ == null ? breakDuration_ : breakDurationBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000020) != 0)) { result.visitDuration_ = visitDurationBuilder_ == null ? visitDuration_ : visitDurationBuilder_.build(); to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000040) != 0)) { result.totalDuration_ = totalDurationBuilder_ == null ? totalDuration_ : totalDurationBuilder_.build(); to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000080) != 0)) { result.travelDistanceMeters_ = travelDistanceMeters_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.maxLoads_ = internalGetMaxLoads().build(MaxLoadsDefaultEntryHolder.defaultEntry); } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.maps.routeoptimization.v1.AggregatedMetrics) { return mergeFrom((com.google.maps.routeoptimization.v1.AggregatedMetrics) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.maps.routeoptimization.v1.AggregatedMetrics other) { if (other == com.google.maps.routeoptimization.v1.AggregatedMetrics.getDefaultInstance()) return this; if (other.getPerformedShipmentCount() != 0) { setPerformedShipmentCount(other.getPerformedShipmentCount()); } if (other.hasTravelDuration()) { mergeTravelDuration(other.getTravelDuration()); } if (other.hasWaitDuration()) { mergeWaitDuration(other.getWaitDuration()); } if (other.hasDelayDuration()) { mergeDelayDuration(other.getDelayDuration()); } if (other.hasBreakDuration()) { mergeBreakDuration(other.getBreakDuration()); } if (other.hasVisitDuration()) { mergeVisitDuration(other.getVisitDuration()); } if (other.hasTotalDuration()) { mergeTotalDuration(other.getTotalDuration()); } if (other.getTravelDistanceMeters() != 0D) { setTravelDistanceMeters(other.getTravelDistanceMeters()); } internalGetMutableMaxLoads().mergeFrom(other.internalGetMaxLoads()); bitField0_ |= 0x00000100; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { performedShipmentCount_ = input.readInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage(getTravelDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage(getWaitDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage(getDelayDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage(getBreakDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage(getVisitDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage(getTotalDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 case 65: { travelDistanceMeters_ = input.readDouble(); bitField0_ |= 0x00000080; break; } // case 65 case 74: { com.google.protobuf.MapEntry< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> maxLoads__ = input.readMessage( MaxLoadsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableMaxLoads() .ensureBuilderMap() .put(maxLoads__.getKey(), maxLoads__.getValue()); bitField0_ |= 0x00000100; break; } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private int performedShipmentCount_; /** * * *
     * Number of shipments performed. Note that a pickup and delivery pair only
     * counts once.
     * 
* * int32 performed_shipment_count = 1; * * @return The performedShipmentCount. */ @java.lang.Override public int getPerformedShipmentCount() { return performedShipmentCount_; } /** * * *
     * Number of shipments performed. Note that a pickup and delivery pair only
     * counts once.
     * 
* * int32 performed_shipment_count = 1; * * @param value The performedShipmentCount to set. * @return This builder for chaining. */ public Builder setPerformedShipmentCount(int value) { performedShipmentCount_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Number of shipments performed. Note that a pickup and delivery pair only
     * counts once.
     * 
* * int32 performed_shipment_count = 1; * * @return This builder for chaining. */ public Builder clearPerformedShipmentCount() { bitField0_ = (bitField0_ & ~0x00000001); performedShipmentCount_ = 0; onChanged(); return this; } private com.google.protobuf.Duration travelDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> travelDurationBuilder_; /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; * * @return Whether the travelDuration field is set. */ public boolean hasTravelDuration() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; * * @return The travelDuration. */ public com.google.protobuf.Duration getTravelDuration() { if (travelDurationBuilder_ == null) { return travelDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : travelDuration_; } else { return travelDurationBuilder_.getMessage(); } } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; */ public Builder setTravelDuration(com.google.protobuf.Duration value) { if (travelDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } travelDuration_ = value; } else { travelDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; */ public Builder setTravelDuration(com.google.protobuf.Duration.Builder builderForValue) { if (travelDurationBuilder_ == null) { travelDuration_ = builderForValue.build(); } else { travelDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; */ public Builder mergeTravelDuration(com.google.protobuf.Duration value) { if (travelDurationBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && travelDuration_ != null && travelDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getTravelDurationBuilder().mergeFrom(value); } else { travelDuration_ = value; } } else { travelDurationBuilder_.mergeFrom(value); } if (travelDuration_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; */ public Builder clearTravelDuration() { bitField0_ = (bitField0_ & ~0x00000002); travelDuration_ = null; if (travelDurationBuilder_ != null) { travelDurationBuilder_.dispose(); travelDurationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; */ public com.google.protobuf.Duration.Builder getTravelDurationBuilder() { bitField0_ |= 0x00000002; onChanged(); return getTravelDurationFieldBuilder().getBuilder(); } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; */ public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() { if (travelDurationBuilder_ != null) { return travelDurationBuilder_.getMessageOrBuilder(); } else { return travelDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : travelDuration_; } } /** * * *
     * Total travel duration for a route or a solution.
     * 
* * .google.protobuf.Duration travel_duration = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getTravelDurationFieldBuilder() { if (travelDurationBuilder_ == null) { travelDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getTravelDuration(), getParentForChildren(), isClean()); travelDuration_ = null; } return travelDurationBuilder_; } private com.google.protobuf.Duration waitDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> waitDurationBuilder_; /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; * * @return Whether the waitDuration field is set. */ public boolean hasWaitDuration() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; * * @return The waitDuration. */ public com.google.protobuf.Duration getWaitDuration() { if (waitDurationBuilder_ == null) { return waitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : waitDuration_; } else { return waitDurationBuilder_.getMessage(); } } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; */ public Builder setWaitDuration(com.google.protobuf.Duration value) { if (waitDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } waitDuration_ = value; } else { waitDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; */ public Builder setWaitDuration(com.google.protobuf.Duration.Builder builderForValue) { if (waitDurationBuilder_ == null) { waitDuration_ = builderForValue.build(); } else { waitDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; */ public Builder mergeWaitDuration(com.google.protobuf.Duration value) { if (waitDurationBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && waitDuration_ != null && waitDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getWaitDurationBuilder().mergeFrom(value); } else { waitDuration_ = value; } } else { waitDurationBuilder_.mergeFrom(value); } if (waitDuration_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; */ public Builder clearWaitDuration() { bitField0_ = (bitField0_ & ~0x00000004); waitDuration_ = null; if (waitDurationBuilder_ != null) { waitDurationBuilder_.dispose(); waitDurationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; */ public com.google.protobuf.Duration.Builder getWaitDurationBuilder() { bitField0_ |= 0x00000004; onChanged(); return getWaitDurationFieldBuilder().getBuilder(); } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; */ public com.google.protobuf.DurationOrBuilder getWaitDurationOrBuilder() { if (waitDurationBuilder_ != null) { return waitDurationBuilder_.getMessageOrBuilder(); } else { return waitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : waitDuration_; } } /** * * *
     * Total wait duration for a route or a solution.
     * 
* * .google.protobuf.Duration wait_duration = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getWaitDurationFieldBuilder() { if (waitDurationBuilder_ == null) { waitDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getWaitDuration(), getParentForChildren(), isClean()); waitDuration_ = null; } return waitDurationBuilder_; } private com.google.protobuf.Duration delayDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> delayDurationBuilder_; /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; * * @return Whether the delayDuration field is set. */ public boolean hasDelayDuration() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; * * @return The delayDuration. */ public com.google.protobuf.Duration getDelayDuration() { if (delayDurationBuilder_ == null) { return delayDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delayDuration_; } else { return delayDurationBuilder_.getMessage(); } } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; */ public Builder setDelayDuration(com.google.protobuf.Duration value) { if (delayDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } delayDuration_ = value; } else { delayDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; */ public Builder setDelayDuration(com.google.protobuf.Duration.Builder builderForValue) { if (delayDurationBuilder_ == null) { delayDuration_ = builderForValue.build(); } else { delayDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; */ public Builder mergeDelayDuration(com.google.protobuf.Duration value) { if (delayDurationBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && delayDuration_ != null && delayDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getDelayDurationBuilder().mergeFrom(value); } else { delayDuration_ = value; } } else { delayDurationBuilder_.mergeFrom(value); } if (delayDuration_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; */ public Builder clearDelayDuration() { bitField0_ = (bitField0_ & ~0x00000008); delayDuration_ = null; if (delayDurationBuilder_ != null) { delayDurationBuilder_.dispose(); delayDurationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; */ public com.google.protobuf.Duration.Builder getDelayDurationBuilder() { bitField0_ |= 0x00000008; onChanged(); return getDelayDurationFieldBuilder().getBuilder(); } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; */ public com.google.protobuf.DurationOrBuilder getDelayDurationOrBuilder() { if (delayDurationBuilder_ != null) { return delayDurationBuilder_.getMessageOrBuilder(); } else { return delayDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delayDuration_; } } /** * * *
     * Total delay duration for a route or a solution.
     * 
* * .google.protobuf.Duration delay_duration = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getDelayDurationFieldBuilder() { if (delayDurationBuilder_ == null) { delayDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getDelayDuration(), getParentForChildren(), isClean()); delayDuration_ = null; } return delayDurationBuilder_; } private com.google.protobuf.Duration breakDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> breakDurationBuilder_; /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; * * @return Whether the breakDuration field is set. */ public boolean hasBreakDuration() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; * * @return The breakDuration. */ public com.google.protobuf.Duration getBreakDuration() { if (breakDurationBuilder_ == null) { return breakDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : breakDuration_; } else { return breakDurationBuilder_.getMessage(); } } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; */ public Builder setBreakDuration(com.google.protobuf.Duration value) { if (breakDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } breakDuration_ = value; } else { breakDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; */ public Builder setBreakDuration(com.google.protobuf.Duration.Builder builderForValue) { if (breakDurationBuilder_ == null) { breakDuration_ = builderForValue.build(); } else { breakDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; */ public Builder mergeBreakDuration(com.google.protobuf.Duration value) { if (breakDurationBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && breakDuration_ != null && breakDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getBreakDurationBuilder().mergeFrom(value); } else { breakDuration_ = value; } } else { breakDurationBuilder_.mergeFrom(value); } if (breakDuration_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; */ public Builder clearBreakDuration() { bitField0_ = (bitField0_ & ~0x00000010); breakDuration_ = null; if (breakDurationBuilder_ != null) { breakDurationBuilder_.dispose(); breakDurationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; */ public com.google.protobuf.Duration.Builder getBreakDurationBuilder() { bitField0_ |= 0x00000010; onChanged(); return getBreakDurationFieldBuilder().getBuilder(); } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; */ public com.google.protobuf.DurationOrBuilder getBreakDurationOrBuilder() { if (breakDurationBuilder_ != null) { return breakDurationBuilder_.getMessageOrBuilder(); } else { return breakDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : breakDuration_; } } /** * * *
     * Total break duration for a route or a solution.
     * 
* * .google.protobuf.Duration break_duration = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getBreakDurationFieldBuilder() { if (breakDurationBuilder_ == null) { breakDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getBreakDuration(), getParentForChildren(), isClean()); breakDuration_ = null; } return breakDurationBuilder_; } private com.google.protobuf.Duration visitDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> visitDurationBuilder_; /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; * * @return Whether the visitDuration field is set. */ public boolean hasVisitDuration() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; * * @return The visitDuration. */ public com.google.protobuf.Duration getVisitDuration() { if (visitDurationBuilder_ == null) { return visitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : visitDuration_; } else { return visitDurationBuilder_.getMessage(); } } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; */ public Builder setVisitDuration(com.google.protobuf.Duration value) { if (visitDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } visitDuration_ = value; } else { visitDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; */ public Builder setVisitDuration(com.google.protobuf.Duration.Builder builderForValue) { if (visitDurationBuilder_ == null) { visitDuration_ = builderForValue.build(); } else { visitDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; */ public Builder mergeVisitDuration(com.google.protobuf.Duration value) { if (visitDurationBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && visitDuration_ != null && visitDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getVisitDurationBuilder().mergeFrom(value); } else { visitDuration_ = value; } } else { visitDurationBuilder_.mergeFrom(value); } if (visitDuration_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; */ public Builder clearVisitDuration() { bitField0_ = (bitField0_ & ~0x00000020); visitDuration_ = null; if (visitDurationBuilder_ != null) { visitDurationBuilder_.dispose(); visitDurationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; */ public com.google.protobuf.Duration.Builder getVisitDurationBuilder() { bitField0_ |= 0x00000020; onChanged(); return getVisitDurationFieldBuilder().getBuilder(); } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; */ public com.google.protobuf.DurationOrBuilder getVisitDurationOrBuilder() { if (visitDurationBuilder_ != null) { return visitDurationBuilder_.getMessageOrBuilder(); } else { return visitDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : visitDuration_; } } /** * * *
     * Total visit duration for a route or a solution.
     * 
* * .google.protobuf.Duration visit_duration = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getVisitDurationFieldBuilder() { if (visitDurationBuilder_ == null) { visitDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getVisitDuration(), getParentForChildren(), isClean()); visitDuration_ = null; } return visitDurationBuilder_; } private com.google.protobuf.Duration totalDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> totalDurationBuilder_; /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; * * @return Whether the totalDuration field is set. */ public boolean hasTotalDuration() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; * * @return The totalDuration. */ public com.google.protobuf.Duration getTotalDuration() { if (totalDurationBuilder_ == null) { return totalDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : totalDuration_; } else { return totalDurationBuilder_.getMessage(); } } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; */ public Builder setTotalDuration(com.google.protobuf.Duration value) { if (totalDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } totalDuration_ = value; } else { totalDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; */ public Builder setTotalDuration(com.google.protobuf.Duration.Builder builderForValue) { if (totalDurationBuilder_ == null) { totalDuration_ = builderForValue.build(); } else { totalDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; */ public Builder mergeTotalDuration(com.google.protobuf.Duration value) { if (totalDurationBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && totalDuration_ != null && totalDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getTotalDurationBuilder().mergeFrom(value); } else { totalDuration_ = value; } } else { totalDurationBuilder_.mergeFrom(value); } if (totalDuration_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; */ public Builder clearTotalDuration() { bitField0_ = (bitField0_ & ~0x00000040); totalDuration_ = null; if (totalDurationBuilder_ != null) { totalDurationBuilder_.dispose(); totalDurationBuilder_ = null; } onChanged(); return this; } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; */ public com.google.protobuf.Duration.Builder getTotalDurationBuilder() { bitField0_ |= 0x00000040; onChanged(); return getTotalDurationFieldBuilder().getBuilder(); } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; */ public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { if (totalDurationBuilder_ != null) { return totalDurationBuilder_.getMessageOrBuilder(); } else { return totalDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : totalDuration_; } } /** * * *
     * The total duration should be equal to the sum of all durations above.
     * For routes, it also corresponds to:
     * ```
     * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]
     * -
     * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
     * ```
     * 
* * .google.protobuf.Duration total_duration = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getTotalDurationFieldBuilder() { if (totalDurationBuilder_ == null) { totalDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getTotalDuration(), getParentForChildren(), isClean()); totalDuration_ = null; } return totalDurationBuilder_; } private double travelDistanceMeters_; /** * * *
     * Total travel distance for a route or a solution.
     * 
* * double travel_distance_meters = 8; * * @return The travelDistanceMeters. */ @java.lang.Override public double getTravelDistanceMeters() { return travelDistanceMeters_; } /** * * *
     * Total travel distance for a route or a solution.
     * 
* * double travel_distance_meters = 8; * * @param value The travelDistanceMeters to set. * @return This builder for chaining. */ public Builder setTravelDistanceMeters(double value) { travelDistanceMeters_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Total travel distance for a route or a solution.
     * 
* * double travel_distance_meters = 8; * * @return This builder for chaining. */ public Builder clearTravelDistanceMeters() { bitField0_ = (bitField0_ & ~0x00000080); travelDistanceMeters_ = 0D; onChanged(); return this; } private static final class MaxLoadsConverter implements com.google.protobuf.MapFieldBuilder.Converter< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> { @java.lang.Override public com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad build( com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder val) { if (val instanceof com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad) { return (com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad) val; } return ((com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.Builder) val) .build(); } @java.lang.Override public com.google.protobuf.MapEntry< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> defaultEntry() { return MaxLoadsDefaultEntryHolder.defaultEntry; } }; private static final MaxLoadsConverter maxLoadsConverter = new MaxLoadsConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.Builder> maxLoads_; private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.Builder> internalGetMaxLoads() { if (maxLoads_ == null) { return new com.google.protobuf.MapFieldBuilder<>(maxLoadsConverter); } return maxLoads_; } private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.Builder> internalGetMutableMaxLoads() { if (maxLoads_ == null) { maxLoads_ = new com.google.protobuf.MapFieldBuilder<>(maxLoadsConverter); } bitField0_ |= 0x00000100; onChanged(); return maxLoads_; } public int getMaxLoadsCount() { return internalGetMaxLoads().ensureBuilderMap().size(); } /** * * *
     * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public boolean containsMaxLoads(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetMaxLoads().ensureBuilderMap().containsKey(key); } /** Use {@link #getMaxLoadsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> getMaxLoads() { return 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> getMaxLoadsMap() { return internalGetMaxLoads().getImmutableMap(); } /** * * *
     * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public /* nullable */ com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrDefault( java.lang.String key, /* nullable */ com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder> map = internalGetMutableMaxLoads().ensureBuilderMap(); return map.containsKey(key) ? maxLoadsConverter.build(map.get(key)) : 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ @java.lang.Override public com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder> map = internalGetMutableMaxLoads().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return maxLoadsConverter.build(map.get(key)); } public Builder clearMaxLoads() { bitField0_ = (bitField0_ & ~0x00000100); internalGetMutableMaxLoads().clear(); return this; } /** * * *
     * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ public Builder removeMaxLoads(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableMaxLoads().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> getMutableMaxLoads() { bitField0_ |= 0x00000100; return internalGetMutableMaxLoads().ensureMessageMap(); } /** * * *
     * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ public Builder putMaxLoads( java.lang.String key, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableMaxLoads().ensureBuilderMap().put(key, value); bitField0_ |= 0x00000100; return this; } /** * * *
     * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ public Builder putAllMaxLoads( java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> values) { for (java.util.Map.Entry< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutableMaxLoads().ensureBuilderMap().putAll(values); bitField0_ |= 0x00000100; return this; } /** * * *
     * 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.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]
     * (resp.
     * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads].
     * 
* * * map<string, .google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad> max_loads = 9; * */ public com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.Builder putMaxLoadsBuilderIfAbsent(java.lang.String key) { java.util.Map< java.lang.String, com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder> builderMap = internalGetMutableMaxLoads().ensureBuilderMap(); com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoadOrBuilder entry = builderMap.get(key); if (entry == null) { entry = com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.newBuilder(); builderMap.put(key, entry); } if (entry instanceof com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad) { entry = ((com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad) entry).toBuilder(); builderMap.put(key, entry); } return (com.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.Builder) entry; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.maps.routeoptimization.v1.AggregatedMetrics) } // @@protoc_insertion_point(class_scope:google.maps.routeoptimization.v1.AggregatedMetrics) private static final com.google.maps.routeoptimization.v1.AggregatedMetrics DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.routeoptimization.v1.AggregatedMetrics(); } public static com.google.maps.routeoptimization.v1.AggregatedMetrics getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AggregatedMetrics parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.maps.routeoptimization.v1.AggregatedMetrics getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy