• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/optimization/v1/fleet_routing.proto
18 
19 package com.google.cloud.optimization.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Aggregated metrics for
26  * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp. for
27  * [OptimizeToursResponse][google.cloud.optimization.v1.OptimizeToursResponse]
28  * over all [Transition][google.cloud.optimization.v1.ShipmentRoute.Transition]
29  * and/or [Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] (resp. over
30  * all [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]) elements.
31  * </pre>
32  *
33  * Protobuf type {@code google.cloud.optimization.v1.AggregatedMetrics}
34  */
35 public final class AggregatedMetrics extends com.google.protobuf.GeneratedMessageV3
36     implements
37     // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.AggregatedMetrics)
38     AggregatedMetricsOrBuilder {
39   private static final long serialVersionUID = 0L;
40   // Use AggregatedMetrics.newBuilder() to construct.
AggregatedMetrics(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)41   private AggregatedMetrics(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
42     super(builder);
43   }
44 
AggregatedMetrics()45   private AggregatedMetrics() {}
46 
47   @java.lang.Override
48   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)49   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
50     return new AggregatedMetrics();
51   }
52 
53   @java.lang.Override
getUnknownFields()54   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
55     return this.unknownFields;
56   }
57 
getDescriptor()58   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
59     return com.google.cloud.optimization.v1.FleetRoutingProto
60         .internal_static_google_cloud_optimization_v1_AggregatedMetrics_descriptor;
61   }
62 
63   @SuppressWarnings({"rawtypes"})
64   @java.lang.Override
internalGetMapField(int number)65   protected com.google.protobuf.MapField internalGetMapField(int number) {
66     switch (number) {
67       case 9:
68         return internalGetMaxLoads();
69       case 10:
70         return internalGetCosts();
71       default:
72         throw new RuntimeException("Invalid map field number: " + number);
73     }
74   }
75 
76   @java.lang.Override
77   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()78       internalGetFieldAccessorTable() {
79     return com.google.cloud.optimization.v1.FleetRoutingProto
80         .internal_static_google_cloud_optimization_v1_AggregatedMetrics_fieldAccessorTable
81         .ensureFieldAccessorsInitialized(
82             com.google.cloud.optimization.v1.AggregatedMetrics.class,
83             com.google.cloud.optimization.v1.AggregatedMetrics.Builder.class);
84   }
85 
86   public static final int PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER = 1;
87   private int performedShipmentCount_ = 0;
88   /**
89    *
90    *
91    * <pre>
92    * Number of shipments performed. Note that a pickup and delivery pair only
93    * counts once.
94    * </pre>
95    *
96    * <code>int32 performed_shipment_count = 1;</code>
97    *
98    * @return The performedShipmentCount.
99    */
100   @java.lang.Override
getPerformedShipmentCount()101   public int getPerformedShipmentCount() {
102     return performedShipmentCount_;
103   }
104 
105   public static final int TRAVEL_DURATION_FIELD_NUMBER = 2;
106   private com.google.protobuf.Duration travelDuration_;
107   /**
108    *
109    *
110    * <pre>
111    * Total travel duration for a route or a solution.
112    * </pre>
113    *
114    * <code>.google.protobuf.Duration travel_duration = 2;</code>
115    *
116    * @return Whether the travelDuration field is set.
117    */
118   @java.lang.Override
hasTravelDuration()119   public boolean hasTravelDuration() {
120     return travelDuration_ != null;
121   }
122   /**
123    *
124    *
125    * <pre>
126    * Total travel duration for a route or a solution.
127    * </pre>
128    *
129    * <code>.google.protobuf.Duration travel_duration = 2;</code>
130    *
131    * @return The travelDuration.
132    */
133   @java.lang.Override
getTravelDuration()134   public com.google.protobuf.Duration getTravelDuration() {
135     return travelDuration_ == null
136         ? com.google.protobuf.Duration.getDefaultInstance()
137         : travelDuration_;
138   }
139   /**
140    *
141    *
142    * <pre>
143    * Total travel duration for a route or a solution.
144    * </pre>
145    *
146    * <code>.google.protobuf.Duration travel_duration = 2;</code>
147    */
148   @java.lang.Override
getTravelDurationOrBuilder()149   public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() {
150     return travelDuration_ == null
151         ? com.google.protobuf.Duration.getDefaultInstance()
152         : travelDuration_;
153   }
154 
155   public static final int WAIT_DURATION_FIELD_NUMBER = 3;
156   private com.google.protobuf.Duration waitDuration_;
157   /**
158    *
159    *
160    * <pre>
161    * Total wait duration for a route or a solution.
162    * </pre>
163    *
164    * <code>.google.protobuf.Duration wait_duration = 3;</code>
165    *
166    * @return Whether the waitDuration field is set.
167    */
168   @java.lang.Override
hasWaitDuration()169   public boolean hasWaitDuration() {
170     return waitDuration_ != null;
171   }
172   /**
173    *
174    *
175    * <pre>
176    * Total wait duration for a route or a solution.
177    * </pre>
178    *
179    * <code>.google.protobuf.Duration wait_duration = 3;</code>
180    *
181    * @return The waitDuration.
182    */
183   @java.lang.Override
getWaitDuration()184   public com.google.protobuf.Duration getWaitDuration() {
185     return waitDuration_ == null
186         ? com.google.protobuf.Duration.getDefaultInstance()
187         : waitDuration_;
188   }
189   /**
190    *
191    *
192    * <pre>
193    * Total wait duration for a route or a solution.
194    * </pre>
195    *
196    * <code>.google.protobuf.Duration wait_duration = 3;</code>
197    */
198   @java.lang.Override
getWaitDurationOrBuilder()199   public com.google.protobuf.DurationOrBuilder getWaitDurationOrBuilder() {
200     return waitDuration_ == null
201         ? com.google.protobuf.Duration.getDefaultInstance()
202         : waitDuration_;
203   }
204 
205   public static final int DELAY_DURATION_FIELD_NUMBER = 4;
206   private com.google.protobuf.Duration delayDuration_;
207   /**
208    *
209    *
210    * <pre>
211    * Total delay duration for a route or a solution.
212    * </pre>
213    *
214    * <code>.google.protobuf.Duration delay_duration = 4;</code>
215    *
216    * @return Whether the delayDuration field is set.
217    */
218   @java.lang.Override
hasDelayDuration()219   public boolean hasDelayDuration() {
220     return delayDuration_ != null;
221   }
222   /**
223    *
224    *
225    * <pre>
226    * Total delay duration for a route or a solution.
227    * </pre>
228    *
229    * <code>.google.protobuf.Duration delay_duration = 4;</code>
230    *
231    * @return The delayDuration.
232    */
233   @java.lang.Override
getDelayDuration()234   public com.google.protobuf.Duration getDelayDuration() {
235     return delayDuration_ == null
236         ? com.google.protobuf.Duration.getDefaultInstance()
237         : delayDuration_;
238   }
239   /**
240    *
241    *
242    * <pre>
243    * Total delay duration for a route or a solution.
244    * </pre>
245    *
246    * <code>.google.protobuf.Duration delay_duration = 4;</code>
247    */
248   @java.lang.Override
getDelayDurationOrBuilder()249   public com.google.protobuf.DurationOrBuilder getDelayDurationOrBuilder() {
250     return delayDuration_ == null
251         ? com.google.protobuf.Duration.getDefaultInstance()
252         : delayDuration_;
253   }
254 
255   public static final int BREAK_DURATION_FIELD_NUMBER = 5;
256   private com.google.protobuf.Duration breakDuration_;
257   /**
258    *
259    *
260    * <pre>
261    * Total break duration for a route or a solution.
262    * </pre>
263    *
264    * <code>.google.protobuf.Duration break_duration = 5;</code>
265    *
266    * @return Whether the breakDuration field is set.
267    */
268   @java.lang.Override
hasBreakDuration()269   public boolean hasBreakDuration() {
270     return breakDuration_ != null;
271   }
272   /**
273    *
274    *
275    * <pre>
276    * Total break duration for a route or a solution.
277    * </pre>
278    *
279    * <code>.google.protobuf.Duration break_duration = 5;</code>
280    *
281    * @return The breakDuration.
282    */
283   @java.lang.Override
getBreakDuration()284   public com.google.protobuf.Duration getBreakDuration() {
285     return breakDuration_ == null
286         ? com.google.protobuf.Duration.getDefaultInstance()
287         : breakDuration_;
288   }
289   /**
290    *
291    *
292    * <pre>
293    * Total break duration for a route or a solution.
294    * </pre>
295    *
296    * <code>.google.protobuf.Duration break_duration = 5;</code>
297    */
298   @java.lang.Override
getBreakDurationOrBuilder()299   public com.google.protobuf.DurationOrBuilder getBreakDurationOrBuilder() {
300     return breakDuration_ == null
301         ? com.google.protobuf.Duration.getDefaultInstance()
302         : breakDuration_;
303   }
304 
305   public static final int VISIT_DURATION_FIELD_NUMBER = 6;
306   private com.google.protobuf.Duration visitDuration_;
307   /**
308    *
309    *
310    * <pre>
311    * Total visit duration for a route or a solution.
312    * </pre>
313    *
314    * <code>.google.protobuf.Duration visit_duration = 6;</code>
315    *
316    * @return Whether the visitDuration field is set.
317    */
318   @java.lang.Override
hasVisitDuration()319   public boolean hasVisitDuration() {
320     return visitDuration_ != null;
321   }
322   /**
323    *
324    *
325    * <pre>
326    * Total visit duration for a route or a solution.
327    * </pre>
328    *
329    * <code>.google.protobuf.Duration visit_duration = 6;</code>
330    *
331    * @return The visitDuration.
332    */
333   @java.lang.Override
getVisitDuration()334   public com.google.protobuf.Duration getVisitDuration() {
335     return visitDuration_ == null
336         ? com.google.protobuf.Duration.getDefaultInstance()
337         : visitDuration_;
338   }
339   /**
340    *
341    *
342    * <pre>
343    * Total visit duration for a route or a solution.
344    * </pre>
345    *
346    * <code>.google.protobuf.Duration visit_duration = 6;</code>
347    */
348   @java.lang.Override
getVisitDurationOrBuilder()349   public com.google.protobuf.DurationOrBuilder getVisitDurationOrBuilder() {
350     return visitDuration_ == null
351         ? com.google.protobuf.Duration.getDefaultInstance()
352         : visitDuration_;
353   }
354 
355   public static final int TOTAL_DURATION_FIELD_NUMBER = 7;
356   private com.google.protobuf.Duration totalDuration_;
357   /**
358    *
359    *
360    * <pre>
361    * The total duration should be equal to the sum of all durations above.
362    * For routes, it also corresponds to
363    * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
364    * -
365    * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
366    * </pre>
367    *
368    * <code>.google.protobuf.Duration total_duration = 7;</code>
369    *
370    * @return Whether the totalDuration field is set.
371    */
372   @java.lang.Override
hasTotalDuration()373   public boolean hasTotalDuration() {
374     return totalDuration_ != null;
375   }
376   /**
377    *
378    *
379    * <pre>
380    * The total duration should be equal to the sum of all durations above.
381    * For routes, it also corresponds to
382    * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
383    * -
384    * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
385    * </pre>
386    *
387    * <code>.google.protobuf.Duration total_duration = 7;</code>
388    *
389    * @return The totalDuration.
390    */
391   @java.lang.Override
getTotalDuration()392   public com.google.protobuf.Duration getTotalDuration() {
393     return totalDuration_ == null
394         ? com.google.protobuf.Duration.getDefaultInstance()
395         : totalDuration_;
396   }
397   /**
398    *
399    *
400    * <pre>
401    * The total duration should be equal to the sum of all durations above.
402    * For routes, it also corresponds to
403    * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
404    * -
405    * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
406    * </pre>
407    *
408    * <code>.google.protobuf.Duration total_duration = 7;</code>
409    */
410   @java.lang.Override
getTotalDurationOrBuilder()411   public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() {
412     return totalDuration_ == null
413         ? com.google.protobuf.Duration.getDefaultInstance()
414         : totalDuration_;
415   }
416 
417   public static final int TRAVEL_DISTANCE_METERS_FIELD_NUMBER = 8;
418   private double travelDistanceMeters_ = 0D;
419   /**
420    *
421    *
422    * <pre>
423    * Total travel distance for a route or a solution.
424    * </pre>
425    *
426    * <code>double travel_distance_meters = 8;</code>
427    *
428    * @return The travelDistanceMeters.
429    */
430   @java.lang.Override
getTravelDistanceMeters()431   public double getTravelDistanceMeters() {
432     return travelDistanceMeters_;
433   }
434 
435   public static final int MAX_LOADS_FIELD_NUMBER = 9;
436 
437   private static final class MaxLoadsDefaultEntryHolder {
438     static final com.google.protobuf.MapEntry<
439             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
440         defaultEntry =
441             com.google.protobuf.MapEntry
442                 .<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
443                     newDefaultInstance(
444                         com.google.cloud.optimization.v1.FleetRoutingProto
445                             .internal_static_google_cloud_optimization_v1_AggregatedMetrics_MaxLoadsEntry_descriptor,
446                         com.google.protobuf.WireFormat.FieldType.STRING,
447                         "",
448                         com.google.protobuf.WireFormat.FieldType.MESSAGE,
449                         com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad
450                             .getDefaultInstance());
451   }
452 
453   @SuppressWarnings("serial")
454   private com.google.protobuf.MapField<
455           java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
456       maxLoads_;
457 
458   private com.google.protobuf.MapField<
459           java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
internalGetMaxLoads()460       internalGetMaxLoads() {
461     if (maxLoads_ == null) {
462       return com.google.protobuf.MapField.emptyMapField(MaxLoadsDefaultEntryHolder.defaultEntry);
463     }
464     return maxLoads_;
465   }
466 
getMaxLoadsCount()467   public int getMaxLoadsCount() {
468     return internalGetMaxLoads().getMap().size();
469   }
470   /**
471    *
472    *
473    * <pre>
474    * Maximum load achieved over the entire route (resp. solution), for each of
475    * the quantities on this route (resp. solution), computed as the maximum over
476    * all
477    * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
478    * (resp.
479    * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
480    * </pre>
481    *
482    * <code>map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
483    * </code>
484    */
485   @java.lang.Override
containsMaxLoads(java.lang.String key)486   public boolean containsMaxLoads(java.lang.String key) {
487     if (key == null) {
488       throw new NullPointerException("map key");
489     }
490     return internalGetMaxLoads().getMap().containsKey(key);
491   }
492   /** Use {@link #getMaxLoadsMap()} instead. */
493   @java.lang.Override
494   @java.lang.Deprecated
495   public java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
getMaxLoads()496       getMaxLoads() {
497     return getMaxLoadsMap();
498   }
499   /**
500    *
501    *
502    * <pre>
503    * Maximum load achieved over the entire route (resp. solution), for each of
504    * the quantities on this route (resp. solution), computed as the maximum over
505    * all
506    * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
507    * (resp.
508    * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
509    * </pre>
510    *
511    * <code>map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
512    * </code>
513    */
514   @java.lang.Override
515   public java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
getMaxLoadsMap()516       getMaxLoadsMap() {
517     return internalGetMaxLoads().getMap();
518   }
519   /**
520    *
521    *
522    * <pre>
523    * Maximum load achieved over the entire route (resp. solution), for each of
524    * the quantities on this route (resp. solution), computed as the maximum over
525    * all
526    * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
527    * (resp.
528    * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
529    * </pre>
530    *
531    * <code>map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
532    * </code>
533    */
534   @java.lang.Override
535   public /* nullable */ com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad
getMaxLoadsOrDefault( java.lang.String key, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad defaultValue)536       getMaxLoadsOrDefault(
537           java.lang.String key,
538           /* nullable */
539           com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad defaultValue) {
540     if (key == null) {
541       throw new NullPointerException("map key");
542     }
543     java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
544         map = internalGetMaxLoads().getMap();
545     return map.containsKey(key) ? map.get(key) : defaultValue;
546   }
547   /**
548    *
549    *
550    * <pre>
551    * Maximum load achieved over the entire route (resp. solution), for each of
552    * the quantities on this route (resp. solution), computed as the maximum over
553    * all
554    * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
555    * (resp.
556    * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
557    * </pre>
558    *
559    * <code>map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
560    * </code>
561    */
562   @java.lang.Override
getMaxLoadsOrThrow( java.lang.String key)563   public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow(
564       java.lang.String key) {
565     if (key == null) {
566       throw new NullPointerException("map key");
567     }
568     java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
569         map = internalGetMaxLoads().getMap();
570     if (!map.containsKey(key)) {
571       throw new java.lang.IllegalArgumentException();
572     }
573     return map.get(key);
574   }
575 
576   public static final int COSTS_FIELD_NUMBER = 10;
577 
578   private static final class CostsDefaultEntryHolder {
579     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.Double> defaultEntry =
580         com.google.protobuf.MapEntry.<java.lang.String, java.lang.Double>newDefaultInstance(
581             com.google.cloud.optimization.v1.FleetRoutingProto
582                 .internal_static_google_cloud_optimization_v1_AggregatedMetrics_CostsEntry_descriptor,
583             com.google.protobuf.WireFormat.FieldType.STRING,
584             "",
585             com.google.protobuf.WireFormat.FieldType.DOUBLE,
586             0D);
587   }
588 
589   @SuppressWarnings("serial")
590   private com.google.protobuf.MapField<java.lang.String, java.lang.Double> costs_;
591 
internalGetCosts()592   private com.google.protobuf.MapField<java.lang.String, java.lang.Double> internalGetCosts() {
593     if (costs_ == null) {
594       return com.google.protobuf.MapField.emptyMapField(CostsDefaultEntryHolder.defaultEntry);
595     }
596     return costs_;
597   }
598 
599   @java.lang.Deprecated
getCostsCount()600   public int getCostsCount() {
601     return internalGetCosts().getMap().size();
602   }
603   /**
604    *
605    *
606    * <pre>
607    * Deprecated: Use
608    * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
609    * and
610    * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
611    * instead.
612    * </pre>
613    *
614    * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
615    */
616   @java.lang.Override
617   @java.lang.Deprecated
containsCosts(java.lang.String key)618   public boolean containsCosts(java.lang.String key) {
619     if (key == null) {
620       throw new NullPointerException("map key");
621     }
622     return internalGetCosts().getMap().containsKey(key);
623   }
624   /** Use {@link #getCostsMap()} instead. */
625   @java.lang.Override
626   @java.lang.Deprecated
getCosts()627   public java.util.Map<java.lang.String, java.lang.Double> getCosts() {
628     return getCostsMap();
629   }
630   /**
631    *
632    *
633    * <pre>
634    * Deprecated: Use
635    * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
636    * and
637    * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
638    * instead.
639    * </pre>
640    *
641    * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
642    */
643   @java.lang.Override
644   @java.lang.Deprecated
getCostsMap()645   public java.util.Map<java.lang.String, java.lang.Double> getCostsMap() {
646     return internalGetCosts().getMap();
647   }
648   /**
649    *
650    *
651    * <pre>
652    * Deprecated: Use
653    * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
654    * and
655    * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
656    * instead.
657    * </pre>
658    *
659    * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
660    */
661   @java.lang.Override
662   @java.lang.Deprecated
getCostsOrDefault(java.lang.String key, double defaultValue)663   public double getCostsOrDefault(java.lang.String key, double defaultValue) {
664     if (key == null) {
665       throw new NullPointerException("map key");
666     }
667     java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
668     return map.containsKey(key) ? map.get(key) : defaultValue;
669   }
670   /**
671    *
672    *
673    * <pre>
674    * Deprecated: Use
675    * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
676    * and
677    * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
678    * instead.
679    * </pre>
680    *
681    * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
682    */
683   @java.lang.Override
684   @java.lang.Deprecated
getCostsOrThrow(java.lang.String key)685   public double getCostsOrThrow(java.lang.String key) {
686     if (key == null) {
687       throw new NullPointerException("map key");
688     }
689     java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
690     if (!map.containsKey(key)) {
691       throw new java.lang.IllegalArgumentException();
692     }
693     return map.get(key);
694   }
695 
696   public static final int TOTAL_COST_FIELD_NUMBER = 11;
697   private double totalCost_ = 0D;
698   /**
699    *
700    *
701    * <pre>
702    * Deprecated: Use
703    * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost]
704    * and
705    * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
706    * instead.
707    * </pre>
708    *
709    * <code>double total_cost = 11 [deprecated = true];</code>
710    *
711    * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
712    *     google/cloud/optimization/v1/fleet_routing.proto;l=2331
713    * @return The totalCost.
714    */
715   @java.lang.Override
716   @java.lang.Deprecated
getTotalCost()717   public double getTotalCost() {
718     return totalCost_;
719   }
720 
721   private byte memoizedIsInitialized = -1;
722 
723   @java.lang.Override
isInitialized()724   public final boolean isInitialized() {
725     byte isInitialized = memoizedIsInitialized;
726     if (isInitialized == 1) return true;
727     if (isInitialized == 0) return false;
728 
729     memoizedIsInitialized = 1;
730     return true;
731   }
732 
733   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)734   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
735     if (performedShipmentCount_ != 0) {
736       output.writeInt32(1, performedShipmentCount_);
737     }
738     if (travelDuration_ != null) {
739       output.writeMessage(2, getTravelDuration());
740     }
741     if (waitDuration_ != null) {
742       output.writeMessage(3, getWaitDuration());
743     }
744     if (delayDuration_ != null) {
745       output.writeMessage(4, getDelayDuration());
746     }
747     if (breakDuration_ != null) {
748       output.writeMessage(5, getBreakDuration());
749     }
750     if (visitDuration_ != null) {
751       output.writeMessage(6, getVisitDuration());
752     }
753     if (totalDuration_ != null) {
754       output.writeMessage(7, getTotalDuration());
755     }
756     if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) {
757       output.writeDouble(8, travelDistanceMeters_);
758     }
759     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
760         output, internalGetMaxLoads(), MaxLoadsDefaultEntryHolder.defaultEntry, 9);
761     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
762         output, internalGetCosts(), CostsDefaultEntryHolder.defaultEntry, 10);
763     if (java.lang.Double.doubleToRawLongBits(totalCost_) != 0) {
764       output.writeDouble(11, totalCost_);
765     }
766     getUnknownFields().writeTo(output);
767   }
768 
769   @java.lang.Override
getSerializedSize()770   public int getSerializedSize() {
771     int size = memoizedSize;
772     if (size != -1) return size;
773 
774     size = 0;
775     if (performedShipmentCount_ != 0) {
776       size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, performedShipmentCount_);
777     }
778     if (travelDuration_ != null) {
779       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTravelDuration());
780     }
781     if (waitDuration_ != null) {
782       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getWaitDuration());
783     }
784     if (delayDuration_ != null) {
785       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDelayDuration());
786     }
787     if (breakDuration_ != null) {
788       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getBreakDuration());
789     }
790     if (visitDuration_ != null) {
791       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getVisitDuration());
792     }
793     if (totalDuration_ != null) {
794       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTotalDuration());
795     }
796     if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) {
797       size += com.google.protobuf.CodedOutputStream.computeDoubleSize(8, travelDistanceMeters_);
798     }
799     for (java.util.Map.Entry<
800             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
801         entry : internalGetMaxLoads().getMap().entrySet()) {
802       com.google.protobuf.MapEntry<
803               java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
804           maxLoads__ =
805               MaxLoadsDefaultEntryHolder.defaultEntry
806                   .newBuilderForType()
807                   .setKey(entry.getKey())
808                   .setValue(entry.getValue())
809                   .build();
810       size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, maxLoads__);
811     }
812     for (java.util.Map.Entry<java.lang.String, java.lang.Double> entry :
813         internalGetCosts().getMap().entrySet()) {
814       com.google.protobuf.MapEntry<java.lang.String, java.lang.Double> costs__ =
815           CostsDefaultEntryHolder.defaultEntry
816               .newBuilderForType()
817               .setKey(entry.getKey())
818               .setValue(entry.getValue())
819               .build();
820       size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, costs__);
821     }
822     if (java.lang.Double.doubleToRawLongBits(totalCost_) != 0) {
823       size += com.google.protobuf.CodedOutputStream.computeDoubleSize(11, totalCost_);
824     }
825     size += getUnknownFields().getSerializedSize();
826     memoizedSize = size;
827     return size;
828   }
829 
830   @java.lang.Override
equals(final java.lang.Object obj)831   public boolean equals(final java.lang.Object obj) {
832     if (obj == this) {
833       return true;
834     }
835     if (!(obj instanceof com.google.cloud.optimization.v1.AggregatedMetrics)) {
836       return super.equals(obj);
837     }
838     com.google.cloud.optimization.v1.AggregatedMetrics other =
839         (com.google.cloud.optimization.v1.AggregatedMetrics) obj;
840 
841     if (getPerformedShipmentCount() != other.getPerformedShipmentCount()) return false;
842     if (hasTravelDuration() != other.hasTravelDuration()) return false;
843     if (hasTravelDuration()) {
844       if (!getTravelDuration().equals(other.getTravelDuration())) return false;
845     }
846     if (hasWaitDuration() != other.hasWaitDuration()) return false;
847     if (hasWaitDuration()) {
848       if (!getWaitDuration().equals(other.getWaitDuration())) return false;
849     }
850     if (hasDelayDuration() != other.hasDelayDuration()) return false;
851     if (hasDelayDuration()) {
852       if (!getDelayDuration().equals(other.getDelayDuration())) return false;
853     }
854     if (hasBreakDuration() != other.hasBreakDuration()) return false;
855     if (hasBreakDuration()) {
856       if (!getBreakDuration().equals(other.getBreakDuration())) return false;
857     }
858     if (hasVisitDuration() != other.hasVisitDuration()) return false;
859     if (hasVisitDuration()) {
860       if (!getVisitDuration().equals(other.getVisitDuration())) return false;
861     }
862     if (hasTotalDuration() != other.hasTotalDuration()) return false;
863     if (hasTotalDuration()) {
864       if (!getTotalDuration().equals(other.getTotalDuration())) return false;
865     }
866     if (java.lang.Double.doubleToLongBits(getTravelDistanceMeters())
867         != java.lang.Double.doubleToLongBits(other.getTravelDistanceMeters())) return false;
868     if (!internalGetMaxLoads().equals(other.internalGetMaxLoads())) return false;
869     if (!internalGetCosts().equals(other.internalGetCosts())) return false;
870     if (java.lang.Double.doubleToLongBits(getTotalCost())
871         != java.lang.Double.doubleToLongBits(other.getTotalCost())) return false;
872     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
873     return true;
874   }
875 
876   @java.lang.Override
hashCode()877   public int hashCode() {
878     if (memoizedHashCode != 0) {
879       return memoizedHashCode;
880     }
881     int hash = 41;
882     hash = (19 * hash) + getDescriptor().hashCode();
883     hash = (37 * hash) + PERFORMED_SHIPMENT_COUNT_FIELD_NUMBER;
884     hash = (53 * hash) + getPerformedShipmentCount();
885     if (hasTravelDuration()) {
886       hash = (37 * hash) + TRAVEL_DURATION_FIELD_NUMBER;
887       hash = (53 * hash) + getTravelDuration().hashCode();
888     }
889     if (hasWaitDuration()) {
890       hash = (37 * hash) + WAIT_DURATION_FIELD_NUMBER;
891       hash = (53 * hash) + getWaitDuration().hashCode();
892     }
893     if (hasDelayDuration()) {
894       hash = (37 * hash) + DELAY_DURATION_FIELD_NUMBER;
895       hash = (53 * hash) + getDelayDuration().hashCode();
896     }
897     if (hasBreakDuration()) {
898       hash = (37 * hash) + BREAK_DURATION_FIELD_NUMBER;
899       hash = (53 * hash) + getBreakDuration().hashCode();
900     }
901     if (hasVisitDuration()) {
902       hash = (37 * hash) + VISIT_DURATION_FIELD_NUMBER;
903       hash = (53 * hash) + getVisitDuration().hashCode();
904     }
905     if (hasTotalDuration()) {
906       hash = (37 * hash) + TOTAL_DURATION_FIELD_NUMBER;
907       hash = (53 * hash) + getTotalDuration().hashCode();
908     }
909     hash = (37 * hash) + TRAVEL_DISTANCE_METERS_FIELD_NUMBER;
910     hash =
911         (53 * hash)
912             + com.google.protobuf.Internal.hashLong(
913                 java.lang.Double.doubleToLongBits(getTravelDistanceMeters()));
914     if (!internalGetMaxLoads().getMap().isEmpty()) {
915       hash = (37 * hash) + MAX_LOADS_FIELD_NUMBER;
916       hash = (53 * hash) + internalGetMaxLoads().hashCode();
917     }
918     if (!internalGetCosts().getMap().isEmpty()) {
919       hash = (37 * hash) + COSTS_FIELD_NUMBER;
920       hash = (53 * hash) + internalGetCosts().hashCode();
921     }
922     hash = (37 * hash) + TOTAL_COST_FIELD_NUMBER;
923     hash =
924         (53 * hash)
925             + com.google.protobuf.Internal.hashLong(
926                 java.lang.Double.doubleToLongBits(getTotalCost()));
927     hash = (29 * hash) + getUnknownFields().hashCode();
928     memoizedHashCode = hash;
929     return hash;
930   }
931 
parseFrom( java.nio.ByteBuffer data)932   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
933       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
934     return PARSER.parseFrom(data);
935   }
936 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)937   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
938       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
939       throws com.google.protobuf.InvalidProtocolBufferException {
940     return PARSER.parseFrom(data, extensionRegistry);
941   }
942 
parseFrom( com.google.protobuf.ByteString data)943   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
944       com.google.protobuf.ByteString data)
945       throws com.google.protobuf.InvalidProtocolBufferException {
946     return PARSER.parseFrom(data);
947   }
948 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)949   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
950       com.google.protobuf.ByteString data,
951       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
952       throws com.google.protobuf.InvalidProtocolBufferException {
953     return PARSER.parseFrom(data, extensionRegistry);
954   }
955 
parseFrom(byte[] data)956   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(byte[] data)
957       throws com.google.protobuf.InvalidProtocolBufferException {
958     return PARSER.parseFrom(data);
959   }
960 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)961   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
962       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
963       throws com.google.protobuf.InvalidProtocolBufferException {
964     return PARSER.parseFrom(data, extensionRegistry);
965   }
966 
parseFrom( java.io.InputStream input)967   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
968       java.io.InputStream input) throws java.io.IOException {
969     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
970   }
971 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)972   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
973       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
974       throws java.io.IOException {
975     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
976         PARSER, input, extensionRegistry);
977   }
978 
parseDelimitedFrom( java.io.InputStream input)979   public static com.google.cloud.optimization.v1.AggregatedMetrics parseDelimitedFrom(
980       java.io.InputStream input) throws java.io.IOException {
981     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
982   }
983 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)984   public static com.google.cloud.optimization.v1.AggregatedMetrics parseDelimitedFrom(
985       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
986       throws java.io.IOException {
987     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
988         PARSER, input, extensionRegistry);
989   }
990 
parseFrom( com.google.protobuf.CodedInputStream input)991   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
992       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
993     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
994   }
995 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)996   public static com.google.cloud.optimization.v1.AggregatedMetrics parseFrom(
997       com.google.protobuf.CodedInputStream input,
998       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
999       throws java.io.IOException {
1000     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1001         PARSER, input, extensionRegistry);
1002   }
1003 
1004   @java.lang.Override
newBuilderForType()1005   public Builder newBuilderForType() {
1006     return newBuilder();
1007   }
1008 
newBuilder()1009   public static Builder newBuilder() {
1010     return DEFAULT_INSTANCE.toBuilder();
1011   }
1012 
newBuilder(com.google.cloud.optimization.v1.AggregatedMetrics prototype)1013   public static Builder newBuilder(com.google.cloud.optimization.v1.AggregatedMetrics prototype) {
1014     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1015   }
1016 
1017   @java.lang.Override
toBuilder()1018   public Builder toBuilder() {
1019     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1020   }
1021 
1022   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1023   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1024     Builder builder = new Builder(parent);
1025     return builder;
1026   }
1027   /**
1028    *
1029    *
1030    * <pre>
1031    * Aggregated metrics for
1032    * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp. for
1033    * [OptimizeToursResponse][google.cloud.optimization.v1.OptimizeToursResponse]
1034    * over all [Transition][google.cloud.optimization.v1.ShipmentRoute.Transition]
1035    * and/or [Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] (resp. over
1036    * all [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]) elements.
1037    * </pre>
1038    *
1039    * Protobuf type {@code google.cloud.optimization.v1.AggregatedMetrics}
1040    */
1041   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1042       implements
1043       // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.AggregatedMetrics)
1044       com.google.cloud.optimization.v1.AggregatedMetricsOrBuilder {
getDescriptor()1045     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1046       return com.google.cloud.optimization.v1.FleetRoutingProto
1047           .internal_static_google_cloud_optimization_v1_AggregatedMetrics_descriptor;
1048     }
1049 
1050     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)1051     protected com.google.protobuf.MapField internalGetMapField(int number) {
1052       switch (number) {
1053         case 9:
1054           return internalGetMaxLoads();
1055         case 10:
1056           return internalGetCosts();
1057         default:
1058           throw new RuntimeException("Invalid map field number: " + number);
1059       }
1060     }
1061 
1062     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)1063     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1064       switch (number) {
1065         case 9:
1066           return internalGetMutableMaxLoads();
1067         case 10:
1068           return internalGetMutableCosts();
1069         default:
1070           throw new RuntimeException("Invalid map field number: " + number);
1071       }
1072     }
1073 
1074     @java.lang.Override
1075     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1076         internalGetFieldAccessorTable() {
1077       return com.google.cloud.optimization.v1.FleetRoutingProto
1078           .internal_static_google_cloud_optimization_v1_AggregatedMetrics_fieldAccessorTable
1079           .ensureFieldAccessorsInitialized(
1080               com.google.cloud.optimization.v1.AggregatedMetrics.class,
1081               com.google.cloud.optimization.v1.AggregatedMetrics.Builder.class);
1082     }
1083 
1084     // Construct using com.google.cloud.optimization.v1.AggregatedMetrics.newBuilder()
Builder()1085     private Builder() {}
1086 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1087     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1088       super(parent);
1089     }
1090 
1091     @java.lang.Override
clear()1092     public Builder clear() {
1093       super.clear();
1094       bitField0_ = 0;
1095       performedShipmentCount_ = 0;
1096       travelDuration_ = null;
1097       if (travelDurationBuilder_ != null) {
1098         travelDurationBuilder_.dispose();
1099         travelDurationBuilder_ = null;
1100       }
1101       waitDuration_ = null;
1102       if (waitDurationBuilder_ != null) {
1103         waitDurationBuilder_.dispose();
1104         waitDurationBuilder_ = null;
1105       }
1106       delayDuration_ = null;
1107       if (delayDurationBuilder_ != null) {
1108         delayDurationBuilder_.dispose();
1109         delayDurationBuilder_ = null;
1110       }
1111       breakDuration_ = null;
1112       if (breakDurationBuilder_ != null) {
1113         breakDurationBuilder_.dispose();
1114         breakDurationBuilder_ = null;
1115       }
1116       visitDuration_ = null;
1117       if (visitDurationBuilder_ != null) {
1118         visitDurationBuilder_.dispose();
1119         visitDurationBuilder_ = null;
1120       }
1121       totalDuration_ = null;
1122       if (totalDurationBuilder_ != null) {
1123         totalDurationBuilder_.dispose();
1124         totalDurationBuilder_ = null;
1125       }
1126       travelDistanceMeters_ = 0D;
1127       internalGetMutableMaxLoads().clear();
1128       internalGetMutableCosts().clear();
1129       totalCost_ = 0D;
1130       return this;
1131     }
1132 
1133     @java.lang.Override
getDescriptorForType()1134     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1135       return com.google.cloud.optimization.v1.FleetRoutingProto
1136           .internal_static_google_cloud_optimization_v1_AggregatedMetrics_descriptor;
1137     }
1138 
1139     @java.lang.Override
getDefaultInstanceForType()1140     public com.google.cloud.optimization.v1.AggregatedMetrics getDefaultInstanceForType() {
1141       return com.google.cloud.optimization.v1.AggregatedMetrics.getDefaultInstance();
1142     }
1143 
1144     @java.lang.Override
build()1145     public com.google.cloud.optimization.v1.AggregatedMetrics build() {
1146       com.google.cloud.optimization.v1.AggregatedMetrics result = buildPartial();
1147       if (!result.isInitialized()) {
1148         throw newUninitializedMessageException(result);
1149       }
1150       return result;
1151     }
1152 
1153     @java.lang.Override
buildPartial()1154     public com.google.cloud.optimization.v1.AggregatedMetrics buildPartial() {
1155       com.google.cloud.optimization.v1.AggregatedMetrics result =
1156           new com.google.cloud.optimization.v1.AggregatedMetrics(this);
1157       if (bitField0_ != 0) {
1158         buildPartial0(result);
1159       }
1160       onBuilt();
1161       return result;
1162     }
1163 
buildPartial0(com.google.cloud.optimization.v1.AggregatedMetrics result)1164     private void buildPartial0(com.google.cloud.optimization.v1.AggregatedMetrics result) {
1165       int from_bitField0_ = bitField0_;
1166       if (((from_bitField0_ & 0x00000001) != 0)) {
1167         result.performedShipmentCount_ = performedShipmentCount_;
1168       }
1169       if (((from_bitField0_ & 0x00000002) != 0)) {
1170         result.travelDuration_ =
1171             travelDurationBuilder_ == null ? travelDuration_ : travelDurationBuilder_.build();
1172       }
1173       if (((from_bitField0_ & 0x00000004) != 0)) {
1174         result.waitDuration_ =
1175             waitDurationBuilder_ == null ? waitDuration_ : waitDurationBuilder_.build();
1176       }
1177       if (((from_bitField0_ & 0x00000008) != 0)) {
1178         result.delayDuration_ =
1179             delayDurationBuilder_ == null ? delayDuration_ : delayDurationBuilder_.build();
1180       }
1181       if (((from_bitField0_ & 0x00000010) != 0)) {
1182         result.breakDuration_ =
1183             breakDurationBuilder_ == null ? breakDuration_ : breakDurationBuilder_.build();
1184       }
1185       if (((from_bitField0_ & 0x00000020) != 0)) {
1186         result.visitDuration_ =
1187             visitDurationBuilder_ == null ? visitDuration_ : visitDurationBuilder_.build();
1188       }
1189       if (((from_bitField0_ & 0x00000040) != 0)) {
1190         result.totalDuration_ =
1191             totalDurationBuilder_ == null ? totalDuration_ : totalDurationBuilder_.build();
1192       }
1193       if (((from_bitField0_ & 0x00000080) != 0)) {
1194         result.travelDistanceMeters_ = travelDistanceMeters_;
1195       }
1196       if (((from_bitField0_ & 0x00000100) != 0)) {
1197         result.maxLoads_ = internalGetMaxLoads();
1198         result.maxLoads_.makeImmutable();
1199       }
1200       if (((from_bitField0_ & 0x00000200) != 0)) {
1201         result.costs_ = internalGetCosts();
1202         result.costs_.makeImmutable();
1203       }
1204       if (((from_bitField0_ & 0x00000400) != 0)) {
1205         result.totalCost_ = totalCost_;
1206       }
1207     }
1208 
1209     @java.lang.Override
clone()1210     public Builder clone() {
1211       return super.clone();
1212     }
1213 
1214     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1215     public Builder setField(
1216         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1217       return super.setField(field, value);
1218     }
1219 
1220     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1221     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1222       return super.clearField(field);
1223     }
1224 
1225     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1226     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1227       return super.clearOneof(oneof);
1228     }
1229 
1230     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1231     public Builder setRepeatedField(
1232         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1233       return super.setRepeatedField(field, index, value);
1234     }
1235 
1236     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1237     public Builder addRepeatedField(
1238         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1239       return super.addRepeatedField(field, value);
1240     }
1241 
1242     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1243     public Builder mergeFrom(com.google.protobuf.Message other) {
1244       if (other instanceof com.google.cloud.optimization.v1.AggregatedMetrics) {
1245         return mergeFrom((com.google.cloud.optimization.v1.AggregatedMetrics) other);
1246       } else {
1247         super.mergeFrom(other);
1248         return this;
1249       }
1250     }
1251 
mergeFrom(com.google.cloud.optimization.v1.AggregatedMetrics other)1252     public Builder mergeFrom(com.google.cloud.optimization.v1.AggregatedMetrics other) {
1253       if (other == com.google.cloud.optimization.v1.AggregatedMetrics.getDefaultInstance())
1254         return this;
1255       if (other.getPerformedShipmentCount() != 0) {
1256         setPerformedShipmentCount(other.getPerformedShipmentCount());
1257       }
1258       if (other.hasTravelDuration()) {
1259         mergeTravelDuration(other.getTravelDuration());
1260       }
1261       if (other.hasWaitDuration()) {
1262         mergeWaitDuration(other.getWaitDuration());
1263       }
1264       if (other.hasDelayDuration()) {
1265         mergeDelayDuration(other.getDelayDuration());
1266       }
1267       if (other.hasBreakDuration()) {
1268         mergeBreakDuration(other.getBreakDuration());
1269       }
1270       if (other.hasVisitDuration()) {
1271         mergeVisitDuration(other.getVisitDuration());
1272       }
1273       if (other.hasTotalDuration()) {
1274         mergeTotalDuration(other.getTotalDuration());
1275       }
1276       if (other.getTravelDistanceMeters() != 0D) {
1277         setTravelDistanceMeters(other.getTravelDistanceMeters());
1278       }
1279       internalGetMutableMaxLoads().mergeFrom(other.internalGetMaxLoads());
1280       bitField0_ |= 0x00000100;
1281       internalGetMutableCosts().mergeFrom(other.internalGetCosts());
1282       bitField0_ |= 0x00000200;
1283       if (other.getTotalCost() != 0D) {
1284         setTotalCost(other.getTotalCost());
1285       }
1286       this.mergeUnknownFields(other.getUnknownFields());
1287       onChanged();
1288       return this;
1289     }
1290 
1291     @java.lang.Override
isInitialized()1292     public final boolean isInitialized() {
1293       return true;
1294     }
1295 
1296     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1297     public Builder mergeFrom(
1298         com.google.protobuf.CodedInputStream input,
1299         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1300         throws java.io.IOException {
1301       if (extensionRegistry == null) {
1302         throw new java.lang.NullPointerException();
1303       }
1304       try {
1305         boolean done = false;
1306         while (!done) {
1307           int tag = input.readTag();
1308           switch (tag) {
1309             case 0:
1310               done = true;
1311               break;
1312             case 8:
1313               {
1314                 performedShipmentCount_ = input.readInt32();
1315                 bitField0_ |= 0x00000001;
1316                 break;
1317               } // case 8
1318             case 18:
1319               {
1320                 input.readMessage(getTravelDurationFieldBuilder().getBuilder(), extensionRegistry);
1321                 bitField0_ |= 0x00000002;
1322                 break;
1323               } // case 18
1324             case 26:
1325               {
1326                 input.readMessage(getWaitDurationFieldBuilder().getBuilder(), extensionRegistry);
1327                 bitField0_ |= 0x00000004;
1328                 break;
1329               } // case 26
1330             case 34:
1331               {
1332                 input.readMessage(getDelayDurationFieldBuilder().getBuilder(), extensionRegistry);
1333                 bitField0_ |= 0x00000008;
1334                 break;
1335               } // case 34
1336             case 42:
1337               {
1338                 input.readMessage(getBreakDurationFieldBuilder().getBuilder(), extensionRegistry);
1339                 bitField0_ |= 0x00000010;
1340                 break;
1341               } // case 42
1342             case 50:
1343               {
1344                 input.readMessage(getVisitDurationFieldBuilder().getBuilder(), extensionRegistry);
1345                 bitField0_ |= 0x00000020;
1346                 break;
1347               } // case 50
1348             case 58:
1349               {
1350                 input.readMessage(getTotalDurationFieldBuilder().getBuilder(), extensionRegistry);
1351                 bitField0_ |= 0x00000040;
1352                 break;
1353               } // case 58
1354             case 65:
1355               {
1356                 travelDistanceMeters_ = input.readDouble();
1357                 bitField0_ |= 0x00000080;
1358                 break;
1359               } // case 65
1360             case 74:
1361               {
1362                 com.google.protobuf.MapEntry<
1363                         java.lang.String,
1364                         com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
1365                     maxLoads__ =
1366                         input.readMessage(
1367                             MaxLoadsDefaultEntryHolder.defaultEntry.getParserForType(),
1368                             extensionRegistry);
1369                 internalGetMutableMaxLoads()
1370                     .getMutableMap()
1371                     .put(maxLoads__.getKey(), maxLoads__.getValue());
1372                 bitField0_ |= 0x00000100;
1373                 break;
1374               } // case 74
1375             case 82:
1376               {
1377                 com.google.protobuf.MapEntry<java.lang.String, java.lang.Double> costs__ =
1378                     input.readMessage(
1379                         CostsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
1380                 internalGetMutableCosts().getMutableMap().put(costs__.getKey(), costs__.getValue());
1381                 bitField0_ |= 0x00000200;
1382                 break;
1383               } // case 82
1384             case 89:
1385               {
1386                 totalCost_ = input.readDouble();
1387                 bitField0_ |= 0x00000400;
1388                 break;
1389               } // case 89
1390             default:
1391               {
1392                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1393                   done = true; // was an endgroup tag
1394                 }
1395                 break;
1396               } // default:
1397           } // switch (tag)
1398         } // while (!done)
1399       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1400         throw e.unwrapIOException();
1401       } finally {
1402         onChanged();
1403       } // finally
1404       return this;
1405     }
1406 
1407     private int bitField0_;
1408 
1409     private int performedShipmentCount_;
1410     /**
1411      *
1412      *
1413      * <pre>
1414      * Number of shipments performed. Note that a pickup and delivery pair only
1415      * counts once.
1416      * </pre>
1417      *
1418      * <code>int32 performed_shipment_count = 1;</code>
1419      *
1420      * @return The performedShipmentCount.
1421      */
1422     @java.lang.Override
getPerformedShipmentCount()1423     public int getPerformedShipmentCount() {
1424       return performedShipmentCount_;
1425     }
1426     /**
1427      *
1428      *
1429      * <pre>
1430      * Number of shipments performed. Note that a pickup and delivery pair only
1431      * counts once.
1432      * </pre>
1433      *
1434      * <code>int32 performed_shipment_count = 1;</code>
1435      *
1436      * @param value The performedShipmentCount to set.
1437      * @return This builder for chaining.
1438      */
setPerformedShipmentCount(int value)1439     public Builder setPerformedShipmentCount(int value) {
1440 
1441       performedShipmentCount_ = value;
1442       bitField0_ |= 0x00000001;
1443       onChanged();
1444       return this;
1445     }
1446     /**
1447      *
1448      *
1449      * <pre>
1450      * Number of shipments performed. Note that a pickup and delivery pair only
1451      * counts once.
1452      * </pre>
1453      *
1454      * <code>int32 performed_shipment_count = 1;</code>
1455      *
1456      * @return This builder for chaining.
1457      */
clearPerformedShipmentCount()1458     public Builder clearPerformedShipmentCount() {
1459       bitField0_ = (bitField0_ & ~0x00000001);
1460       performedShipmentCount_ = 0;
1461       onChanged();
1462       return this;
1463     }
1464 
1465     private com.google.protobuf.Duration travelDuration_;
1466     private com.google.protobuf.SingleFieldBuilderV3<
1467             com.google.protobuf.Duration,
1468             com.google.protobuf.Duration.Builder,
1469             com.google.protobuf.DurationOrBuilder>
1470         travelDurationBuilder_;
1471     /**
1472      *
1473      *
1474      * <pre>
1475      * Total travel duration for a route or a solution.
1476      * </pre>
1477      *
1478      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1479      *
1480      * @return Whether the travelDuration field is set.
1481      */
hasTravelDuration()1482     public boolean hasTravelDuration() {
1483       return ((bitField0_ & 0x00000002) != 0);
1484     }
1485     /**
1486      *
1487      *
1488      * <pre>
1489      * Total travel duration for a route or a solution.
1490      * </pre>
1491      *
1492      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1493      *
1494      * @return The travelDuration.
1495      */
getTravelDuration()1496     public com.google.protobuf.Duration getTravelDuration() {
1497       if (travelDurationBuilder_ == null) {
1498         return travelDuration_ == null
1499             ? com.google.protobuf.Duration.getDefaultInstance()
1500             : travelDuration_;
1501       } else {
1502         return travelDurationBuilder_.getMessage();
1503       }
1504     }
1505     /**
1506      *
1507      *
1508      * <pre>
1509      * Total travel duration for a route or a solution.
1510      * </pre>
1511      *
1512      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1513      */
setTravelDuration(com.google.protobuf.Duration value)1514     public Builder setTravelDuration(com.google.protobuf.Duration value) {
1515       if (travelDurationBuilder_ == null) {
1516         if (value == null) {
1517           throw new NullPointerException();
1518         }
1519         travelDuration_ = value;
1520       } else {
1521         travelDurationBuilder_.setMessage(value);
1522       }
1523       bitField0_ |= 0x00000002;
1524       onChanged();
1525       return this;
1526     }
1527     /**
1528      *
1529      *
1530      * <pre>
1531      * Total travel duration for a route or a solution.
1532      * </pre>
1533      *
1534      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1535      */
setTravelDuration(com.google.protobuf.Duration.Builder builderForValue)1536     public Builder setTravelDuration(com.google.protobuf.Duration.Builder builderForValue) {
1537       if (travelDurationBuilder_ == null) {
1538         travelDuration_ = builderForValue.build();
1539       } else {
1540         travelDurationBuilder_.setMessage(builderForValue.build());
1541       }
1542       bitField0_ |= 0x00000002;
1543       onChanged();
1544       return this;
1545     }
1546     /**
1547      *
1548      *
1549      * <pre>
1550      * Total travel duration for a route or a solution.
1551      * </pre>
1552      *
1553      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1554      */
mergeTravelDuration(com.google.protobuf.Duration value)1555     public Builder mergeTravelDuration(com.google.protobuf.Duration value) {
1556       if (travelDurationBuilder_ == null) {
1557         if (((bitField0_ & 0x00000002) != 0)
1558             && travelDuration_ != null
1559             && travelDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
1560           getTravelDurationBuilder().mergeFrom(value);
1561         } else {
1562           travelDuration_ = value;
1563         }
1564       } else {
1565         travelDurationBuilder_.mergeFrom(value);
1566       }
1567       bitField0_ |= 0x00000002;
1568       onChanged();
1569       return this;
1570     }
1571     /**
1572      *
1573      *
1574      * <pre>
1575      * Total travel duration for a route or a solution.
1576      * </pre>
1577      *
1578      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1579      */
clearTravelDuration()1580     public Builder clearTravelDuration() {
1581       bitField0_ = (bitField0_ & ~0x00000002);
1582       travelDuration_ = null;
1583       if (travelDurationBuilder_ != null) {
1584         travelDurationBuilder_.dispose();
1585         travelDurationBuilder_ = null;
1586       }
1587       onChanged();
1588       return this;
1589     }
1590     /**
1591      *
1592      *
1593      * <pre>
1594      * Total travel duration for a route or a solution.
1595      * </pre>
1596      *
1597      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1598      */
getTravelDurationBuilder()1599     public com.google.protobuf.Duration.Builder getTravelDurationBuilder() {
1600       bitField0_ |= 0x00000002;
1601       onChanged();
1602       return getTravelDurationFieldBuilder().getBuilder();
1603     }
1604     /**
1605      *
1606      *
1607      * <pre>
1608      * Total travel duration for a route or a solution.
1609      * </pre>
1610      *
1611      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1612      */
getTravelDurationOrBuilder()1613     public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() {
1614       if (travelDurationBuilder_ != null) {
1615         return travelDurationBuilder_.getMessageOrBuilder();
1616       } else {
1617         return travelDuration_ == null
1618             ? com.google.protobuf.Duration.getDefaultInstance()
1619             : travelDuration_;
1620       }
1621     }
1622     /**
1623      *
1624      *
1625      * <pre>
1626      * Total travel duration for a route or a solution.
1627      * </pre>
1628      *
1629      * <code>.google.protobuf.Duration travel_duration = 2;</code>
1630      */
1631     private com.google.protobuf.SingleFieldBuilderV3<
1632             com.google.protobuf.Duration,
1633             com.google.protobuf.Duration.Builder,
1634             com.google.protobuf.DurationOrBuilder>
getTravelDurationFieldBuilder()1635         getTravelDurationFieldBuilder() {
1636       if (travelDurationBuilder_ == null) {
1637         travelDurationBuilder_ =
1638             new com.google.protobuf.SingleFieldBuilderV3<
1639                 com.google.protobuf.Duration,
1640                 com.google.protobuf.Duration.Builder,
1641                 com.google.protobuf.DurationOrBuilder>(
1642                 getTravelDuration(), getParentForChildren(), isClean());
1643         travelDuration_ = null;
1644       }
1645       return travelDurationBuilder_;
1646     }
1647 
1648     private com.google.protobuf.Duration waitDuration_;
1649     private com.google.protobuf.SingleFieldBuilderV3<
1650             com.google.protobuf.Duration,
1651             com.google.protobuf.Duration.Builder,
1652             com.google.protobuf.DurationOrBuilder>
1653         waitDurationBuilder_;
1654     /**
1655      *
1656      *
1657      * <pre>
1658      * Total wait duration for a route or a solution.
1659      * </pre>
1660      *
1661      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1662      *
1663      * @return Whether the waitDuration field is set.
1664      */
hasWaitDuration()1665     public boolean hasWaitDuration() {
1666       return ((bitField0_ & 0x00000004) != 0);
1667     }
1668     /**
1669      *
1670      *
1671      * <pre>
1672      * Total wait duration for a route or a solution.
1673      * </pre>
1674      *
1675      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1676      *
1677      * @return The waitDuration.
1678      */
getWaitDuration()1679     public com.google.protobuf.Duration getWaitDuration() {
1680       if (waitDurationBuilder_ == null) {
1681         return waitDuration_ == null
1682             ? com.google.protobuf.Duration.getDefaultInstance()
1683             : waitDuration_;
1684       } else {
1685         return waitDurationBuilder_.getMessage();
1686       }
1687     }
1688     /**
1689      *
1690      *
1691      * <pre>
1692      * Total wait duration for a route or a solution.
1693      * </pre>
1694      *
1695      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1696      */
setWaitDuration(com.google.protobuf.Duration value)1697     public Builder setWaitDuration(com.google.protobuf.Duration value) {
1698       if (waitDurationBuilder_ == null) {
1699         if (value == null) {
1700           throw new NullPointerException();
1701         }
1702         waitDuration_ = value;
1703       } else {
1704         waitDurationBuilder_.setMessage(value);
1705       }
1706       bitField0_ |= 0x00000004;
1707       onChanged();
1708       return this;
1709     }
1710     /**
1711      *
1712      *
1713      * <pre>
1714      * Total wait duration for a route or a solution.
1715      * </pre>
1716      *
1717      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1718      */
setWaitDuration(com.google.protobuf.Duration.Builder builderForValue)1719     public Builder setWaitDuration(com.google.protobuf.Duration.Builder builderForValue) {
1720       if (waitDurationBuilder_ == null) {
1721         waitDuration_ = builderForValue.build();
1722       } else {
1723         waitDurationBuilder_.setMessage(builderForValue.build());
1724       }
1725       bitField0_ |= 0x00000004;
1726       onChanged();
1727       return this;
1728     }
1729     /**
1730      *
1731      *
1732      * <pre>
1733      * Total wait duration for a route or a solution.
1734      * </pre>
1735      *
1736      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1737      */
mergeWaitDuration(com.google.protobuf.Duration value)1738     public Builder mergeWaitDuration(com.google.protobuf.Duration value) {
1739       if (waitDurationBuilder_ == null) {
1740         if (((bitField0_ & 0x00000004) != 0)
1741             && waitDuration_ != null
1742             && waitDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
1743           getWaitDurationBuilder().mergeFrom(value);
1744         } else {
1745           waitDuration_ = value;
1746         }
1747       } else {
1748         waitDurationBuilder_.mergeFrom(value);
1749       }
1750       bitField0_ |= 0x00000004;
1751       onChanged();
1752       return this;
1753     }
1754     /**
1755      *
1756      *
1757      * <pre>
1758      * Total wait duration for a route or a solution.
1759      * </pre>
1760      *
1761      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1762      */
clearWaitDuration()1763     public Builder clearWaitDuration() {
1764       bitField0_ = (bitField0_ & ~0x00000004);
1765       waitDuration_ = null;
1766       if (waitDurationBuilder_ != null) {
1767         waitDurationBuilder_.dispose();
1768         waitDurationBuilder_ = null;
1769       }
1770       onChanged();
1771       return this;
1772     }
1773     /**
1774      *
1775      *
1776      * <pre>
1777      * Total wait duration for a route or a solution.
1778      * </pre>
1779      *
1780      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1781      */
getWaitDurationBuilder()1782     public com.google.protobuf.Duration.Builder getWaitDurationBuilder() {
1783       bitField0_ |= 0x00000004;
1784       onChanged();
1785       return getWaitDurationFieldBuilder().getBuilder();
1786     }
1787     /**
1788      *
1789      *
1790      * <pre>
1791      * Total wait duration for a route or a solution.
1792      * </pre>
1793      *
1794      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1795      */
getWaitDurationOrBuilder()1796     public com.google.protobuf.DurationOrBuilder getWaitDurationOrBuilder() {
1797       if (waitDurationBuilder_ != null) {
1798         return waitDurationBuilder_.getMessageOrBuilder();
1799       } else {
1800         return waitDuration_ == null
1801             ? com.google.protobuf.Duration.getDefaultInstance()
1802             : waitDuration_;
1803       }
1804     }
1805     /**
1806      *
1807      *
1808      * <pre>
1809      * Total wait duration for a route or a solution.
1810      * </pre>
1811      *
1812      * <code>.google.protobuf.Duration wait_duration = 3;</code>
1813      */
1814     private com.google.protobuf.SingleFieldBuilderV3<
1815             com.google.protobuf.Duration,
1816             com.google.protobuf.Duration.Builder,
1817             com.google.protobuf.DurationOrBuilder>
getWaitDurationFieldBuilder()1818         getWaitDurationFieldBuilder() {
1819       if (waitDurationBuilder_ == null) {
1820         waitDurationBuilder_ =
1821             new com.google.protobuf.SingleFieldBuilderV3<
1822                 com.google.protobuf.Duration,
1823                 com.google.protobuf.Duration.Builder,
1824                 com.google.protobuf.DurationOrBuilder>(
1825                 getWaitDuration(), getParentForChildren(), isClean());
1826         waitDuration_ = null;
1827       }
1828       return waitDurationBuilder_;
1829     }
1830 
1831     private com.google.protobuf.Duration delayDuration_;
1832     private com.google.protobuf.SingleFieldBuilderV3<
1833             com.google.protobuf.Duration,
1834             com.google.protobuf.Duration.Builder,
1835             com.google.protobuf.DurationOrBuilder>
1836         delayDurationBuilder_;
1837     /**
1838      *
1839      *
1840      * <pre>
1841      * Total delay duration for a route or a solution.
1842      * </pre>
1843      *
1844      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1845      *
1846      * @return Whether the delayDuration field is set.
1847      */
hasDelayDuration()1848     public boolean hasDelayDuration() {
1849       return ((bitField0_ & 0x00000008) != 0);
1850     }
1851     /**
1852      *
1853      *
1854      * <pre>
1855      * Total delay duration for a route or a solution.
1856      * </pre>
1857      *
1858      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1859      *
1860      * @return The delayDuration.
1861      */
getDelayDuration()1862     public com.google.protobuf.Duration getDelayDuration() {
1863       if (delayDurationBuilder_ == null) {
1864         return delayDuration_ == null
1865             ? com.google.protobuf.Duration.getDefaultInstance()
1866             : delayDuration_;
1867       } else {
1868         return delayDurationBuilder_.getMessage();
1869       }
1870     }
1871     /**
1872      *
1873      *
1874      * <pre>
1875      * Total delay duration for a route or a solution.
1876      * </pre>
1877      *
1878      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1879      */
setDelayDuration(com.google.protobuf.Duration value)1880     public Builder setDelayDuration(com.google.protobuf.Duration value) {
1881       if (delayDurationBuilder_ == null) {
1882         if (value == null) {
1883           throw new NullPointerException();
1884         }
1885         delayDuration_ = value;
1886       } else {
1887         delayDurationBuilder_.setMessage(value);
1888       }
1889       bitField0_ |= 0x00000008;
1890       onChanged();
1891       return this;
1892     }
1893     /**
1894      *
1895      *
1896      * <pre>
1897      * Total delay duration for a route or a solution.
1898      * </pre>
1899      *
1900      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1901      */
setDelayDuration(com.google.protobuf.Duration.Builder builderForValue)1902     public Builder setDelayDuration(com.google.protobuf.Duration.Builder builderForValue) {
1903       if (delayDurationBuilder_ == null) {
1904         delayDuration_ = builderForValue.build();
1905       } else {
1906         delayDurationBuilder_.setMessage(builderForValue.build());
1907       }
1908       bitField0_ |= 0x00000008;
1909       onChanged();
1910       return this;
1911     }
1912     /**
1913      *
1914      *
1915      * <pre>
1916      * Total delay duration for a route or a solution.
1917      * </pre>
1918      *
1919      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1920      */
mergeDelayDuration(com.google.protobuf.Duration value)1921     public Builder mergeDelayDuration(com.google.protobuf.Duration value) {
1922       if (delayDurationBuilder_ == null) {
1923         if (((bitField0_ & 0x00000008) != 0)
1924             && delayDuration_ != null
1925             && delayDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
1926           getDelayDurationBuilder().mergeFrom(value);
1927         } else {
1928           delayDuration_ = value;
1929         }
1930       } else {
1931         delayDurationBuilder_.mergeFrom(value);
1932       }
1933       bitField0_ |= 0x00000008;
1934       onChanged();
1935       return this;
1936     }
1937     /**
1938      *
1939      *
1940      * <pre>
1941      * Total delay duration for a route or a solution.
1942      * </pre>
1943      *
1944      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1945      */
clearDelayDuration()1946     public Builder clearDelayDuration() {
1947       bitField0_ = (bitField0_ & ~0x00000008);
1948       delayDuration_ = null;
1949       if (delayDurationBuilder_ != null) {
1950         delayDurationBuilder_.dispose();
1951         delayDurationBuilder_ = null;
1952       }
1953       onChanged();
1954       return this;
1955     }
1956     /**
1957      *
1958      *
1959      * <pre>
1960      * Total delay duration for a route or a solution.
1961      * </pre>
1962      *
1963      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1964      */
getDelayDurationBuilder()1965     public com.google.protobuf.Duration.Builder getDelayDurationBuilder() {
1966       bitField0_ |= 0x00000008;
1967       onChanged();
1968       return getDelayDurationFieldBuilder().getBuilder();
1969     }
1970     /**
1971      *
1972      *
1973      * <pre>
1974      * Total delay duration for a route or a solution.
1975      * </pre>
1976      *
1977      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1978      */
getDelayDurationOrBuilder()1979     public com.google.protobuf.DurationOrBuilder getDelayDurationOrBuilder() {
1980       if (delayDurationBuilder_ != null) {
1981         return delayDurationBuilder_.getMessageOrBuilder();
1982       } else {
1983         return delayDuration_ == null
1984             ? com.google.protobuf.Duration.getDefaultInstance()
1985             : delayDuration_;
1986       }
1987     }
1988     /**
1989      *
1990      *
1991      * <pre>
1992      * Total delay duration for a route or a solution.
1993      * </pre>
1994      *
1995      * <code>.google.protobuf.Duration delay_duration = 4;</code>
1996      */
1997     private com.google.protobuf.SingleFieldBuilderV3<
1998             com.google.protobuf.Duration,
1999             com.google.protobuf.Duration.Builder,
2000             com.google.protobuf.DurationOrBuilder>
getDelayDurationFieldBuilder()2001         getDelayDurationFieldBuilder() {
2002       if (delayDurationBuilder_ == null) {
2003         delayDurationBuilder_ =
2004             new com.google.protobuf.SingleFieldBuilderV3<
2005                 com.google.protobuf.Duration,
2006                 com.google.protobuf.Duration.Builder,
2007                 com.google.protobuf.DurationOrBuilder>(
2008                 getDelayDuration(), getParentForChildren(), isClean());
2009         delayDuration_ = null;
2010       }
2011       return delayDurationBuilder_;
2012     }
2013 
2014     private com.google.protobuf.Duration breakDuration_;
2015     private com.google.protobuf.SingleFieldBuilderV3<
2016             com.google.protobuf.Duration,
2017             com.google.protobuf.Duration.Builder,
2018             com.google.protobuf.DurationOrBuilder>
2019         breakDurationBuilder_;
2020     /**
2021      *
2022      *
2023      * <pre>
2024      * Total break duration for a route or a solution.
2025      * </pre>
2026      *
2027      * <code>.google.protobuf.Duration break_duration = 5;</code>
2028      *
2029      * @return Whether the breakDuration field is set.
2030      */
hasBreakDuration()2031     public boolean hasBreakDuration() {
2032       return ((bitField0_ & 0x00000010) != 0);
2033     }
2034     /**
2035      *
2036      *
2037      * <pre>
2038      * Total break duration for a route or a solution.
2039      * </pre>
2040      *
2041      * <code>.google.protobuf.Duration break_duration = 5;</code>
2042      *
2043      * @return The breakDuration.
2044      */
getBreakDuration()2045     public com.google.protobuf.Duration getBreakDuration() {
2046       if (breakDurationBuilder_ == null) {
2047         return breakDuration_ == null
2048             ? com.google.protobuf.Duration.getDefaultInstance()
2049             : breakDuration_;
2050       } else {
2051         return breakDurationBuilder_.getMessage();
2052       }
2053     }
2054     /**
2055      *
2056      *
2057      * <pre>
2058      * Total break duration for a route or a solution.
2059      * </pre>
2060      *
2061      * <code>.google.protobuf.Duration break_duration = 5;</code>
2062      */
setBreakDuration(com.google.protobuf.Duration value)2063     public Builder setBreakDuration(com.google.protobuf.Duration value) {
2064       if (breakDurationBuilder_ == null) {
2065         if (value == null) {
2066           throw new NullPointerException();
2067         }
2068         breakDuration_ = value;
2069       } else {
2070         breakDurationBuilder_.setMessage(value);
2071       }
2072       bitField0_ |= 0x00000010;
2073       onChanged();
2074       return this;
2075     }
2076     /**
2077      *
2078      *
2079      * <pre>
2080      * Total break duration for a route or a solution.
2081      * </pre>
2082      *
2083      * <code>.google.protobuf.Duration break_duration = 5;</code>
2084      */
setBreakDuration(com.google.protobuf.Duration.Builder builderForValue)2085     public Builder setBreakDuration(com.google.protobuf.Duration.Builder builderForValue) {
2086       if (breakDurationBuilder_ == null) {
2087         breakDuration_ = builderForValue.build();
2088       } else {
2089         breakDurationBuilder_.setMessage(builderForValue.build());
2090       }
2091       bitField0_ |= 0x00000010;
2092       onChanged();
2093       return this;
2094     }
2095     /**
2096      *
2097      *
2098      * <pre>
2099      * Total break duration for a route or a solution.
2100      * </pre>
2101      *
2102      * <code>.google.protobuf.Duration break_duration = 5;</code>
2103      */
mergeBreakDuration(com.google.protobuf.Duration value)2104     public Builder mergeBreakDuration(com.google.protobuf.Duration value) {
2105       if (breakDurationBuilder_ == null) {
2106         if (((bitField0_ & 0x00000010) != 0)
2107             && breakDuration_ != null
2108             && breakDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
2109           getBreakDurationBuilder().mergeFrom(value);
2110         } else {
2111           breakDuration_ = value;
2112         }
2113       } else {
2114         breakDurationBuilder_.mergeFrom(value);
2115       }
2116       bitField0_ |= 0x00000010;
2117       onChanged();
2118       return this;
2119     }
2120     /**
2121      *
2122      *
2123      * <pre>
2124      * Total break duration for a route or a solution.
2125      * </pre>
2126      *
2127      * <code>.google.protobuf.Duration break_duration = 5;</code>
2128      */
clearBreakDuration()2129     public Builder clearBreakDuration() {
2130       bitField0_ = (bitField0_ & ~0x00000010);
2131       breakDuration_ = null;
2132       if (breakDurationBuilder_ != null) {
2133         breakDurationBuilder_.dispose();
2134         breakDurationBuilder_ = null;
2135       }
2136       onChanged();
2137       return this;
2138     }
2139     /**
2140      *
2141      *
2142      * <pre>
2143      * Total break duration for a route or a solution.
2144      * </pre>
2145      *
2146      * <code>.google.protobuf.Duration break_duration = 5;</code>
2147      */
getBreakDurationBuilder()2148     public com.google.protobuf.Duration.Builder getBreakDurationBuilder() {
2149       bitField0_ |= 0x00000010;
2150       onChanged();
2151       return getBreakDurationFieldBuilder().getBuilder();
2152     }
2153     /**
2154      *
2155      *
2156      * <pre>
2157      * Total break duration for a route or a solution.
2158      * </pre>
2159      *
2160      * <code>.google.protobuf.Duration break_duration = 5;</code>
2161      */
getBreakDurationOrBuilder()2162     public com.google.protobuf.DurationOrBuilder getBreakDurationOrBuilder() {
2163       if (breakDurationBuilder_ != null) {
2164         return breakDurationBuilder_.getMessageOrBuilder();
2165       } else {
2166         return breakDuration_ == null
2167             ? com.google.protobuf.Duration.getDefaultInstance()
2168             : breakDuration_;
2169       }
2170     }
2171     /**
2172      *
2173      *
2174      * <pre>
2175      * Total break duration for a route or a solution.
2176      * </pre>
2177      *
2178      * <code>.google.protobuf.Duration break_duration = 5;</code>
2179      */
2180     private com.google.protobuf.SingleFieldBuilderV3<
2181             com.google.protobuf.Duration,
2182             com.google.protobuf.Duration.Builder,
2183             com.google.protobuf.DurationOrBuilder>
getBreakDurationFieldBuilder()2184         getBreakDurationFieldBuilder() {
2185       if (breakDurationBuilder_ == null) {
2186         breakDurationBuilder_ =
2187             new com.google.protobuf.SingleFieldBuilderV3<
2188                 com.google.protobuf.Duration,
2189                 com.google.protobuf.Duration.Builder,
2190                 com.google.protobuf.DurationOrBuilder>(
2191                 getBreakDuration(), getParentForChildren(), isClean());
2192         breakDuration_ = null;
2193       }
2194       return breakDurationBuilder_;
2195     }
2196 
2197     private com.google.protobuf.Duration visitDuration_;
2198     private com.google.protobuf.SingleFieldBuilderV3<
2199             com.google.protobuf.Duration,
2200             com.google.protobuf.Duration.Builder,
2201             com.google.protobuf.DurationOrBuilder>
2202         visitDurationBuilder_;
2203     /**
2204      *
2205      *
2206      * <pre>
2207      * Total visit duration for a route or a solution.
2208      * </pre>
2209      *
2210      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2211      *
2212      * @return Whether the visitDuration field is set.
2213      */
hasVisitDuration()2214     public boolean hasVisitDuration() {
2215       return ((bitField0_ & 0x00000020) != 0);
2216     }
2217     /**
2218      *
2219      *
2220      * <pre>
2221      * Total visit duration for a route or a solution.
2222      * </pre>
2223      *
2224      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2225      *
2226      * @return The visitDuration.
2227      */
getVisitDuration()2228     public com.google.protobuf.Duration getVisitDuration() {
2229       if (visitDurationBuilder_ == null) {
2230         return visitDuration_ == null
2231             ? com.google.protobuf.Duration.getDefaultInstance()
2232             : visitDuration_;
2233       } else {
2234         return visitDurationBuilder_.getMessage();
2235       }
2236     }
2237     /**
2238      *
2239      *
2240      * <pre>
2241      * Total visit duration for a route or a solution.
2242      * </pre>
2243      *
2244      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2245      */
setVisitDuration(com.google.protobuf.Duration value)2246     public Builder setVisitDuration(com.google.protobuf.Duration value) {
2247       if (visitDurationBuilder_ == null) {
2248         if (value == null) {
2249           throw new NullPointerException();
2250         }
2251         visitDuration_ = value;
2252       } else {
2253         visitDurationBuilder_.setMessage(value);
2254       }
2255       bitField0_ |= 0x00000020;
2256       onChanged();
2257       return this;
2258     }
2259     /**
2260      *
2261      *
2262      * <pre>
2263      * Total visit duration for a route or a solution.
2264      * </pre>
2265      *
2266      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2267      */
setVisitDuration(com.google.protobuf.Duration.Builder builderForValue)2268     public Builder setVisitDuration(com.google.protobuf.Duration.Builder builderForValue) {
2269       if (visitDurationBuilder_ == null) {
2270         visitDuration_ = builderForValue.build();
2271       } else {
2272         visitDurationBuilder_.setMessage(builderForValue.build());
2273       }
2274       bitField0_ |= 0x00000020;
2275       onChanged();
2276       return this;
2277     }
2278     /**
2279      *
2280      *
2281      * <pre>
2282      * Total visit duration for a route or a solution.
2283      * </pre>
2284      *
2285      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2286      */
mergeVisitDuration(com.google.protobuf.Duration value)2287     public Builder mergeVisitDuration(com.google.protobuf.Duration value) {
2288       if (visitDurationBuilder_ == null) {
2289         if (((bitField0_ & 0x00000020) != 0)
2290             && visitDuration_ != null
2291             && visitDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
2292           getVisitDurationBuilder().mergeFrom(value);
2293         } else {
2294           visitDuration_ = value;
2295         }
2296       } else {
2297         visitDurationBuilder_.mergeFrom(value);
2298       }
2299       bitField0_ |= 0x00000020;
2300       onChanged();
2301       return this;
2302     }
2303     /**
2304      *
2305      *
2306      * <pre>
2307      * Total visit duration for a route or a solution.
2308      * </pre>
2309      *
2310      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2311      */
clearVisitDuration()2312     public Builder clearVisitDuration() {
2313       bitField0_ = (bitField0_ & ~0x00000020);
2314       visitDuration_ = null;
2315       if (visitDurationBuilder_ != null) {
2316         visitDurationBuilder_.dispose();
2317         visitDurationBuilder_ = null;
2318       }
2319       onChanged();
2320       return this;
2321     }
2322     /**
2323      *
2324      *
2325      * <pre>
2326      * Total visit duration for a route or a solution.
2327      * </pre>
2328      *
2329      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2330      */
getVisitDurationBuilder()2331     public com.google.protobuf.Duration.Builder getVisitDurationBuilder() {
2332       bitField0_ |= 0x00000020;
2333       onChanged();
2334       return getVisitDurationFieldBuilder().getBuilder();
2335     }
2336     /**
2337      *
2338      *
2339      * <pre>
2340      * Total visit duration for a route or a solution.
2341      * </pre>
2342      *
2343      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2344      */
getVisitDurationOrBuilder()2345     public com.google.protobuf.DurationOrBuilder getVisitDurationOrBuilder() {
2346       if (visitDurationBuilder_ != null) {
2347         return visitDurationBuilder_.getMessageOrBuilder();
2348       } else {
2349         return visitDuration_ == null
2350             ? com.google.protobuf.Duration.getDefaultInstance()
2351             : visitDuration_;
2352       }
2353     }
2354     /**
2355      *
2356      *
2357      * <pre>
2358      * Total visit duration for a route or a solution.
2359      * </pre>
2360      *
2361      * <code>.google.protobuf.Duration visit_duration = 6;</code>
2362      */
2363     private com.google.protobuf.SingleFieldBuilderV3<
2364             com.google.protobuf.Duration,
2365             com.google.protobuf.Duration.Builder,
2366             com.google.protobuf.DurationOrBuilder>
getVisitDurationFieldBuilder()2367         getVisitDurationFieldBuilder() {
2368       if (visitDurationBuilder_ == null) {
2369         visitDurationBuilder_ =
2370             new com.google.protobuf.SingleFieldBuilderV3<
2371                 com.google.protobuf.Duration,
2372                 com.google.protobuf.Duration.Builder,
2373                 com.google.protobuf.DurationOrBuilder>(
2374                 getVisitDuration(), getParentForChildren(), isClean());
2375         visitDuration_ = null;
2376       }
2377       return visitDurationBuilder_;
2378     }
2379 
2380     private com.google.protobuf.Duration totalDuration_;
2381     private com.google.protobuf.SingleFieldBuilderV3<
2382             com.google.protobuf.Duration,
2383             com.google.protobuf.Duration.Builder,
2384             com.google.protobuf.DurationOrBuilder>
2385         totalDurationBuilder_;
2386     /**
2387      *
2388      *
2389      * <pre>
2390      * The total duration should be equal to the sum of all durations above.
2391      * For routes, it also corresponds to
2392      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2393      * -
2394      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2395      * </pre>
2396      *
2397      * <code>.google.protobuf.Duration total_duration = 7;</code>
2398      *
2399      * @return Whether the totalDuration field is set.
2400      */
hasTotalDuration()2401     public boolean hasTotalDuration() {
2402       return ((bitField0_ & 0x00000040) != 0);
2403     }
2404     /**
2405      *
2406      *
2407      * <pre>
2408      * The total duration should be equal to the sum of all durations above.
2409      * For routes, it also corresponds to
2410      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2411      * -
2412      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2413      * </pre>
2414      *
2415      * <code>.google.protobuf.Duration total_duration = 7;</code>
2416      *
2417      * @return The totalDuration.
2418      */
getTotalDuration()2419     public com.google.protobuf.Duration getTotalDuration() {
2420       if (totalDurationBuilder_ == null) {
2421         return totalDuration_ == null
2422             ? com.google.protobuf.Duration.getDefaultInstance()
2423             : totalDuration_;
2424       } else {
2425         return totalDurationBuilder_.getMessage();
2426       }
2427     }
2428     /**
2429      *
2430      *
2431      * <pre>
2432      * The total duration should be equal to the sum of all durations above.
2433      * For routes, it also corresponds to
2434      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2435      * -
2436      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2437      * </pre>
2438      *
2439      * <code>.google.protobuf.Duration total_duration = 7;</code>
2440      */
setTotalDuration(com.google.protobuf.Duration value)2441     public Builder setTotalDuration(com.google.protobuf.Duration value) {
2442       if (totalDurationBuilder_ == null) {
2443         if (value == null) {
2444           throw new NullPointerException();
2445         }
2446         totalDuration_ = value;
2447       } else {
2448         totalDurationBuilder_.setMessage(value);
2449       }
2450       bitField0_ |= 0x00000040;
2451       onChanged();
2452       return this;
2453     }
2454     /**
2455      *
2456      *
2457      * <pre>
2458      * The total duration should be equal to the sum of all durations above.
2459      * For routes, it also corresponds to
2460      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2461      * -
2462      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2463      * </pre>
2464      *
2465      * <code>.google.protobuf.Duration total_duration = 7;</code>
2466      */
setTotalDuration(com.google.protobuf.Duration.Builder builderForValue)2467     public Builder setTotalDuration(com.google.protobuf.Duration.Builder builderForValue) {
2468       if (totalDurationBuilder_ == null) {
2469         totalDuration_ = builderForValue.build();
2470       } else {
2471         totalDurationBuilder_.setMessage(builderForValue.build());
2472       }
2473       bitField0_ |= 0x00000040;
2474       onChanged();
2475       return this;
2476     }
2477     /**
2478      *
2479      *
2480      * <pre>
2481      * The total duration should be equal to the sum of all durations above.
2482      * For routes, it also corresponds to
2483      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2484      * -
2485      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2486      * </pre>
2487      *
2488      * <code>.google.protobuf.Duration total_duration = 7;</code>
2489      */
mergeTotalDuration(com.google.protobuf.Duration value)2490     public Builder mergeTotalDuration(com.google.protobuf.Duration value) {
2491       if (totalDurationBuilder_ == null) {
2492         if (((bitField0_ & 0x00000040) != 0)
2493             && totalDuration_ != null
2494             && totalDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
2495           getTotalDurationBuilder().mergeFrom(value);
2496         } else {
2497           totalDuration_ = value;
2498         }
2499       } else {
2500         totalDurationBuilder_.mergeFrom(value);
2501       }
2502       bitField0_ |= 0x00000040;
2503       onChanged();
2504       return this;
2505     }
2506     /**
2507      *
2508      *
2509      * <pre>
2510      * The total duration should be equal to the sum of all durations above.
2511      * For routes, it also corresponds to
2512      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2513      * -
2514      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2515      * </pre>
2516      *
2517      * <code>.google.protobuf.Duration total_duration = 7;</code>
2518      */
clearTotalDuration()2519     public Builder clearTotalDuration() {
2520       bitField0_ = (bitField0_ & ~0x00000040);
2521       totalDuration_ = null;
2522       if (totalDurationBuilder_ != null) {
2523         totalDurationBuilder_.dispose();
2524         totalDurationBuilder_ = null;
2525       }
2526       onChanged();
2527       return this;
2528     }
2529     /**
2530      *
2531      *
2532      * <pre>
2533      * The total duration should be equal to the sum of all durations above.
2534      * For routes, it also corresponds to
2535      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2536      * -
2537      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2538      * </pre>
2539      *
2540      * <code>.google.protobuf.Duration total_duration = 7;</code>
2541      */
getTotalDurationBuilder()2542     public com.google.protobuf.Duration.Builder getTotalDurationBuilder() {
2543       bitField0_ |= 0x00000040;
2544       onChanged();
2545       return getTotalDurationFieldBuilder().getBuilder();
2546     }
2547     /**
2548      *
2549      *
2550      * <pre>
2551      * The total duration should be equal to the sum of all durations above.
2552      * For routes, it also corresponds to
2553      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2554      * -
2555      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2556      * </pre>
2557      *
2558      * <code>.google.protobuf.Duration total_duration = 7;</code>
2559      */
getTotalDurationOrBuilder()2560     public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() {
2561       if (totalDurationBuilder_ != null) {
2562         return totalDurationBuilder_.getMessageOrBuilder();
2563       } else {
2564         return totalDuration_ == null
2565             ? com.google.protobuf.Duration.getDefaultInstance()
2566             : totalDuration_;
2567       }
2568     }
2569     /**
2570      *
2571      *
2572      * <pre>
2573      * The total duration should be equal to the sum of all durations above.
2574      * For routes, it also corresponds to
2575      * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
2576      * -
2577      * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
2578      * </pre>
2579      *
2580      * <code>.google.protobuf.Duration total_duration = 7;</code>
2581      */
2582     private com.google.protobuf.SingleFieldBuilderV3<
2583             com.google.protobuf.Duration,
2584             com.google.protobuf.Duration.Builder,
2585             com.google.protobuf.DurationOrBuilder>
getTotalDurationFieldBuilder()2586         getTotalDurationFieldBuilder() {
2587       if (totalDurationBuilder_ == null) {
2588         totalDurationBuilder_ =
2589             new com.google.protobuf.SingleFieldBuilderV3<
2590                 com.google.protobuf.Duration,
2591                 com.google.protobuf.Duration.Builder,
2592                 com.google.protobuf.DurationOrBuilder>(
2593                 getTotalDuration(), getParentForChildren(), isClean());
2594         totalDuration_ = null;
2595       }
2596       return totalDurationBuilder_;
2597     }
2598 
2599     private double travelDistanceMeters_;
2600     /**
2601      *
2602      *
2603      * <pre>
2604      * Total travel distance for a route or a solution.
2605      * </pre>
2606      *
2607      * <code>double travel_distance_meters = 8;</code>
2608      *
2609      * @return The travelDistanceMeters.
2610      */
2611     @java.lang.Override
getTravelDistanceMeters()2612     public double getTravelDistanceMeters() {
2613       return travelDistanceMeters_;
2614     }
2615     /**
2616      *
2617      *
2618      * <pre>
2619      * Total travel distance for a route or a solution.
2620      * </pre>
2621      *
2622      * <code>double travel_distance_meters = 8;</code>
2623      *
2624      * @param value The travelDistanceMeters to set.
2625      * @return This builder for chaining.
2626      */
setTravelDistanceMeters(double value)2627     public Builder setTravelDistanceMeters(double value) {
2628 
2629       travelDistanceMeters_ = value;
2630       bitField0_ |= 0x00000080;
2631       onChanged();
2632       return this;
2633     }
2634     /**
2635      *
2636      *
2637      * <pre>
2638      * Total travel distance for a route or a solution.
2639      * </pre>
2640      *
2641      * <code>double travel_distance_meters = 8;</code>
2642      *
2643      * @return This builder for chaining.
2644      */
clearTravelDistanceMeters()2645     public Builder clearTravelDistanceMeters() {
2646       bitField0_ = (bitField0_ & ~0x00000080);
2647       travelDistanceMeters_ = 0D;
2648       onChanged();
2649       return this;
2650     }
2651 
2652     private com.google.protobuf.MapField<
2653             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
2654         maxLoads_;
2655 
2656     private com.google.protobuf.MapField<
2657             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
internalGetMaxLoads()2658         internalGetMaxLoads() {
2659       if (maxLoads_ == null) {
2660         return com.google.protobuf.MapField.emptyMapField(MaxLoadsDefaultEntryHolder.defaultEntry);
2661       }
2662       return maxLoads_;
2663     }
2664 
2665     private com.google.protobuf.MapField<
2666             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
internalGetMutableMaxLoads()2667         internalGetMutableMaxLoads() {
2668       if (maxLoads_ == null) {
2669         maxLoads_ =
2670             com.google.protobuf.MapField.newMapField(MaxLoadsDefaultEntryHolder.defaultEntry);
2671       }
2672       if (!maxLoads_.isMutable()) {
2673         maxLoads_ = maxLoads_.copy();
2674       }
2675       bitField0_ |= 0x00000100;
2676       onChanged();
2677       return maxLoads_;
2678     }
2679 
getMaxLoadsCount()2680     public int getMaxLoadsCount() {
2681       return internalGetMaxLoads().getMap().size();
2682     }
2683     /**
2684      *
2685      *
2686      * <pre>
2687      * Maximum load achieved over the entire route (resp. solution), for each of
2688      * the quantities on this route (resp. solution), computed as the maximum over
2689      * all
2690      * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
2691      * (resp.
2692      * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
2693      * </pre>
2694      *
2695      * <code>
2696      * map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
2697      * </code>
2698      */
2699     @java.lang.Override
containsMaxLoads(java.lang.String key)2700     public boolean containsMaxLoads(java.lang.String key) {
2701       if (key == null) {
2702         throw new NullPointerException("map key");
2703       }
2704       return internalGetMaxLoads().getMap().containsKey(key);
2705     }
2706     /** Use {@link #getMaxLoadsMap()} instead. */
2707     @java.lang.Override
2708     @java.lang.Deprecated
2709     public java.util.Map<
2710             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
getMaxLoads()2711         getMaxLoads() {
2712       return getMaxLoadsMap();
2713     }
2714     /**
2715      *
2716      *
2717      * <pre>
2718      * Maximum load achieved over the entire route (resp. solution), for each of
2719      * the quantities on this route (resp. solution), computed as the maximum over
2720      * all
2721      * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
2722      * (resp.
2723      * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
2724      * </pre>
2725      *
2726      * <code>
2727      * map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
2728      * </code>
2729      */
2730     @java.lang.Override
2731     public java.util.Map<
2732             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
getMaxLoadsMap()2733         getMaxLoadsMap() {
2734       return internalGetMaxLoads().getMap();
2735     }
2736     /**
2737      *
2738      *
2739      * <pre>
2740      * Maximum load achieved over the entire route (resp. solution), for each of
2741      * the quantities on this route (resp. solution), computed as the maximum over
2742      * all
2743      * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
2744      * (resp.
2745      * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
2746      * </pre>
2747      *
2748      * <code>
2749      * map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
2750      * </code>
2751      */
2752     @java.lang.Override
2753     public /* nullable */ com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad
getMaxLoadsOrDefault( java.lang.String key, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad defaultValue)2754         getMaxLoadsOrDefault(
2755             java.lang.String key,
2756             /* nullable */
2757             com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad defaultValue) {
2758       if (key == null) {
2759         throw new NullPointerException("map key");
2760       }
2761       java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
2762           map = internalGetMaxLoads().getMap();
2763       return map.containsKey(key) ? map.get(key) : defaultValue;
2764     }
2765     /**
2766      *
2767      *
2768      * <pre>
2769      * Maximum load achieved over the entire route (resp. solution), for each of
2770      * the quantities on this route (resp. solution), computed as the maximum over
2771      * all
2772      * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
2773      * (resp.
2774      * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
2775      * </pre>
2776      *
2777      * <code>
2778      * map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
2779      * </code>
2780      */
2781     @java.lang.Override
getMaxLoadsOrThrow( java.lang.String key)2782     public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow(
2783         java.lang.String key) {
2784       if (key == null) {
2785         throw new NullPointerException("map key");
2786       }
2787       java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
2788           map = internalGetMaxLoads().getMap();
2789       if (!map.containsKey(key)) {
2790         throw new java.lang.IllegalArgumentException();
2791       }
2792       return map.get(key);
2793     }
2794 
clearMaxLoads()2795     public Builder clearMaxLoads() {
2796       bitField0_ = (bitField0_ & ~0x00000100);
2797       internalGetMutableMaxLoads().getMutableMap().clear();
2798       return this;
2799     }
2800     /**
2801      *
2802      *
2803      * <pre>
2804      * Maximum load achieved over the entire route (resp. solution), for each of
2805      * the quantities on this route (resp. solution), computed as the maximum over
2806      * all
2807      * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
2808      * (resp.
2809      * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
2810      * </pre>
2811      *
2812      * <code>
2813      * map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
2814      * </code>
2815      */
removeMaxLoads(java.lang.String key)2816     public Builder removeMaxLoads(java.lang.String key) {
2817       if (key == null) {
2818         throw new NullPointerException("map key");
2819       }
2820       internalGetMutableMaxLoads().getMutableMap().remove(key);
2821       return this;
2822     }
2823     /** Use alternate mutation accessors instead. */
2824     @java.lang.Deprecated
2825     public java.util.Map<
2826             java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
getMutableMaxLoads()2827         getMutableMaxLoads() {
2828       bitField0_ |= 0x00000100;
2829       return internalGetMutableMaxLoads().getMutableMap();
2830     }
2831     /**
2832      *
2833      *
2834      * <pre>
2835      * Maximum load achieved over the entire route (resp. solution), for each of
2836      * the quantities on this route (resp. solution), computed as the maximum over
2837      * all
2838      * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
2839      * (resp.
2840      * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
2841      * </pre>
2842      *
2843      * <code>
2844      * map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
2845      * </code>
2846      */
putMaxLoads( java.lang.String key, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad value)2847     public Builder putMaxLoads(
2848         java.lang.String key, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad value) {
2849       if (key == null) {
2850         throw new NullPointerException("map key");
2851       }
2852       if (value == null) {
2853         throw new NullPointerException("map value");
2854       }
2855       internalGetMutableMaxLoads().getMutableMap().put(key, value);
2856       bitField0_ |= 0x00000100;
2857       return this;
2858     }
2859     /**
2860      *
2861      *
2862      * <pre>
2863      * Maximum load achieved over the entire route (resp. solution), for each of
2864      * the quantities on this route (resp. solution), computed as the maximum over
2865      * all
2866      * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
2867      * (resp.
2868      * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
2869      * </pre>
2870      *
2871      * <code>
2872      * map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
2873      * </code>
2874      */
putAllMaxLoads( java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> values)2875     public Builder putAllMaxLoads(
2876         java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
2877             values) {
2878       internalGetMutableMaxLoads().getMutableMap().putAll(values);
2879       bitField0_ |= 0x00000100;
2880       return this;
2881     }
2882 
2883     private com.google.protobuf.MapField<java.lang.String, java.lang.Double> costs_;
2884 
2885     @java.lang.Deprecated
internalGetCosts()2886     private com.google.protobuf.MapField<java.lang.String, java.lang.Double> internalGetCosts() {
2887       if (costs_ == null) {
2888         return com.google.protobuf.MapField.emptyMapField(CostsDefaultEntryHolder.defaultEntry);
2889       }
2890       return costs_;
2891     }
2892 
2893     @java.lang.Deprecated
2894     private com.google.protobuf.MapField<java.lang.String, java.lang.Double>
internalGetMutableCosts()2895         internalGetMutableCosts() {
2896       if (costs_ == null) {
2897         costs_ = com.google.protobuf.MapField.newMapField(CostsDefaultEntryHolder.defaultEntry);
2898       }
2899       if (!costs_.isMutable()) {
2900         costs_ = costs_.copy();
2901       }
2902       bitField0_ |= 0x00000200;
2903       onChanged();
2904       return costs_;
2905     }
2906 
2907     @java.lang.Deprecated
getCostsCount()2908     public int getCostsCount() {
2909       return internalGetCosts().getMap().size();
2910     }
2911     /**
2912      *
2913      *
2914      * <pre>
2915      * Deprecated: Use
2916      * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
2917      * and
2918      * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
2919      * instead.
2920      * </pre>
2921      *
2922      * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
2923      */
2924     @java.lang.Override
2925     @java.lang.Deprecated
containsCosts(java.lang.String key)2926     public boolean containsCosts(java.lang.String key) {
2927       if (key == null) {
2928         throw new NullPointerException("map key");
2929       }
2930       return internalGetCosts().getMap().containsKey(key);
2931     }
2932     /** Use {@link #getCostsMap()} instead. */
2933     @java.lang.Override
2934     @java.lang.Deprecated
getCosts()2935     public java.util.Map<java.lang.String, java.lang.Double> getCosts() {
2936       return getCostsMap();
2937     }
2938     /**
2939      *
2940      *
2941      * <pre>
2942      * Deprecated: Use
2943      * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
2944      * and
2945      * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
2946      * instead.
2947      * </pre>
2948      *
2949      * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
2950      */
2951     @java.lang.Override
2952     @java.lang.Deprecated
getCostsMap()2953     public java.util.Map<java.lang.String, java.lang.Double> getCostsMap() {
2954       return internalGetCosts().getMap();
2955     }
2956     /**
2957      *
2958      *
2959      * <pre>
2960      * Deprecated: Use
2961      * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
2962      * and
2963      * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
2964      * instead.
2965      * </pre>
2966      *
2967      * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
2968      */
2969     @java.lang.Override
2970     @java.lang.Deprecated
getCostsOrDefault(java.lang.String key, double defaultValue)2971     public double getCostsOrDefault(java.lang.String key, double defaultValue) {
2972       if (key == null) {
2973         throw new NullPointerException("map key");
2974       }
2975       java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
2976       return map.containsKey(key) ? map.get(key) : defaultValue;
2977     }
2978     /**
2979      *
2980      *
2981      * <pre>
2982      * Deprecated: Use
2983      * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
2984      * and
2985      * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
2986      * instead.
2987      * </pre>
2988      *
2989      * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
2990      */
2991     @java.lang.Override
2992     @java.lang.Deprecated
getCostsOrThrow(java.lang.String key)2993     public double getCostsOrThrow(java.lang.String key) {
2994       if (key == null) {
2995         throw new NullPointerException("map key");
2996       }
2997       java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
2998       if (!map.containsKey(key)) {
2999         throw new java.lang.IllegalArgumentException();
3000       }
3001       return map.get(key);
3002     }
3003 
3004     @java.lang.Deprecated
clearCosts()3005     public Builder clearCosts() {
3006       bitField0_ = (bitField0_ & ~0x00000200);
3007       internalGetMutableCosts().getMutableMap().clear();
3008       return this;
3009     }
3010     /**
3011      *
3012      *
3013      * <pre>
3014      * Deprecated: Use
3015      * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
3016      * and
3017      * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
3018      * instead.
3019      * </pre>
3020      *
3021      * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
3022      */
3023     @java.lang.Deprecated
removeCosts(java.lang.String key)3024     public Builder removeCosts(java.lang.String key) {
3025       if (key == null) {
3026         throw new NullPointerException("map key");
3027       }
3028       internalGetMutableCosts().getMutableMap().remove(key);
3029       return this;
3030     }
3031     /** Use alternate mutation accessors instead. */
3032     @java.lang.Deprecated
getMutableCosts()3033     public java.util.Map<java.lang.String, java.lang.Double> getMutableCosts() {
3034       bitField0_ |= 0x00000200;
3035       return internalGetMutableCosts().getMutableMap();
3036     }
3037     /**
3038      *
3039      *
3040      * <pre>
3041      * Deprecated: Use
3042      * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
3043      * and
3044      * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
3045      * instead.
3046      * </pre>
3047      *
3048      * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
3049      */
3050     @java.lang.Deprecated
putCosts(java.lang.String key, double value)3051     public Builder putCosts(java.lang.String key, double value) {
3052       if (key == null) {
3053         throw new NullPointerException("map key");
3054       }
3055 
3056       internalGetMutableCosts().getMutableMap().put(key, value);
3057       bitField0_ |= 0x00000200;
3058       return this;
3059     }
3060     /**
3061      *
3062      *
3063      * <pre>
3064      * Deprecated: Use
3065      * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
3066      * and
3067      * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
3068      * instead.
3069      * </pre>
3070      *
3071      * <code>map&lt;string, double&gt; costs = 10 [deprecated = true];</code>
3072      */
3073     @java.lang.Deprecated
putAllCosts(java.util.Map<java.lang.String, java.lang.Double> values)3074     public Builder putAllCosts(java.util.Map<java.lang.String, java.lang.Double> values) {
3075       internalGetMutableCosts().getMutableMap().putAll(values);
3076       bitField0_ |= 0x00000200;
3077       return this;
3078     }
3079 
3080     private double totalCost_;
3081     /**
3082      *
3083      *
3084      * <pre>
3085      * Deprecated: Use
3086      * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost]
3087      * and
3088      * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
3089      * instead.
3090      * </pre>
3091      *
3092      * <code>double total_cost = 11 [deprecated = true];</code>
3093      *
3094      * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
3095      *     google/cloud/optimization/v1/fleet_routing.proto;l=2331
3096      * @return The totalCost.
3097      */
3098     @java.lang.Override
3099     @java.lang.Deprecated
getTotalCost()3100     public double getTotalCost() {
3101       return totalCost_;
3102     }
3103     /**
3104      *
3105      *
3106      * <pre>
3107      * Deprecated: Use
3108      * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost]
3109      * and
3110      * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
3111      * instead.
3112      * </pre>
3113      *
3114      * <code>double total_cost = 11 [deprecated = true];</code>
3115      *
3116      * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
3117      *     google/cloud/optimization/v1/fleet_routing.proto;l=2331
3118      * @param value The totalCost to set.
3119      * @return This builder for chaining.
3120      */
3121     @java.lang.Deprecated
setTotalCost(double value)3122     public Builder setTotalCost(double value) {
3123 
3124       totalCost_ = value;
3125       bitField0_ |= 0x00000400;
3126       onChanged();
3127       return this;
3128     }
3129     /**
3130      *
3131      *
3132      * <pre>
3133      * Deprecated: Use
3134      * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost]
3135      * and
3136      * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
3137      * instead.
3138      * </pre>
3139      *
3140      * <code>double total_cost = 11 [deprecated = true];</code>
3141      *
3142      * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
3143      *     google/cloud/optimization/v1/fleet_routing.proto;l=2331
3144      * @return This builder for chaining.
3145      */
3146     @java.lang.Deprecated
clearTotalCost()3147     public Builder clearTotalCost() {
3148       bitField0_ = (bitField0_ & ~0x00000400);
3149       totalCost_ = 0D;
3150       onChanged();
3151       return this;
3152     }
3153 
3154     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3155     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3156       return super.setUnknownFields(unknownFields);
3157     }
3158 
3159     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3160     public final Builder mergeUnknownFields(
3161         final com.google.protobuf.UnknownFieldSet unknownFields) {
3162       return super.mergeUnknownFields(unknownFields);
3163     }
3164 
3165     // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.AggregatedMetrics)
3166   }
3167 
3168   // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.AggregatedMetrics)
3169   private static final com.google.cloud.optimization.v1.AggregatedMetrics DEFAULT_INSTANCE;
3170 
3171   static {
3172     DEFAULT_INSTANCE = new com.google.cloud.optimization.v1.AggregatedMetrics();
3173   }
3174 
getDefaultInstance()3175   public static com.google.cloud.optimization.v1.AggregatedMetrics getDefaultInstance() {
3176     return DEFAULT_INSTANCE;
3177   }
3178 
3179   private static final com.google.protobuf.Parser<AggregatedMetrics> PARSER =
3180       new com.google.protobuf.AbstractParser<AggregatedMetrics>() {
3181         @java.lang.Override
3182         public AggregatedMetrics parsePartialFrom(
3183             com.google.protobuf.CodedInputStream input,
3184             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3185             throws com.google.protobuf.InvalidProtocolBufferException {
3186           Builder builder = newBuilder();
3187           try {
3188             builder.mergeFrom(input, extensionRegistry);
3189           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3190             throw e.setUnfinishedMessage(builder.buildPartial());
3191           } catch (com.google.protobuf.UninitializedMessageException e) {
3192             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3193           } catch (java.io.IOException e) {
3194             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3195                 .setUnfinishedMessage(builder.buildPartial());
3196           }
3197           return builder.buildPartial();
3198         }
3199       };
3200 
parser()3201   public static com.google.protobuf.Parser<AggregatedMetrics> parser() {
3202     return PARSER;
3203   }
3204 
3205   @java.lang.Override
getParserForType()3206   public com.google.protobuf.Parser<AggregatedMetrics> getParserForType() {
3207     return PARSER;
3208   }
3209 
3210   @java.lang.Override
getDefaultInstanceForType()3211   public com.google.cloud.optimization.v1.AggregatedMetrics getDefaultInstanceForType() {
3212     return DEFAULT_INSTANCE;
3213   }
3214 }
3215